mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
qemu: hotplug: Detect disk backing images before setting up security access
The VM will require access also to the detected images. Unfortunately a
recent reordering of the code introduced a bug where the backing chain
was probed after setting up cgroups/selinux/namespaces, which caused
that any detected images were not allowed/added and qemu was then not
able to use them.
Fixes: 9b8bb536ff
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a6fec3881c
commit
94f1883c89
@ -1001,17 +1001,17 @@ qemuDomainAttachDeviceDiskLiveInternal(virQEMUDriver *driver,
|
||||
goto cleanup;
|
||||
|
||||
if (!virStorageSourceIsEmpty(disk->src)) {
|
||||
if (qemuDomainStorageSourceChainAccessAllow(driver, vm, disk->src) < 0)
|
||||
goto cleanup;
|
||||
|
||||
releaseSeclabel = true;
|
||||
|
||||
if (qemuDomainPrepareDiskSource(disk, priv, cfg) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (qemuDomainDetermineDiskChain(driver, vm, disk, NULL) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (qemuDomainStorageSourceChainAccessAllow(driver, vm, disk->src) < 0)
|
||||
goto cleanup;
|
||||
|
||||
releaseSeclabel = true;
|
||||
|
||||
if (qemuProcessPrepareHostStorageDisk(vm, disk) < 0)
|
||||
goto cleanup;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user