[CentOS-virt] Trouble with virtio storage

Wed Feb 2 17:28:56 UTC 2011
Vladimir Vuksan <vlists at veus.hr>

I am trying to get a custom Centos 5 image going under Openstack Nova (a
cloud framework). Trouble I have is that for whatever reason virtio storage
doesn't work for me. For example if the VM is started using these options

    <os>
            <type>hvm</type>
           
<kernel>/opt/nova-state/instances/instance-00000045/kernel</kernel>
                <cmdline>root=/dev/vda console=ttyS0</cmdline>
               
<initrd>/opt/nova-state/instances/instance-00000045/ramdisk</initrd>
    </os>

        <disk type='file'>
            <driver type='qcow2'/>
            <source
file='/opt/nova-state/instances/instance-00000045/disk'/>
            <target dev='vda' bus='virtio'/>
        </disk>

Booting fails

Creating root device.
Mounting root filesystem.
mount: could not find filesystem '/dev/root'

If I then destroy the VM, change root to be /dev/sda and target dev=sda
with bus=ide things boot properly. Kernel and ramdisk being used to boot
are these

vmlinuz-2.6.18-194.26.1.0.1.el5
initrd-2.6.18-194.26.1.0.1.el5.img

I even tried Oracle's 2.6.32 kernels with same results.

Underlying host OS is Oracle EL 5.5

Any clues ?

Vladimir