Bug #1005

Deployment xml used old standard of libvirt xml

Added by Max Mikheev over 9 years ago. Updated over 9 years ago.

Status:ClosedStart date:11/24/2011
Priority:NormalDue date:
Assignee:Jaime Melis% Done:

0%

Category:Core & System
Target version:Release 3.2
Resolution:fixed Pull request:
Affected Versions:OpenNebula 3.2

Description

Hi,

I am trying to pass some parameters directly to KVM and have issue with this.
The current version of opennebula (3.1.0 - pre release of 3.2) create libvirt xml file which has a first line as:
<domain type='kvm'>.

Libvirt do not recognize some parameters in such xml.
How can I change the first line to this one:
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

I would like to pass following parameters:
<qemu:commandline>
<qemu:arg value='-cpu'/>
<qemu:arg value='host'/>
</qemu:commandline>
When I manually modified the first line libvirt was able to create domain correctly without modification it could not.

Can you give me an information which file in OpenNebulla responsible for xml creation?

Thanks

Associated revisions

Revision cda3e9dc
Added by Jaime Melis over 9 years ago

Bug #1005: Deployment xml used old standard of libvirt xml

History

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

The file is in src/vmm/LibVirtDriverKVM.cc line 107:

file << "<domain type='" << emulator << "'>" << endl;

Which version of libvirt are you using? My main concern is if this change would be compatible with older versions of libvirt

Thanks!

Ruben

#2 Updated by Max Mikheev over 9 years ago

Hi Ruben, It was a quick answer. Thanks!

I am using 0.9.7 but You can specify custom QEMU commandline arguments since libvirt 0.8.3.

Thanks

#3 Updated by Max Mikheev over 9 years ago

I found this modification in the forum: http://comments.gmane.org/gmane.comp.emulators.virt-tools/398

The solution was proposed in September 2010. It means that this line worked with more than one year old libvirt.

This modification can be included into main branch for OpenNebula or It could be a parameter in the vmm_exec_kvm.conf.

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

OK Thanks for the info, if it does not harm I prefer to include it in the driver.

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

  • Category set to Core & System
  • Status changed from New to Assigned
  • Assignee set to Jaime Melis
  • Target version changed from Release 3.4 to Release 3.2

#6 Updated by Jaime Melis over 9 years ago

  • Status changed from Assigned to Closed
  • Resolution set to fixed

Tested VMs with the modified libvirt domain file and works ok. Pushing the commit.

Also available in: Atom PDF