Cannot create new AzureVM using image captured using PowerShell -
i not able create new azure vms using images have captured through powershell.
here situation in.
- i create 2 windows vms "mydevbox1" , "mydevbox2" using latest image of windows server 2012 r2 in azure gallery
- i install necessary software , configure both same
- 3a. capture the image of mydevbox1 called mydevbox1-image-ps using powershell script below.
- 3b. capture image of mydevbox2 called mydevbox2-image-manual using manual/portal process (sysprep -> capture image) (ofcourse separate vm).
- 4a. when try create new vm using mydevbox1-image-ps created through powershell, vm creation process fails (provisioning times out)
- 4b. when try create new vm using mydevbox2-image-manual created through manual process, vm creation successful.
please help.
powershell script using capture image
save-azurevmimage –servicename $servicename_tocapture –name $vmname_tocapture –imagename $imagename_captured_generalized –osstate "generalized" -imagelabel $imagelabel_captured_generalized -verbose
it fails because didn't run sysprep before saving image. powershell cmdlet won't you. -osstate parameter saves reference image generalized or specialized. details in blog post:
vm image powershell ‘how to’ blog post
http://azure.microsoft.com/blog/2014/05/01/vm-image-powershell-how-to-blog-post/
Comments
Post a Comment