1

I converted qcow2 image to raw and changed I/O bus to VirtIO for a VM. now I can't boot that VM. I Installed VirtIO driver with following command:

mkinitrd --with virtio_pci --with virtio_blk -f /boot/initrd-$(uname -r).img $(uname -r)

and these are related kernel modules:

virtio_balloon         11329  0
virtio_blk             11593  3
virtio_pci             11845  0
virtio_ring             8513  1 virtio_pci
virtio                  9541  3 virtio_balloon,virtio_blk,virtio_pci

and this is what happens during boot-up.

enter image description here

I also changed /boot/grub/device.map from "(hd0) /dev/sda" to "(hd0) /dev/vda"

but problem still exists. any ideas how to fix this ?

This is my default option to boot:

title CentOS (2.6.18-308.13.1.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-308.13.1.el5 ro root=/dev/VolGroup00/LogVol00
        initrd /initrd-2.6.18-308.13.1.el5.img
Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
Zim3r
  • 1,384
  • 5
  • 23
  • 45

2 Answers2

2

The problem here is that the virtual machine can't seem to see its own hard drive.

No volume groups found

You should do only one change at a time, so that if something breaks, you know what it is. Instead, you tried to change two things at the same time, so you can't be sure if it was changing the disk format or trying to get the installed system converted to virtio.

Start over from the beginning (with the original qcow2 image) and change only one thing at a time so that you can be sure of what's going wrong.

Also note that CentOS 5.8 can be installed directly to a virtio disk. You may find it easier to install a new virtual machine and transfer your data from one virtual disk to the other, or better yet use the installation DVD to update your existing virtual machine.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
  • Really Thanks, I should say each one of these two things work fine separately, but mixing them (virtio+raw) will break. – Zim3r Sep 04 '12 at 19:13
0

Check your kernel parameters, particularly root= option. Try to use FS label.

GioMac
  • 4,444
  • 3
  • 24
  • 41
  • Thanks for your help, I added parameters to my question. Is there anything wrong? – Zim3r Sep 04 '12 at 15:11
  • 1
    hm. yeah, lvm... can you please check config file of your kernel in /boot/ for following? CONFIG_SYSFS_DEPRECATED=y CONFIG_SYSFS_DEPRECATED_V2=y https://www.google.ge/webhp?sourceid=chrome-instant&ie=UTF-8&ion=1#hl=en&output=search&sclient=psy-ab&q=CONFIG_SYSFS_DEPRECATED%20lvm&oq=&gs_l=&pbx=1&fp=62c14efe74c40a37&ion=1&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&biw=822&bih=456 – GioMac Sep 05 '12 at 12:27
  • Thanks, I don't really know what to look for. can you please provide more information? – Zim3r Sep 08 '12 at 08:52
  • ll /boot;zcat /boot/*config|grep SYSFS_DEP – GioMac Sep 12 '12 at 07:52