Uncategorized

Migrating a Desktop VM to an ESXi Server

I have a Windows 7 VM running on my primary Mac notebook that I use mostly for one single application on a regular basis, and for occasional browser testing or other random tasks on rare occasions.  I have an ESXi server running on an old desktop machine, and I thought that it would be nice to move that VM to the server and just remote desktop to it.  It would have the added benefit of being able to run the app from one of my other machines.  I learned a few things along the way.

First, the straightforward thing to do would be to create a new virtual machine on the server, install Windows 7, and then install the application.  But like any good lazy programmer, I figured there had to be a better way.  What I _really_ wanted to do was just move my existing image off of my laptop onto the server.  Turns out it’s not very difficult, but there are a few steps and at least one “gotcha”.

First, if you don’t already have it, you need to download the OVF tool from VMWare.  Extract the .tar.gz file and open the *.pkg file to install it.  Then, at the terminal, run a command similar to this:

/Applications/VMware\ OVF\ Tool/ovftool ./Documents/Virtual\ Machines.localized/Windows\ 7.vmwarevm/Windows\ 7.vmx /Documents/ConvertedVM/

This assumes your current working directory is in your home directory, your VM’s are stored in the same place mine are, etc.  ConvertedVM is the directory where it will output the converted VM as an OVF.  Season this recipe to taste.  Now, you can deploy the OVF to your server in the usual way.

As I mentioned before, there is one “gotcha”.  I had recently upgraded to the latest version of VMWare Fusion, and allowed it to upgrade my virtual machine’s “hardware”.  Don’t do that.  As the link describes, once you upgrade to hardware version “10” you can no longer edit the hardware settings of your VM using the Windows vSphere client.  You can edit it with the “web vSphere client”, but apparently that is something that is not available for the free version of ESXi I’m running in my home “lab”.  I needed to change the hardware setting though, because in the migration I lost my network adapter and the Windows application in question needs network access.

I was able to work around it in a fairly brute-force way.  I removed the VM from the ESXi inventory (but did NOT delete the disk), re-created a new Windows VM and reused the existing disk image.  It worked fine, although I did have to reactivate Windows.  In the previous link there is also a workaround mentioned using “PowerCLI”, but I haven’t used that so can’t vouch for the solution.

EXCLUSIVE LIMITED-TIME BONUS TIP!  Gosh, I sure do miss the <blink> tag.  But, I digress.  I’ve been using “Remote Desktop Connection” to access Windows VM’s.  I believe it was installed as part of Office for Mac 2011, or maybe it was something I downloaded from Microsoft many moons ago.  If you’re still using that too, I’ve found that there’s actually a much better free remote desktop application (also from Microsoft) available on the Mac App Store.  Get it now while supplies last!

Leave a Reply

Your email address will not be published. Required fields are marked *