mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 01:34:11 +03:00
Selectively ignore domainSetSecurityAllLabel failure in domain restore
When the saved domain image is on an NFS share, at least some part of domainSetSecurityAllLabel will fail (for example, selinux labels can't be modified). To allow domain restore to still work in this case, just ignore the errors.
This commit is contained in:
parent
f35a9fc164
commit
06f81c63eb
@ -3428,8 +3428,10 @@ static int qemudStartVMDaemon(virConnectPtr conn,
|
||||
DEBUG0("Generating setting domain security labels (if required)");
|
||||
if (driver->securityDriver &&
|
||||
driver->securityDriver->domainSetSecurityAllLabel &&
|
||||
driver->securityDriver->domainSetSecurityAllLabel(vm, stdin_path) < 0)
|
||||
driver->securityDriver->domainSetSecurityAllLabel(vm, stdin_path) < 0) {
|
||||
if (virStorageFileIsSharedFS(stdin_path) != 1)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Ensure no historical cgroup for this VM is lying around bogus
|
||||
* settings */
|
||||
|
Loading…
Reference in New Issue
Block a user