3

I have a host OS running Windows 7 and guest OS running Ubuntu on Virtualbox.

What if I want to "install" my image of Ubuntu virtual machine as ordinary Ubuntu installation. Is it possible and how?

mrgloom
  • 357

2 Answers2

2

It could theoretically be done with a disk cloning utility like CloneZilla. If you first clone your VM's disk to a external disk drive or DVD and then clone it back to your PC's harddisk you would get a disk with your VM on it. You would still have to make it bootable and install Grub into MBR.

There are some issues to keep in mind:

  • You would have to change the partition table to match your internal disk's structure
  • You would probably have to install drivers because the VM hardware doesn't match your physical hardware.

It would probably be a lot easier to do a fresh reinstall of ubuntu.

mtak
  • 17,262
0

You're quite lucky that you have linux since it's far easier to move than windows.

These Steps should work, most drivers are probably already included in Ubuntu:

  1. Boot a live-disk within your VM and copy the content of every partition to a own folder, this can be a shared one, a USB-drive or any other big enough storage device. You can savely ignore swap, if you really need it, just create an empty partition in step 2.
  2. Add the same partitions as your VM has to your hard drive, it doesn't matter if they're extended partitions or which size they have, as long as your data fits on them. It's probably best if you use a live disk with GParted installed, I'd recommend you Linux Mint Mate 14 for it's nice and easy UI and because GParted is included. Watch out if you move the beginning of a windows partition as your windows won't boot anymore (we'll fix that later). Also have a backup for the worst case.
  3. Copy your data to the new partitions (you didn't expect that, huh? ;)
  4. Go to /etc/fstab of your Ubuntu Installation and change the UUID's in there to match your new partition. With GParted you can see them within the partition info dialog. If you neeed further help, check out the Ubuntu Wiki.
  5. Install a Bootloader, i.e. Grub 2 (default for Ubuntu). I'm not gonna post a full explaination here (sorry) as I usually use syslinux with Arch Linux, but if you don't know how to actually do it, check out the Ubuntu Wiki article on Grub 2 again, it's basically the same as fixing a broken Grub 2 installation.

If you're unsure about this, test it in a VM ;)

Good Luck

Sebb
  • 138