Skip to content

Instantly share code, notes, and snippets.

@filviu
Last active December 8, 2020 08:33
Show Gist options
  • Save filviu/d6d4c27f6beeb7d3ce46766a6b64080e to your computer and use it in GitHub Desktop.
Save filviu/d6d4c27f6beeb7d3ce46766a6b64080e to your computer and use it in GitHub Desktop.
Mount 9p virtio inside VM

Mount a host folder inside a VM using 9p virtio

/etc/initramfs-tools/modules

# List of modules that you want to include in your initramfs.
# They will be loaded at boot time in the order below.
#
# Syntax:  module_name [args ...]
#
# You must run update-initramfs(8) to effect this change.
#
# Examples:
#
# raid1
# sd_mod
9p
9pnet
9pnet_virtio

Then:

update-initramfs -u

In /etc/pve/qemu-server/xxx.conf

args: -fsdev local,security_model=passthrough,id=fsdev0,path=/tank/media -device virtio-9p-pci,id=fs0,fsdev=fsdev0,addr=0x4,mount_tag=media_share
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment