Archive for VMWare

VMware Magic - Live conversion of a physical Linux machine to a virtual machine!

// August 12th, 2009 // No Comments » // Linux, Tools, Troublesolving, Ubuntu, VMWare

I can’t tell you how many times VMware has amazed me throughout the years. It (and others like Microsoft Virtual PC) has come a long way in the recent years due to the increasing popularity and demand of virtualization solutions. I use virtual machines every day. At home I have VMware Fusion on my Macs for the occasional excursion into Windows and at work we use it both on our servers and I personally use it on my desktop to try out new things like Win7. OK, enough of praise for virtual machines. You are probably already sold on them yourself!

I am in the process of reconfiguring my “server stack” at home. My primary server is a Linux (Ubuntu) machine that I’m going to do terrible things to. I’m going to install Windows Home Server (WHS) on it!? This is mostly for the very cool feature “Drive Extender” that let’s you combine a bunch of hard drives into a single partition and still have a acceptable level of redundancy. To my knowledge there is no other solution quite like it. RAID can be good in some instances, but I want to try WHS and Drive Extender. But since the Linux machine is my primary server running a lot of important stuff I need it to be available 24/7. I will also need it even if I decide to keep the WHS as my primary server since I don’t want to convert all my Linux stuff to Windows.

So I set out to see if there was anyway I could convert the physical Linux machine into a virtual machine, with no downtime on the Linux machine. Enter the very cool product “VMware Converter”! This is free software from VMware, and with it I should be able to convert my live running machine into a virtual ditto with no downtime! That almost sounded to good to be true, and for some parts it was! :-)

I started by installing VMware Converter on my Linux machine. This posed no problems at all. I fired it up and selected my Linux machine as the source and tweaked a few settings. But when I got to the “choose destination” part of the conversion I hit a brick wall. It turns out you need a VMware ESX server as the destination to be able to do a live conversion of a running Linux machine. You can’t do the conversion into VMware Server or just into a VMware image. I honestly don’t know the reasons for this. Perhaps VMware just want it to be a “enterprise” feature (and make you pony up some cash). Anyway, I was about to give up at this point. Then I discovered that there is a free version of ESX called ESXi. Since I had never tried to set up an ESX server, and it was free, I decided to give it a shot and try to install it. By the way, VMware ESX is a product that runs nativly on your hardware without any operating system. You can then run virtual machines on the ESX server.

To install ESX you need a separate server. I have lots of old computers lying around, so I choose one of them and tried to install ESXi. First problem was that ESXi only supports 64bit systems. So I had to download an older version that supported 32bit. It then quickly turns out that ESX needs at least 1 gig of RAM, and my old horse only had 0.5. So I picked another computer that had 3 gig of RAM. This was a DELL machine, and ESX started to whine about a BIOS setting called “CPUIDLimit”. Apparently it wanted me to change this setting, but the DELL BIOS hides it. 10 minutes of google and some headache solved that problem. Basically you need to halt the boot sequence of ESX and enter the parameter nocheckCPUIDLimit. After that, everything installed just fine. I now had my first ESX server up and running!

From here on it was a simple process! I just fired up VMware Converter, selected the running Linux machine as the source and the ESX server as the destination and everything went perfectly.

If you have yet to try the stuff described in this post I can really recommend diving into it! Best of luck and keep Google (or perhaps Bing?) close by and all should be well. :-)

Using Visual Studio 2010 CTP with VMWare

// April 30th, 2009 // No Comments » // .Net, VMWare, Visual Studio

I recently need to run Visual Studio 2010 October 2008 CTP with VMWare since Microsoft Virtual PC can’t handle USB at all. For my company that is a big limitation since we have hardware locks that sits in the USB port. VMWare to the rescue!

Step one is to convert the Virtual PC image to an VMWare image. Luckily that’s an fairly easy process, if you are a lucky owner of VMWare Workstation. If not, there is a free converter tool to download from the VMWare site, but I have not tried that one for myself since I have VMWare Workstation here. Follow these steps to convert the image:

1. File -> Import or Export -> Next -> Next
2. Source Type = Other -> Next
3. Virtual Machine = select the VPC image -> Next -> then wait, takes a while
4. Source Data = Convert all disks and maintain size -> Next -> Next
5. Destination = Other Virtual Machine -> Next
6. Virtual Machine Name = whatever -> Location = Choose path -> Next
7. Import and convert (full clone) -> Next -> then wait, takes a while
8. Bridged network -> Next -> Next
9. Finish!
10. Wait for the conversion to complete. Mine took around 30 min.

Ok, that wasn’t too hard, eh? Most of the steps are the default values in the wizard. So, now we have a shiny new VMWare image ready to boot. And it will boot just fine. The “minor” problem is that the CTP expired Jan 1 2009. WT*? And there is no new CTP out yet, so what to do? You need to set back the date in the image and make sure that neither VMWare nor Vista override that setting with automatic synchronization of the date and time. After a LOT of googling and finugeling and trickery I finally got it right. Find the .vmx file for you VMWare image and add the following lines:

rtc.startTime = 1226188800
tools.syncTime = "FALSE"
time.synchronize.continue = false
time.synchronize.restore = false
time.synchronize.resume.disk = false
time.synchronize.resume.memory = false
time.synchronize.shrink = false
time.synchronize.tools.startup = FALSE

Make sure you don’t have duplicate entries. If you do, VMWare will whine when you try to boot. The cryptic number 1226188800 is a UNIX timestamp that equals Nov 09 2009, which is well within the expiration limits for the CTP.

Only a few more things to be aware of, then you should be all set. After you boot, go into the date and time settings in Vista and make sure that the “internet time synchronization” is turned off. Install VMWare tools (if it is not already there) and then go to it’s settings and double check that the time synchronization is turned off there too.

Phew! If you carefully followed the steps outlined here you will be able to run the CTP for ETERNITY! Why anyone would actually do that is beyond me, but hey, who am I to judge?

If this helped you in any way, please let me know in the comments. Thanks!