Get rid of overspecification in vm.xml.

We don't need to pass the appropriate qemu binary into the vm template,
as libvirt will inject the proper one for us.  Similarly, we don't need
to tell libvirt what specific model of PC hardware to emulate, because
it will pick one that is appropriate to the devices we specify.

Change-Id: Id3762cce9b2ba9f96c1e7e79fad9a4bf8770bf7a
This commit is contained in:
Victor Lowther 2014-05-16 11:53:38 -05:00
parent acef724063
commit b1fe0defba
2 changed files with 1 additions and 9 deletions

View File

@ -82,12 +82,6 @@ def main():
# Configure the bus type for the target disk device
params['diskbus'] = args.diskbus
if os.path.exists("/usr/bin/kvm"): # Debian
params['emulator'] = "/usr/bin/kvm"
elif os.path.exists("/usr/bin/qemu-kvm"): # Redhat
params['emulator'] = "/usr/bin/qemu-kvm"
nicparams = {
'nicdriver': args.libvirt_nic_driver,
'bminterface': args.baremetal_interface,
@ -138,4 +132,3 @@ def main():
if __name__ == '__main__':
main()

View File

@ -3,7 +3,7 @@
<memory unit='KiB'>%(memory)s</memory>
<vcpu>%(cpus)s</vcpu>
<os>
<type arch='%(arch)s' machine='pc-1.0'>hvm</type>
<type arch='%(arch)s'>hvm</type>
<boot dev='%(bootdev)s'/>
<bootmenu enable='no'/>
</os>
@ -17,7 +17,6 @@
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>%(emulator)s</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='unsafe'/>
<source file='%(imagefile)s'/>