Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion vmrunner/vmrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,9 @@ def init_virtiocon(self, path):

def init_virtiofs(self, socket, shared, mem):
""" initializes virtiofs by launching virtiofsd and creating a virtiofs device """
if not os.path.exists(shared):
raise Exception("Shared directory for VirtioFS does not exist")

virtiofsd_args = ["virtiofsd", "--socket", socket, "--shared-dir", shared, "--sandbox", "none"]
self._virtiofsd_proc = subprocess.Popen(virtiofsd_args, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) # pylint: disable=consider-using-with

Expand All @@ -538,7 +541,7 @@ def init_virtiofs(self, socket, shared, mem):
info("Successfully started VirtioFSD!")

while not os.path.exists(socket):
...
info("Waiting for VirtioFSD socket to show up")

qemu_args = ["-machine", "memory-backend=mem0"]
qemu_args += ["-chardev", f"socket,id=virtiofsd0,path={socket}"]
Expand Down