Migrate Ubuntu 10.04 installed on Machine to .VDI for Virtual Box HDD

1

I was using a Sony laptop with Ubuntu 10.04 installed on the machine. I have just bought a Mac and I will be using Ubuntu 10.04 as my primary development OS by virtualizing it using VirtualBox.

Now, my requirement is, I had a near perfect development environment setup on my Ubuntu box and I don't want to install the packages, apps, setting etc again on my VirtualBox VM. I know there are ways to export apps, setting etc, but is there some app which will actually create a VDI disk for my VirtualBox which, when I plug in to my VirtualBox, I will get the old Ubuntu on my VM.

zengr

Posted 2010-06-24T07:12:07.763

Reputation: 1 334

Answers

0

I think Remastersys will be the best option, since it will run as an app in Ubuntu.

Doc on Remastersys

zengr

Posted 2010-06-24T07:12:07.763

Reputation: 1 334

This works, its the easiest way to do it!!!! – zengr – 2010-06-25T07:09:03.063

1

The way I would do this is a variant on the above method.

  1. Use clonezilla to take an image of the Ubuntu Machine
  2. Move this image to a location accessible to the as-yet uncrated virtual machine. (I would put this on a secondary hard disk attached to the VM)
  3. Use clonezilla in the virtual machine to restore the image from the secondary hard disk to the one you want to use.

I'm in the current process of writing a tutorial for doing this with a Windows Machine but it will work for Ubuntu too.

tombull89

Posted 2010-06-24T07:12:07.763

Reputation: 6 533

0

  1. Shutdown linux machine.
  2. Use Clonezilla (or any livecd, using dd [google dd for more details] ) to get the image of the harddisk.
  3. Get the file to your macos and add the file to the virtualbox
  4. delete /etc/udev/rules.d/70-persistent-net.rules as the MAC address of the network card has changed (apparantly)

bubu

Posted 2010-06-24T07:12:07.763

Reputation: 9 283

the key here is to take the machine offline before you try to migrate the installation. – bubu – 2010-06-24T07:34:43.613

Will try that out – zengr – 2010-06-24T07:41:32.877

So, the output of Step2 will be a .ISO? If yes, then how will that convert to .VDI? – zengr – 2010-06-24T07:49:49.713

I don't think so. You will get something like an .img file. For the matter, the vboxmanage command will help you to convert it into .vdi – bubu – 2010-06-24T08:00:28.873

What do you think about Remastersys? – zengr – 2010-06-24T19:17:17.753