block: fix handling non-dom0 backend
The libvirt XML config syntax was changed - the element is named <backenddomain/>.
This commit is contained in:
parent
b10cead867
commit
a6448e073c
@ -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"):
|
||||
|
Loading…
Reference in New Issue
Block a user