[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

disk (and other resource) management of virtual machines



I am using libvirt and kvm to run virtual machines.  I would like to
be able to change the size of the virtual filesystems and snapshot
them (in the sense of snapshotting the disk for backup.  Ideally this
would be a snapshot of part of the file system, not the whole disk).
Any recommendations for how to accomplish this?

In the past, using KVM alone, I have carved logical volumes out of
volume groups on the host system and exposed them as raw disks to the
VM's.  The current host has a large LVM volume group on top of an
encrypted software RAID.

Is there a way to expose host file systems to the guests?  NFS is a
possibility, but the VM's will be running various services that warn
not to use NFS.  libvirt doesn't seem to provide the ability to expose
host file systems directly (as opposed to exposing raw block devices),
but I'm hoping I have missed something.

I could run LVM inside the VM's; this would provide somewhat more
flexibility and disk snapshotting, though I'm not sure how I would
provide more total space to the VM in this scenario.  But it seems
ugly to be running a virtual LVM on top of the host LVM.

Finally, could anyone clarify the VMs in this libvirt/KVM setup use
CPU and RAM resources?  If I give a guest machine 4G of RAM does that
mean that memory is unavailable for other use by the host or other
guests? virt-manager has configuration for memory and maximum memory,
suggesting that at least some dynamic growth is possible.  Likewise,
if the physical machine has 8 cores, could I run several VM's with 8
cores each?  My suspicion is that CPU's are shareable, but RAM is not,
but I don't know.

Thanks.
Ross Boylan

P.S. I don't need to be able to make the changes while the VM's are
live, though the ability to do so would be handy.


Reply to: