block: fix handling non-dom0 backend

The libvirt XML config syntax was changed - the element is named
<backenddomain/>.
This commit is contained in:
Marek Marczykowski-Górecki 2015-04-04 16:18:10 +02:00
parent b10cead867
commit a6448e073c

View File

@ -415,7 +415,7 @@ def block_attach(qvmc, vm, device, frontend=None, mode="w", auto_detach=False, w
SubElement(disk, 'source').set('dev', device['device'])
SubElement(disk, 'target').set('dev', frontend)
if backend_vm.qid != 0:
SubElement(disk, 'domain').set('name', device['vm'])
SubElement(disk, 'backenddomain').set('name', device['vm'])
vm.libvirt_domain.attachDevice(etree.tostring(disk, encoding='utf-8'))
def block_detach(vm, frontend = "xvdi"):