0

In the new portal, there's an icon that says 'Capture'. I assume this was for capturing an image of a VM (snapshot), but it was greyed out. Doing a little reading, several posts suggested running sysprep to prepare the machine for a capture.

I ran it according to those instructions, the machine appears to reboot, but all connectivity is lost.

Anyone know what's going on or how to fix it? Also, are there any ways to capture a snapshot in the new portal or do we need to use PS scripts?

henrycarteruk
  • 12,708
  • 2
  • 36
  • 40
Quark Soup
  • 4,272
  • 3
  • 42
  • 74
  • sysprep >> shutdown >> capture >> deploy from image – 4c74356b41 Mar 02 '17 at 16:39
  • Capture? How? The icon is still greyed out. Also, in the Classic Portal, you could create a virtual machine from an image. I can't find the same function in the new portal. – Quark Soup Mar 02 '17 at 18:03

1 Answers1

1

the machine appears to reboot, but all connectivity is lost.

It is by design behavior. Before capture a VM image, we should use sysprep to generalize the VM, generalizing a VM removes all your personal account information, among other things, and prepares the machine to be used as an image. After we run sysprep, we will lost all connection. Run sysprep, we should select shutdown:
enter image description here

For now, we can't via Azure new portal to capture a VM image. We can use PowerShell to capture a VM image, we can refer to this link.

you could create a virtual machine from an image. I can't find the same function in the new portal.

We can't use Azure new portal to create a VM from image, we can use PowerShell to create a VM from image, we can refer to the link.

Most important:
Before you capture a VM image, you should back up you VM's VHD first, because the process will delete the original virtual machine after it's captured.

The latest version of PowerShell is 3.6.0, you can install it from this page.

Jason Ye
  • 13,710
  • 2
  • 16
  • 25
  • 1
    Most important thing to add: using SYSPREP will trash your VM. You'll not be able to use it again. You can make clones from it, but I've found that losing the security identifiers can cause a lot of trouble, especially with Windows Store applications. – Quark Soup Mar 03 '17 at 01:53
  • @MikeDoonsebury Prior to caputuring an image of an Azure virtual machine, it is recommended the target virtual machine be backed up. sysprep will removes some unique settings, in this way, we can use this image to cerate multiple VMs, – Jason Ye Mar 03 '17 at 01:59
  • @MikeDoonsebury thank you for your suggestion, I had update my answer, please check it. – Jason Ye Mar 03 '17 at 02:06
  • @MikeDoonsebury Just checking in to see if the information provided was helpful. Please let me know if you would like further assistance. – Jason Ye Mar 03 '17 at 10:03
  • Yes, and no. Basically my VM was hosed. I wasn't prepared to go through the motions of creating a VM in Powershell from the saved image, so I had to regen the machine. Again, Capturing is not the same as taking a Snapshot, which is a trivial operation in Hyper-V or VMWare. – Quark Soup Mar 04 '17 at 02:30