lib: Remove drive hotplugging support

This was a feature that allowed you to add drives to the appliance
after launching it.  It was complicated to implement, and only worked
for the libvirt backend (not "direct", which is the default backend).

It also turned out to be a bad idea.  The original concept was that
appliance creation was slow, so to examine multiple guests you should
launch the handle once then hot-add the disks from each guest in turn
to manipulate them.  However this is terrible from a security point of
view, especially for multi-tenant, because the drives from one guest
might compromise the appliance and thus the filesystems/drives from
subsequent guests.

It also turns out that hotplugging is very slow.  Nowadays appliance
creation should be faster than hotplugging.

The main use case for this was virt-df, but virt-df no longer uses it
after we discovered the problems outlined above.
This commit is contained in:
Richard W.M. Jones
2022-03-08 15:23:19 +00:00
parent 55be87367d
commit 4256737227
16 changed files with 18 additions and 693 deletions

View File

@@ -538,8 +538,8 @@ directly:
non-RHEL
The libvirt backend is more sophisticated, supporting SELinux/sVirt
(see above), hotplugging and more. It is, however, more complex and
so less robust.
(see above) and more. It is, however, more complex and so less
robust.
If you have permissions problems using the libvirt backend, you can
switch to the direct backend by setting this environment variable: