Currently, libvirt is not support device operations for lxc. This is a patch that add device operations support for libvirt 0.10.2. 1. lxcDomainAttachDevice 2. lxcDomainAttachDeviceFlags 3. lxcDomainDetachDevice 4. lxcDomainDetachDeviceFlags 5. lxcDomainUpdateDeviceFlags In live mode, set devices.allow/deny to instance's cgroup and insert disk config into current domain. In config mode, just insert disk config into current domain. This is part of 'Fix up attach/detach volume for nova (openstack)'.
Created attachment 632064 [details] Add device operations support for libvirt lxc.
Please post this patch to the upstream list, libvir-list, for faster review. Not all the list participants actively follow bugzilla for patches.
attach/detach device was eventually added upstream for lxc