Bug #1399

LibVirtDriverKVM.cc disk attribute bus

Added by Christian Rödel almost 9 years ago. Updated almost 9 years ago.

Status:ClosedStart date:08/02/2012
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Core & System
Target version:Release 3.8
Resolution:worksforme Pull request:
Affected Versions:OpenNebula 3.6

Description

Hi all,
it appears to me there's a bug in LibVirtDriverKVM.cc in the way that a defined bus type for a disk is not written to the deployment file.
I am using opennebula-3.6 on debian stable with current backports for linux-image, libvirt and qemu-kvm. I cannot persuade opennebula to use the virtio driver for any image. Adding bus="virtio" to the template does not render the deployment file containing such an attribute.
A look into LibVirtDriverKVM.cc show that there is a string bus defined in the head in the disk attributes section, but is later on used in the input section exclusively.

some version strings:
opennebula 3.6.0-1
qemu-kvm 1.0+dfsg-8~bpo60+1
libvirt-bin 0.9.12-3~bpo60+1
linux-image-3.2.0-0.bpo.2-amd64 3.2.20-1~bpo60+1

My template in sunstone looks like this:

CPU="1"
DISK=[
BUS="virtio",
IMAGE="Copy of Debian Squeeze - kvm",
IMAGE_UNAME="oneadmin" ]
GRAPHICS=[
TYPE="vnc" ]
MEMORY="512"
NAME="virtio"
OS=[
ARCH="x86_64",
BOOT="hd" ]
RAW=[
TYPE="kvm" ]
TEMPLATE_ID="11"
VCPU="1"

My resulting deployment file looks like this though:
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>one-19</name>
<vcpu>1</vcpu>
<memory>524288</memory>
<os>
<type arch='x86_64'>hvm</type>
<boot dev='hd'/>
</os>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
<source file='/var/lib/one//datastores/0/19/disk.0'/>
<target dev='hda'/>
<driver name='qemu' type='raw' cache='default'/>
</disk>
<graphics type='vnc' port='5919'/>
</devices>
<features>
<acpi/>
</features>

</domain>

No bus='virtio'...Am I missing something here?

Cheers,
Chris

History

#1 Updated by Ruben S. Montero almost 9 years ago

  • Resolution set to worksforme

Hi

It turns out that we had a duplicated information BUS and DEV_PREFIX. We've chosen DEV_PREFIX to specify the BUS (this works for libvirt-KVM and Xen). If you want to use the virtio BUS just set DEV_PREFIX=vd or use a vd target as TARGER=vda...

Ruben

#2 Updated by Ruben S. Montero almost 9 years ago

Ruben S. Montero wrote:

Hi

It turns out that we had a duplicated information BUS and DEV_PREFIX. We've chosen DEV_PREFIX to specify the BUS (this works for libvirt-KVM and Xen). If you want to use the virtio BUS just set DEV_PREFIX=vd or use a vd target as TARGER=vda...

Ruben

This is described in http://opennebula.org/documentation:rel3.6:compatibility, check it out for other changes

#3 Updated by Christian Rödel almost 9 years ago

Thank you a lot, Ruben, that fixed it for me :)

#4 Updated by Ruben S. Montero almost 9 years ago

  • Target version set to Release 3.8

#5 Updated by Ruben S. Montero almost 9 years ago

  • Status changed from New to Closed

Also available in: Atom PDF