Unable to capture VM to shared image gallery - OS state does not match selection

Iron Contributor

I am trying to capture an image to my shared image gallery from a generalized VM. I have done this successfully before and I am generally familiar with the process. This time when I try to create the image, (a) it will not allow me to create the image as a version of an existing image, and (b) it will not allow me to create the image as a new image. In the drop-down box where I can normally choose to create a new version of an existing image, I see 'Unavailable: OS state does not match selection.'

Unable to capture image - OS state - bl.png

 

If I try to create a new image, I get a new dialog box asking for the name, publisher, etc., but whatever values I put in, I can't click OK. I am sure that I ran sysprep and created a generalized image before shutting down the VM I'm trying to capture. In fact, I recreated the VM from a pre-sysprep snapshot and ran sysprep again, but got the same problem trying to capture the image.

 

I have a support ticket open but the team that took the ticket hasn't found an answer yet. I'm hoping someone in this community knows what the problem is.

5 Replies

I thought perhaps the problem was the difference between Stopped and Stopped (Deallocated). But even after stopping the machine through the Azure portal and getting it to Deallocated, I still can't capture the image to the shared image gallery.

 

However, I was able to capture it as a managed image only. Why?

@David Schrag  I am having this exact same problem.  I will also be opening a ticket.  In the meantime it looks like "rebuild the VM" is the path forward.

@Rob_Pasell I've had a support ticket going with MS on this for a while now. It seems they had a glitch with the Shared Image Gallery function a while back, and I think that perhaps any images created during that glitch are now "frozen," no longer to accept version updates. I created a new base image since then (built from the same snapshot), and it looks like I'm able to add versions to that one. My ticket is still open and I'll try to remember to post an update here if it gets resolved.

@David Schrag appreciate the quick response.  Good luck.

 

Edit.  I rebuilt the VM and it worked the second time, so most likely whatever that glitch in the Shared Image Gallery was caused the problem.

That's good. I was able to add a version to a post-glitch image as well. However, I keep getting errors when trying to deploy session hosts based on that new version -- an error about downloading a .zip file from https://wvdportalstorageblob.blob.core.windows.net/galleryartifacts/. I've never seen that error before and don't know what would cause it, so now I have another ticket open.