From real machine to virtual box

i need to put my nethserver installation to a virtual box machine. i followed this guide http://askubuntu.com/questions/34802/convert-my-physical-operating-system-to-a-virtualbox-disk to make a .vdi file for virtual box.
but after booting machine in virtual box i receive a kernel panic. this:


why? there is a solution or trick to resolve my problem?

First of all, IMVHO, there’s no need to clone a linux box into a virtual machine… just backup your data, setup your VM and restore… you’re done

anyway, you’ve to recreate kernel image…

something like

s /boot/initrd-*.img | sed ‘s,.initrd-(.).img,\1,’ | while read initrd; do mkinitrd -f /boot/initrd-$initrd.img $initrd; done

should do the trick…

you need to boot your VM from your ISO and enter rescue mode

HTH

That might be a driver problem, did you tried g4l? its a clone tool link
ghost

well… form real to VM is a clear (and big) hw/driver issue… hw is completely different :smiley:

anyway, cloning a linux server is useless and prone to problems

how is possible this?

I use nethserver like domain controller. i tried to reinstall into VM and make a new domain controller with the same name, but the client don’t connect…

you need to RESTORE your data…

you can’t expect things to work in such way…

google for “domain SID” and you’ll will understand why :slight_smile:

You could try with dd or clonzilla to clone your partition

Those kind of error mightbe link with your virtual hardware
did you pay attention about the

  • number of processor, type of paravirtualization (less true with linux but)
  • controller of harddrive (exemple : now it’s a SATA and it was a SCSI before)

you could also try with a P2V like
https://www.vmware.com/fr/products/converter
VirtualBox is able to read VMDK

let me say: “no, don’t use dd or clonezilla”

NS relies completely on db, fragments and templates… once you restore a full backup on a clena new install, you’re done (you have to install additional packages, of course)

using clonig tools on NS, where you’re using sw raid and lvm is useless and likely a PITA.

2 Likes

Hi,

… I know, how old the thread is - but as a reference it might be helpful …

I had the problem in another scenario. HAt to clone a centos 5.4 from xen to vshpere.
Centos is a nightmare for cloning :frowning:
I “found out” the hard way, that my way of partitioning the harddisk was not compatible
with the way the Installer did it - dont ask my why. I did it with debian for 1001 times without
any problems.

My solution was:
Running a complete Installation von Centos, booting to a LiveCD, deleting all files of the
installation, rsync all the files from the original installation (booted from a liveCD, too, so
the databases, … do not become inconsistent)

Then a chroot, reinstall grub and it was running again.

( as long as the rescue-cd is not able to mount your partitions to /mnt/sysimage you don’t
even have a chance to get the thing running)

regards
wolfgang