2009-08-25

Convert vmware machine to virtualbox 3.x

Today I found a nice vmware appliance that was only available as a vmware image. But I dissed vmware server and workstation a long time ago (except fusion) and try to make use of virtualbox.

But virtualbox lacks a lot of things but this is how I was able to move that appliance to virtualbox:

1) the appliance came with the following files:

.nvram
.vmdk
.vmsd
.vmx
.vmxf

2) I started virtualbox and imported the .vmdk

This is really great: Virtualbox can handle .vmdk natively!

3) I opened the .vmx in an editor (for me that means vim) and extracted:

scsi0.virtualDev = "lsilogic"
guestOS = "other26xlinux"
memsize = "512"

4) I created (wizard) a new virtualbox machine using:

Linux, Linux 2.6
512MB ram
use existing harddisk, that's where I choose the disk that I imported in step 2

5) Just for fun I started the machine without changing any settings (like SCSI etc.)

I left all the other settings at default and started the machine, but it crashed:

unkown interrupt or fault at EIP 000000060 c0100295 00000294

and that messages appeared endlessly.

I could not see the previous messages besides uncompressing linux ..... it was too fast.

6) I stopped the machine using HOST+Q then select stop

7) Ok now here come the changes that I should have done before, but I list them here in separate steps.

7.1 Under System -> Processor: check -> Enable PAE/NX


This fixed the unknown interrupt message thing (but the machine would still reboot after the inital steps)

7.2 Under Hard Disks -> Enable Additional Controller->SCSI(Lsilogic)
7.3 and change the attachments-> Slot -> to SCSI Port 0

Now I was able to boot and the system started nicely. But no network!!!

8) vmxnet: Device in slot 0000:00:03.0 is not supported by this driver.
vmxnet: probe of 0000:00:03.0 failed with error -16

Now I immediately new that was bad news and I had to try to get this machine to accept the new network adapter.

The default adapter that virtualbox 3.04 on my machine at least:
PCnet-FAST III (NAT)

I read on a webpage that Intel PRO/1000 MT Desktop would be a better choice.

So I changed it to Network ->Adapter 1-> Adapter Type: Intel PRO/1000 MT Desktop (8254OEM), NAT was ok for me.

9) Still no networking, eth0: error fetching interface information: Device not found

Ok, now I did not really now what kind of distribution it was and I needed to have a look at the network config etc.

9.1) I saw that it was Grub but it looks like it has a timeout=0, because it only displayed the menu very very quickly.

I have not found out how to stop Grub from continuing. Even after 10 times of Host+R

Hitting escape as it was said here did not work:

Occasionally, GRUB requires some simple intervention. Perhaps a new kernel isn’t working correctly with your system or maybe you want to bring the system into a different runlevel than the default. Hit the ESCAPE key to interrupt the GRUB countdown and bring up GRUB’s main menu.

Maybe someone knows how to stop that thing.

9.2) Ok to access the files I used ubuntu-9.04-desktop live iso cd which I added to virtualbox library and then under CD/DVD-ROM -> mount -> iso image file -> ubuntu-9.04-desktop-i386.iso

9.3) I quickly checked the boot order under System->Motherboard->Boot Order and noticed that the default is Floppy-CD/DVD-ROM-HardDisk-Network. That was fine.

10) Live ISO cd running and with ubuntu I just clicked on Places->Home Folder and selected the 4GB Disk it listed. This mounted the hard disk as /media/disk read/write and I did not even have to search for which disk and what parameters to use mount with

11) Using the terminal I checked if there is a configuration like on red hat or on debian but it was not!

12) In /etc/modprobe.conf I found the following statement:

alias eth0 vmxnet

this I changed into

alias eth0 e1000

13) I also changed /boot/grub/menu.lst  timeout=30 just so I can enter single user mode

But on that machine I could not just add Single at the end of kernel but had to use init=/bin/bash



Finally, the vmware appliance ran on virtualbox!!!

1 comment:

Anonymous said...

Arghhh ! How to say that ? Maybe only simply : Thank you so much you just solved my problem.
Best Regards.