0

I have copied (using dd command) a whole disk of Debian7 VM running on Xen server. I was able to convert the raw image to the kvm format (qemu-img). Than I've created new VM and attached disk image (using KVM). After failed boot attempt (just black screen) I decided to download iso(Debian7) and boot into rescue mode. Using the rescue mode I have reinstalled kernel (3.2.0-4-amd64) and updated initramfs. I also added some lines to /etc/modules:

    alias eth0 pcnet32 
    alias scsi_hostadapter mptbase 
    alias scsi_hostadapter2 mptspi 
    alias scsi_hostadapter3 ata_piix 
    alias scsi_hostadapter4 virtio_blk

Nevertheless, when I attempt to boot all I get is:

   Loading Linux 3.2.0-4-amd64 
   Loading initial ramdisk

I have root access to runnig VM but no access whatsoever to the xen hypervisor

Is there anything I can do to boot this VM on my KVM/virtualbox/ESXi?

Question is marked with VMware tag because finally I am going to put this on VMware. I am using kvm to understand the rules of importing from Xen (para vs virtualization).

EDIT 01.04.2020

Hi Eblock, thank you for your advice. I have followed your article and checked the list of available virtio modules on source VM, which is as follows:

    # find /lib/modules/ -name *virt*
    /lib/modules/3.2.0-4-amd64/kernel/net/9p/9pnet_virtio.ko
    /lib/modules/3.2.0-4-amd64/kernel/drivers/net/virtio_net.ko
    /lib/modules/3.2.0-4-amd64/kernel/drivers/scsi/virtio_scsi.ko
    /lib/modules/3.2.0-4-amd64/kernel/drivers/block/virtio_blk.ko
    /lib/modules/3.2.0-4-amd64/kernel/drivers/virtio
    /lib/modules/3.2.0-4-amd64/kernel/drivers/virtio/virtio_pci.ko
    /lib/modules/3.2.0-4-amd64/kernel/drivers/virtio/virtio_ring.ko
    /lib/modules/3.2.0-4-amd64/kernel/drivers/virtio/virtio.ko
    /lib/modules/3.2.0-4-amd64/kernel/drivers/virtio/virtio_balloon.ko
    /lib/modules/3.2.0-4-amd64/kernel/drivers/char/virtio_console.ko
    /lib/modules/3.2.0-4-amd64/kernel/drivers/char/hw_random/virtio-rng.ko
    /lib/modules/3.2.0-4-amd64/kernel/sound/pci/oxygen/snd-virtuoso.ko

Then I added those virtio modules both to /etc/modules and to /etc/initramfs-tools/modules and updated initramfs with initramfs-update command (in rescue mode). Now my KVM-guest Debian VM (currently run in rescue mode from CD) shows loaded modules (pic below, unfortunately its not possible to copypaste text from KVM screen):

loaded modules

Yet, still no luck booting up VM :( All I get is:

    Decompressing Linux... Parsing ELF    Done
    Booting the kernel...

Anything else I should try? Compiling kernel with built-in virtio modules?

3
  • Search for more modules with virtio and add them to the initrd. I wrote a blog article about this with regards to OpenStack. That worked for us quite smoothly.
    – eblock
    Mar 31, 2020 at 9:55
  • Hm, we had newer kernels than you do, maybe that could be a problem, I'm not sure. Hopefully someone else can chime in.
    – eblock
    Apr 1, 2020 at 10:23
  • eblock, you were right:) Apr 1, 2020 at 21:38

1 Answer 1

0

All is well, VM boots up starting all services (quite a few) properly. Turns out, that eblock was right: adding modules to kernel and initrd was enough. One missing part was ttyS0 instead of tty0 configured in grub ("the xen way" as xen connects via 'S' ports) which was the cause for lack of usual listing of boot steps. There was also a problem with too quick mingetty respawn (resulting in endless '5 min delays') so I switched to tty in /etc/inittab:

    1:2345:respawn:/sbin/getty tty1
    2:2345:respawn:/sbin/getty tty2
    ....

All is well, thank you eblock

1
  • Great, I'm happy I could help!
    – eblock
    Apr 2, 2020 at 6:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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