KVM - share folder / directory between host and guest



1) create shared folder on host with proper permissions
mkdir /home/backup/server2
chmod 750 /home/backup/server2
chown libvirt-qemu:root /home/backup/server2

2) add new Filesystem to guest - select "mapped" security mode - see screenshot:

3) mount shared folder in guest:
mkdir /home/backup
mount -t 9p -o trans=virtio,version=9p2000.L /server2 /home/backup
or automatically by inserting in /etc/fstab:
/server2         /home/backup        9p        trans=virtio,version=9p2000.L


Attached files: kvm-share-filesystem.png

Last update:
2012-09-20 15:04
Author:
Daniel
Revision:
1.3
Average rating:0 (0 Votes)

You can comment this FAQ

Chuck Norris has counted to infinity. Twice.