Guido Winkelmann
2010-May-31 15:52 UTC
[libvirt-users] Qemu driver not supporting VIR_DOMAIN_DEVICE_MODIFY_CONFIG yet?
Hi, According to the docs on http://libvirt.org/html/libvirt-libvirt.html#virDomainDetachDeviceFlags I ought to be able to do virDomainDetachDeviceFlags( <domain>, <devicexml>, VIR_DOMAIN_DEVICE_MODIFY_LIVE | VIR_DOMAIN_DEVICE_MODIFY_CONFIG); to detach a volume both from a currently running VM instance and permanently from the defined config file. If I actually try that, though, I'm getting this error: libvir: QEMU error : Requested operation is not valid: cannot modify the persistent configuration of a domain The same thing happens whether or not the domain is running and also happens if I leave out the "VIR_DOMAIN_DEVICE_MODIFY_LIVE" part. Does the qemu driver simply not support VIR_DOMAIN_DEVICE_MODIFY_CONFIG yet (libvirt 0.8.1), or is there some other problem here? Guido
Cole Robinson
2010-Jun-01 16:29 UTC
[libvirt-users] Qemu driver not supporting VIR_DOMAIN_DEVICE_MODIFY_CONFIG yet?
On 05/31/2010 11:52 AM, Guido Winkelmann wrote:> Hi, > > According to the docs on > http://libvirt.org/html/libvirt-libvirt.html#virDomainDetachDeviceFlags > I ought to be able to do > > virDomainDetachDeviceFlags( > <domain>, > <devicexml>, > VIR_DOMAIN_DEVICE_MODIFY_LIVE | VIR_DOMAIN_DEVICE_MODIFY_CONFIG); > > to detach a volume both from a currently running VM instance and permanently > from the defined config file. > > If I actually try that, though, I'm getting this error: > > libvir: QEMU error : Requested operation is not valid: cannot modify the > persistent configuration of a domain > > The same thing happens whether or not the domain is running and also happens > if I leave out the "VIR_DOMAIN_DEVICE_MODIFY_LIVE" part. > > Does the qemu driver simply not support VIR_DOMAIN_DEVICE_MODIFY_CONFIG yet > (libvirt 0.8.1), or is there some other problem here? >Sounds like you are doing things right, this just isn't implemented for the qemu driver yet. To make a persistent change, you will have to edit the domain XML, remove the device, and redefine the domain. - Cole
Reasonably Related Threads
- [PATCHv11 0/6] libvirt/qemu - persistent modification of devices
- [PATCH 1/2] libvirt/qemu : allow persistent modification of disks via A(De)ttachDeviceFlags
- what a correct use for virConnectDomainEventRegisterAny API, how to Obtain a stable expected result
- Detaching device behaviour
- Re: what a correct use for virConnectDomainEventRegisterAny API, how to Obtain a stable expected result