gerpretty.blogg.se

Azure virtual machine snapshot
Azure virtual machine snapshot






PublicIpAddressName "myPublicIPAddress" `Īlso, the snapshot is OK, but you should create the image from the snapshot first. When the image is OK, Just create the VMSS like this: New-AzureRmVmss ` For example, you can create a windows image from the windows VM through PowerShell, see Create and use a custom image for virtual machine scale sets with Azure PowerShell. You can create an image from an Azure VM. $imageConfig = Set-AzureRmImageOsDisk -Image $imageConfig -OsState Generalized -OsType Windows -ManagedDiskId $disk.Id $disk = New-AzureRmDisk -Disk $diskConfig -ResourceGroupName $rgName -DiskName $diskName

azure virtual machine snapshot

$diskConfig = New-AzureRmDiskConfig -AccountType $storageType -Location $location -CreateOption Copy -SourceResourceId $snapshot.Id Or is it possible to use a snapshot for creating an VM Scale Set?Īfer the hint from Charles Xu I changhed the image creation to first create a dik, but I still get the same error. Is there a other way to create the image or set a source blob uri? New-AzureRmVmss -ResourceGroupName $currentrg -Name $vmssName -VirtualMachineScaleSet $vmss -Verbose -ErrorAction Stop Set-AzureRmVmssOSProfile -ComputerNamePrefix $vmNamePrefix -AdminUsername $adminUsername -AdminPassword $adminPassword -VirtualMachineScaleSet $vmss Image $ImgRef -OsDiskOsType Windows -OsDiskName "C" Set-AzureRmVmssStorageProfile -VirtualMachineScaleSet $vmss -OsDiskCreateOption "FromImage" -OsDiskCaching "None" ` On my deploy commands for azure: $vmss = New-AzureRmVmssConfig -Location $loc -SkuCapacity 2 -SkuName "Standard_DS1_v2" -UpgradePolicyMode "manual" -ErrorAction StopĪdd-AzureRmVmssNetworkInterfaceConfiguration -VirtualMachineScaleSet $vmss -Name "vmssNetwork" -Primary $true -IPConfiguration $ipConfig New-AzureRmVmss : The URI. does not look to be correct blob URI. New-AzureRmImage -ImageName $imageName -ResourceGroupName $rgName -Image $imageConfigīut in this case the image that is created has no Source Blob URI: $imageConfig = Set-AzureRmImageOsDisk -Image $imageConfig -OsState Generalized -OsType Windows -SnapshotId $snapshot.Id $imageConfig = New-AzureRmImageConfig -Location $location $snapshot = Get-AzureRmSnapshot -ResourceGroupName $rgName -SnapshotName $snapshotName

azure virtual machine snapshot

As the Set-AzureRmVmssStorageProfile only accepts images my first try was to convert the snapshot to an image by use: $rgName = #. I want to create a VM Scale set and use a snapshot as base for my windows VMs.








Azure virtual machine snapshot