Difference between <filesystem> in libvirt domain xml and file based storage volumes

StackOverflow https://stackoverflow.com/questions/19537731

  •  01-07-2022
  •  | 
  •  

Question

What are the differences between using filesystem tag in domain xml and using a file based storage volume ?

A directory on the host can be shared via the filesystem tag in domain xml and also as a storage pool via the 'dir' type. Is there any difference in these methods ?

Was it helpful?

Solution

When using <filesystem>, it provides host file systems to guest OS, where you can open a directory, a single file, a given size of RAM or even block devices on host to a LXC container. Notice that when using Qemu/KVM, the only option is type=mount, which means you can get a mounted file system only. see the reference of libvirt domain xml format.

When using file based storage volume, it provides disks device to the virtual machine so that it can be detected as block storage. It's often used by Qemu/KVM and others.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top