mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
qemu: do not attempt to pass unopened vsock FD
On normal vm startup, we open a file descriptor for the vsock device in qemuProcessPrepareHost. However, when doing domxml-to-native, no file descriptors are open. Only pass the fd if it's not -1, to make domxml-to-native work. https://bugzilla.redhat.com/show_bug.cgi?id=1777212 Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
d1f291b4c3
commit
0b1da01ef2
@ -9717,7 +9717,8 @@ qemuBuildVsockCommandLine(virCommand *cmd,
|
||||
if (!(devprops = qemuBuildVsockDevProps(def, vsock, qemuCaps, "")))
|
||||
return -1;
|
||||
|
||||
virCommandPassFD(cmd, priv->vhostfd, VIR_COMMAND_PASS_FD_CLOSE_PARENT);
|
||||
if (priv->vhostfd != -1)
|
||||
virCommandPassFD(cmd, priv->vhostfd, VIR_COMMAND_PASS_FD_CLOSE_PARENT);
|
||||
priv->vhostfd = -1;
|
||||
|
||||
if (qemuCommandAddExtDevice(cmd, &vsock->info, def, qemuCaps) < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user