diff --git a/virtcontainers/qemu.go b/virtcontainers/qemu.go index 694db22cf1..035ae00ab6 100644 --- a/virtcontainers/qemu.go +++ b/virtcontainers/qemu.go @@ -638,6 +638,10 @@ func (q *qemu) setupVirtiofsd() (err error) { var listener *net.UnixListener var fd *os.File + if _, err = os.Stat(q.config.VirtioFSDaemon); os.IsNotExist(err) { + return fmt.Errorf("virtiofsd path (%s) does not exist", q.config.VirtioFSDaemon) + } + sockPath, err := q.vhostFSSocketPath(q.id) if err != nil { return err