Request #356

Defining disk driver type in Libvirt XML

Added by Rangababu Chakravarthula almost 11 years ago. Updated over 10 years ago.

Status:ClosedStart date:09/30/2010
Priority:NormalDue date:
Assignee:Ruben S. Montero% Done:

0%

Category:-
Target version:Release 2.0.1
Pull request:

Description

We are using One 1.4 with KVM

When we were using Libvirt 0.7.5, here is how the Disk definition in VM template, deployment.0 and actual libvirt generated XML were looking.

VM Template:

DISK=[
clone=no,
source=/sharedstorage/path/images/UbuntuABC0,
target=hda,
type=disk
]

deployment.0 :

<disk type='file' device='disk'>
<source file='/mnt/stor/one/5/images/disk.0'/>
<target dev='hda'/>
</disk>

libvirt generated XML:
<disk type='file' device='disk'>
<source file='/mnt/stor/one/5/images/disk.0'/>
<target dev='hda' bus='ide'/>
<state/>
</disk>

However when we were using libvirt 0.8.3 the libvirt generated XML looks different.

libvirt generated XML:
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/mnt/stor/one/5/images/disk.0'/>
<target dev='hda' bus='ide'/>
<alias name='ide0-0-0'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>

If you see it adds the driver tag with type as "raw". Because of this, if we have a qcow2 disk file of 20GB virtual size, the actual disk space inside the VM is showing up as some other value (the physical size of the qcow2 image).

Is it possible to pass the driver tag from onevm template? If we have to add that tag and have the driver type as "qcow2", changing LibvirtDriver.cc will take care of it?

Ranga

Associated revisions

Revision b6d4a7a9
Added by Ruben S. Montero over 10 years ago

feature #356: Disk format can be now specified for KVM using the driver attribute, also this is supported for CONTEXT

Revision 317c30d7
Added by Ruben S. Montero over 10 years ago

feature #356 #348: Support for the DRIVER attribute in the Image repository

Revision 47b0cf39
Added by Ruben S. Montero over 10 years ago

feature #356: Disk format can be now specified for KVM using the driver attribute, also this is supported for CONTEXT
(cherry picked from commit b6d4a7a925300be8a3387c5a112fec6600fb5a3a)

Revision e8e5d2d4
Added by Ruben S. Montero over 10 years ago

feature #356 #348: Support for the DRIVER attribute in the Image repository
(cherry picked from commit 317c30d7f20091bf5266d290690a6489b44566d7)

Revision 75dcfd60
Added by Vlastimil Holer about 4 years ago

B #4821: No traffic shaping in attached NICs (#356)

  • B #4821: Hot-attached KVM NIC with more supported libvirt interface options
  • B #4821: Generate KVM libvirt filter even without IP
  • B #4821: Escape libvirt interface XML parameters
  • Revert "B #4821: Generate KVM libvirt filter even without IP"

This reverts commit 29ef66dc1eb3c1aaa550cb6961e49ad8a6e92f14.

  • B #4821: Support VROUTER_IP in attach_nic filter

History

#1 Updated by Ruben S. Montero over 10 years ago

  • Target version set to Release 2.0.1

#2 Updated by Slava Yanson over 10 years ago

We are having same issue here. Using OpenNebula 2.0 with libvirt 0.7.5

#3 Updated by Ruben S. Montero over 10 years ago

  • Status changed from New to Closed
  • Assignee set to Ruben S. Montero

This is now implemented in the one-2.0 branch

Also available in: Atom PDF