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.

  1. i create 2 windows vms "mydevbox1" , "mydevbox2" using latest image of windows server 2012 r2 in azure gallery
  2. i install necessary software , configure both same
  3. 3a. capture the image of mydevbox1 called mydevbox1-image-ps using powershell script below.
  4. 3b. capture image of mydevbox2 called mydevbox2-image-manual using manual/portal process (sysprep -> capture image) (ofcourse separate vm).
  5. 4a. when try create new vm using mydevbox1-image-ps created through powershell, vm creation process fails (provisioning times out)
  6. 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

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -