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

Re: [libvirt-users] Attaching storage to a virtual machine



On 10/30/2012 06:03 AM, Douglas Russell wrote:
> I am slightly lost trying to attach some storage to a functioning virtual
> machine. If this where a real machine, I would simply be trying to mount a
> LVM volume.
> 
> I have found a lot of documentation about adding storage pools, but I'm
> unsure if that is actually what I should be doing. Is that just for storage
> of the virtual machines themselves? Once I'd added my LVM volume group to
> virsh I could see no way of then assigning one volume of that to be offered
> as a logical volume to one particular virtual machine.
> 
> I've also seen this:
> http://docs.fedoraproject.org/en-US/Fedora/13/html/Virtualization_Guide/sect-Virtualization-Virtualized_block_devices-Adding_storage_devices_to_guests.html#proc-Virtualization-Adding_storage_devices_to_guests-Adding_physical_block_devices_to_virtualized_guests
> 
> Looks like I could use that to assign one of the LVM volumes in my LVM
> volume group to the VM.

What is typically done is creating LVM volumes in the host, and then
assigning that as a block device for the guest to use as though it were
a raw disk.  The guest then does _another_ layer of PVM/LVM
partitioning, if the guest is something that uses LVM in the first
place.  If you want the guest to see an LVM partition created by the
host as an LVM within the guest, without an additional layer, then you
have to expose the PVM as the block device to the guest; this is not a
typical setup, in part because it is then up to you to ensure that the
host and guest are not modifying the same storage at the same time (or
put another way, that the guest is not reading from any other LVM
partitions than the one you wanted it to use).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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