Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We recently go an VMware ESX Server. No I tried, using the Converter from VMware, to convert smaller physical servers to virtual servers.

Unfortunately, thats not easy. First, I got the problem that the converter does not suport Grub2, so I had to boot from the iso in order to fix the bootloader. Afterwards, I could boot into grub, but grub told me he can not find the root-disk UUIDxxxxxxxxxxxxxxx. I can see the problem (UUID of hard drives have changed), but not the solution (tried root=/dev/sda1 instead of root=UUIDxxxxxxxxxxxxxx).

Does anyone have successfully converted a 11.10 to virtual, and if yes: how to I fix this problem, and how many other problems will I have to face afterwards?


share|improve this question

I was able to figure out how to do the reverse of this and go from a VirtualDisk to a hard disk (with the help of SuperUser, and the reverse of this should work.

First, DD your hard drive to a file while booted from a separate drive (say, booted in Live mode on your Ubuntu install disk). The file will be the size of the hard disk, but will be smaller later. For now, you need to create it onto a larger drive - sorry. (For instance, DD a 500GB hard disk onto an external hard disk with at least 500GB free). You could also try using GParted to shrink the partition with Ubuntu on it to around the max size you want your virtual drive to be.

For instance, the command would be sudo dd if=/dev/hda of=/media/ExternalHardDisk/rawimage.img or replace /dev/hda with /dev/hda1 for just the partition.This assumes that your hard disk is at /dev/hda (and the partition you want is /dev/hda1), which can be checked using the Disk Utility (palimpsest in the terminal) or in GParted while booted there, and that you mounted your external drive as /media/ExternalHardDisk/ (probably replace ExternalHardDisk.) DO NOT run these commands without first checking what drives are what on your currently booted system - they may change between when you are started in Ubuntu from your hard drive and when you start GParted or your Ubuntu live CD.

From here, our procedures may differ slightly. I use Sun (Oracle) VirtualBox, so I would use the VBoxManage command in the terminal to clone rawimage.img to a vdi image with VBoxManage convertfromraw /media/ExternalHardDisk/rawimage.img ~/virtualbox_image.vdi --format VDI. You could also try formatting to VMDK or VHD and changing the extension accordingly if any of these will work better for you. I can't help you from here, sadly, but VMWare should at least be able to import one of these or the raw image we created earlier. Or, "Just create a new virtual machine, and when the wizard gets to the step for hard drive(s), just say "use existing" instead of "create new", and point to the vmdk file you have."

share|improve this answer
Thanks Andrew. Copying the content isn't the problem. The converter can to this. My problem is to get the already copied HDD to boot. How did you got grub working after the migration? Didn't you get that UUID problem? – Thomas Deutsch Mar 6 '12 at 13:22
I haven't actually done this, I've done the same thing in the exact opposite direction. Did you try just copying out the partition? – Andrew Mar 6 '12 at 13:47
up vote 1 down vote accepted

I followed almost 1:1 those steps here:

This way, I was successful.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.