Difference between revisions of "Azure"

From Ever changing code
Jump to navigation Jump to search
(Replaced content with "{{Special:PrefixIndex/Azure/}} Category: azure ")
 
Line 1: Line 1:
= Generalising Windows machine before creating an image =
{{Special:PrefixIndex/Azure/}}
# Create Windows VM
# Provision/baseline your VM by RDPing and installing software
# Generalise your system using sysprep to create System Out-of-Box Experience (OOBE)
## Win+R, type sysprep, it will take you to <tt>C:\Windows\System32\Sysprep</tt> and run <tt>sysprep.exe</tt>
##* System Cleanup Action: Enter System Out-of-Box Experience (OOBE)
##* Generalize: Yes (tick)
##* Shutdown Options: Reboot
## Optional run: <code>C:\Windows\System32\Sysprep\sysprep.exe /oobe /generalize /shutdown /mode:vm</code>
## You will be disconnected from RDP but the instance still run generalising and will stop once done
# Go to Azure portal and click on ''Capture'' to create an image now
# You find new image in ''Images'' service where you can create new VM from


= Generalising Linux machine before creating an image =
# Create Linux VM
# Provision/baseline your VM by SSHing to provisioning your software
# Generalise your system using [https://github.com/Azure/WALinuxAgentMicrosoft Azure Linux Agent - waagent]
##* <code>sudo waagent -deprovision+user</code>
##* account you are currently logged in will be completly deleted including home
##* Linux system does not neet to be shut
# Go to Azure portal and click on ''Capture'' to create an image now
# You find new image in ''Images'' service where you can create new VM from
= Not supported server roles and services =
This section has been updated on 26/09/2018, for upto date information see [https://support.microsoft.com/en-us/help/2721672/microsoft-server-software-support-for-microsoft-azure-virtual-machines 1].
The following roles are not supported on Microsoft Azure virtual machines:
*Dynamic Host Configuration Protocol Server
*Hyper-V (Hyper-V role is supported in Azure Ev3, and Dv3 series VMs only)
*Rights Management Services
*Windows Deployment Services
*Windows Server features
The following significant features are not supported:
*BitLocker Drive Encryption (on the operating system hard disk, may be used on data disks)
*Internet Storage Name Server
*Multipath I/O
*Network Load Balancing
*Peer Name Resolution Protocol
*RRAS
*DirectAccess
*SNMP Services
*Storage Manager for SANs
*Windows Internet Name Service
*Wireless LAN Service
= Azure tools =
* blob storage
* Powershell AZModule to copy files
* Powershell DSC Desired State Configuration system
* VMagent custom script extension - runs on Azure VMs, allows to run one-off scripts
== VMagent custom script extension ==
Windows
<source lang="powershell">
$fileUri = @("https://xxxxxxx.blob.core.windows.net/buildServer1/1_Add_Tools.ps1",
"https://xxxxxxx.blob.core.windows.net/buildServer1/2_Add_Features.ps1",
"https://xxxxxxx.blob.core.windows.net/buildServer1/3_CompleteInstall.ps1")
$Settings = @{"fileUris" = $fileUri};
$storageaccname = "xxxxxxx"
$storagekey = "1234ABCD"
$ProtectedSettings = @{"storageAccountName" = $storageaccname; "storageAccountKey" = $storagekey; "commandToExecute" = "powershell -ExecutionPolicy Unrestricted -File 1_Add_Tools.ps1"};
#run command
Set-AzureRmVMExtension -ResourceGroupName myRG `
    -Location myLocation `
    -VMName myVM `
    -Name "buildserver1" `
    -Publisher "Microsoft.Compute" `
    -ExtensionType "CustomScriptExtension" `
    -TypeHandlerVersion "1.9" `
    -Settings $Settings `
    -ProtectedSettings $ProtectedSettings
</source>
[[File:Set-VMAzureCustomScriptExtension_example.PNG|900px|none|left|Set-VMAzureCustomScriptExtension_example]]
Linux
<source lang="bash">
az vm extension set \
  --resource-group myResourceGroup \
  --vm-name myVM --name customScript \
  --publisher Microsoft.Azure.Extensions \
  --settings ./script-config.json
</source>
== Resources ==
*[https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/custom-script-windows Custom Script for Windows]
= Resources =
*[https://support.microsoft.com/en-us/help/2721672/microsoft-server-software-support-for-microsoft-azure-virtual-machines What is and can't be suppoerted on Azure] Windows systems
*[https://support.microsoft.com/en-us/help/4049215/extensions-and-virtual-machine-agent-minimum-version-support Minimum version support for Linux and Windows virtual machine agents in Azure] Linux systems
;Azure for AWS Administrators
*[https://docs.microsoft.com/en-us/azure/architecture/aws-professional/ Azure for AWS Professionals]
*[https://docs.microsoft.com/en-us/azure/architecture/aws-professional/services AWS to Azure services comparison]
[[ Category: azure ]]
[[ Category: azure ]]

Latest revision as of 18:13, 7 December 2018