Shared Folders and USB

QB-SFU-011 Rev 1.0

This chapter covers two ways to bridge host and guest: shared folders for files and USB passthrough for devices.

Shared Folders #

A shared folder makes a directory on your host visible inside the guest, so you can move files back and forth without networking. QuantaBox implements sharing with virtio-9p (the Plan 9 filesystem protocol over virtio).

Adding a Shared Folder

In Settings → Shared Folders, add a folder and set:

OptionMeaning
NameThe mount name the guest uses (the mount tag).
Host PathThe directory on the host to share.
Read-OnlyIf set, the guest cannot modify the shared files.
Auto-MountIf set, the guest mounts the share automatically at boot (via the guest agent / cloud-init).

Mounting Inside the Guest

On a Linux guest, if auto-mount is not used, mount the share manually:

sudo mkdir -p /mnt/<name>
sudo mount -t 9p -o trans=virtio <name> /mnt/<name>

Replace <name> with the share's mount name. To mount at every boot, add an equivalent entry to /etc/fstab.

Security Model

Shares use the mapped-xattr security model, which stores guest file ownership and permissions in host extended attributes rather than applying them to the host files directly. This keeps host and guest permission models cleanly separated. Use Read-Only for any folder the guest should never modify.

Warning: A writable shared folder gives the guest full read/write access to that host directory. Only share directories you trust the guest with, and prefer Read-Only when the guest just needs to read files.

USB Passthrough #

USB passthrough connects a real USB device on your host directly to a guest, so the guest can use it as if it were physically attached. This is useful for USB drives, security keys, cameras, and peripherals.

Enabling USB

In Settings → USB, enable USB and choose a controller version:

ControllerUSB VersionSpeed
xHCIUSB 3.0+5 Gbps and above
EHCIUSB 2.0Up to 480 Mbps

Use xHCI unless a guest specifically needs a USB 2.0 controller.

Passing a Device Through

QuantaBox can enumerate the host's USB devices (by vendor and product ID) so you can select one to attach to the guest. Once passed through, the device leaves the host's control and appears inside the guest.

Notes on passthrough:
  • A device passed to a guest is unavailable to the host until released.
  • Passing through a storage device while the host has it mounted can cause data corruption. Unmount it on the host first.
  • Some devices need host privileges to access; on Linux this may require appropriate permissions/udev rules.

Choosing the Right Tool #

To MoveUse
Files between host and guestA shared folder
A whole USB drive or a hardware deviceUSB passthrough
Files to/from a networked guestSSH/SCP (see Console and Remote Access)

Next Steps #

Continue to Backup, Export and Import to move and protect whole VMs.