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

%3CLINGO-SUB%20id%3D%22lingo-sub-2251456%22%20slang%3D%22en-US%22%3EUnable%20to%20capture%20VM%20to%20shared%20image%20gallery%20-%20OS%20state%20does%20not%20match%20selection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2251456%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20capture%20an%20image%20to%20my%20shared%20image%20gallery%20from%20a%20generalized%20VM.%20I%20have%20done%20this%20successfully%20before%20and%20I%20am%20generally%20familiar%20with%20the%20process.%20This%20time%20when%20I%20try%20to%20create%20the%20image%2C%20(a)%20it%20will%20not%20allow%20me%20to%20create%20the%20image%20as%20a%20version%20of%20an%20existing%20image%2C%20and%20(b)%20it%20will%20not%20allow%20me%20to%20create%20the%20image%20as%20a%20new%20image.%20In%20the%20drop-down%20box%20where%20I%20can%20normally%20choose%20to%20create%20a%20new%20version%20of%20an%20existing%20image%2C%20I%20see%20'Unavailable%3A%20OS%20state%20does%20not%20match%20selection.'%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Unable%20to%20capture%20image%20-%20OS%20state%20-%20bl.png%22%20style%3D%22width%3A%20766px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F269206i97D4AA453DF7F508%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Unable%20to%20capture%20image%20-%20OS%20state%20-%20bl.png%22%20alt%3D%22Unable%20to%20capture%20image%20-%20OS%20state%20-%20bl.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20I%20try%20to%20create%20a%20new%20image%2C%20I%20get%20a%20new%20dialog%20box%20asking%20for%20the%20name%2C%20publisher%2C%20etc.%2C%20but%20whatever%20values%20I%20put%20in%2C%20I%20can't%20click%20OK.%20I%20am%20sure%20that%20I%20ran%20sysprep%20and%20created%20a%20generalized%20image%20before%20shutting%20down%20the%20VM%20I'm%20trying%20to%20capture.%20In%20fact%2C%20I%20recreated%20the%20VM%20from%20a%20pre-sysprep%20snapshot%20and%20ran%20sysprep%20again%2C%20but%20got%20the%20same%20problem%20trying%20to%20capture%20the%20image.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20support%20ticket%20open%20but%20the%20team%20that%20took%20the%20ticket%20hasn't%20found%20an%20answer%20yet.%20I'm%20hoping%20someone%20in%20this%20community%20knows%20what%20the%20problem%20is.%3C%2FP%3E%3C%2FLINGO-BODY%3E
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.