Look twice when deploying VM´s in VMM or get the wrong vhdx
Today I have been working with some updates on a customers Hyper-V environment and their host images (that I use for bare-metal deploy). The VMM server has all the updates with VMM 2012 R2 UR4 and also Windows Server with November update, although this issue goes further back than that and based on Brian Ehlert´s post you can see that it is by design 🙂
I wanted to deploy the vhdx to a host to update with settings and windows updates. In my library it looked as following and i right clicked on the marked vhdx and selected create VM.
But when I had deployed it and started working on it with patching and configuring, somethings did not seem to be right, and looking in the folder of the newly created vm revealed this:
As you can see it is the old vhdx that has been copied from the library, initially I thought that I maybe selected the wrong vhdx and recreated another VM with the exact same result!
Why did this happen? Well as I mentioned above with Brians post, this is because I have not changed the details with family name and version of the VHDX objects in the VMM database so it just selects one that seems to be right based on the inital request. wrong or right?
If it is by design, then I would say that it should show in the wizard and not as you see I get!
In the wizard and the HW tab it seemed like I had the right vhdx, and also when continuing to the next view and review stage of the provisioning phase, you can see that it said right library resource and also in the bottom with the file name it looked correct,
but when I investigated things a bit further and checked the whole path of the source it revealed the nasty _old.vhdx
And after I pressed “Browse” and selected the right VHDX and started the deploy everything worked as intended..
So what is the lesson here? Either clean up your old vhdx version in the VMM library or set the version and family name differently and that not only in the end of the filename 🙂