Thomas Koch
2013-Sep-07 16:28 UTC
[libvirt-users] Can I run a KVM guest with a btrfs subvolume as file system?
Hi, I want to run a virtualized Debian stable KVM guest on a Debian stable host (to run untrusted stuff like Skype, Flash or eclipse with third-party plugins). Naturally host and guest will have many files in common and it would be nice to make us of btrfs deduplication. Now I found "direct kernel boot" but I could not find any documentation about it. Does it allow me to hand a btrfs subvolume of the host file system to the guest and the guest uses this subvolume as its own file system? I already asked this question here: http://serverfault.com/questions/536752/can-i-run-a-kvm-guest-with-a-btrfs- subvolume-as-file-system Regards, Thomas Koch
Thomas Koch
2013-Sep-07 18:17 UTC
Re: [libvirt-users] Can I run a KVM guest with a btrfs subvolume as file system?
Hi again, I've read and thought a bit more. Is the following possible: 1. create a folder (say /virtroot) on the host that should hold the root filesystem for the virtual machine 2. pass /bin, /sbin, /usr, /lib and /lib64 and /virtroot to the guest via virtfs[1]. Only the latter is passed writable. 3. create an initrd for the guest with an fstab that mounts the above folders at the right locations. 4. start the virtual machine without storage attached and use -kernel to pass a kernel from the host system [1] http://www.linux-kvm.org/page/9p_virtio As a result I could have a very lightweight debian stable virtual machine to run untrusted applications. Regards, Thomas Koch
Reasonably Related Threads
- [PATCH v2] Btrfs-progs: receive: fix the case that we can not find the subvolume
- [extlinux] Failed to load ldlinux.c32 with btrfs subvolume
- [PATCH] filesystems: don't try to get the size of btrfs subvolume
- [PATCH v2] filesystems: don't try to get the size of btrfs subvolume
- [PATCH 1/6] btrfs: correct words about subvolume and snapshot