Re: How to use /dev/mapper in virt-manager/libvirt

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

 



That's a great idea.    I test distributed filesystems (gluster) and hadoop in VMs a lot, and Id really like to know what libvirt is doing with kvm when I install a new OS....So i also want to know the answer, for some context : here's My recent experiences along these lines was similar (different scenario: I wanted to directly formatted lvm volumes InsIde my guests).  But if I could just mount raw disks on my host as you suggest , that would be nice.

Anyways. Here is what I'm doing now it might work for you if you are okay with creating devices in your host and using qemu to attach them as virtual disks:

- I wanted to use existing lvm volumes as gluster bricks so I looked at the existing /dev/mapper volumes to see if I could erase and mkfs on one of them.

- they synlinked to /dev/dm-... Seemed kinda funny.

So.. I tried to unmount their targets:

umount /home

And then mkfs, but in VMs spun up with virt-install this seemed to cause a problem.  The VMs didn't boot normally after i did this.

So I fell back to just create virtual disks as described here  http://jayunit100.blogspot.com/2014/01/adding-new-virtual-disks-to-running.html?m=1 and attaching them.

Anyways I hope that helps spur the conversation or maybe me qemu-attach disk trick above is a hack that you can use as a workaround .


> On Feb 9, 2014, at 10:24 AM, Marc Haber <mh+libvirt-users@xxxxxxxxxxxx> wrote:
> 
> Hi,
> 
> my test host is running Debian/GNU Linux unstable and has virt-manger
> 0.9.5 and libvirt 1.2.1. I am using encryption and thus have devices
> in /dev/mapper that are not LVs, for example called
> /dev/mapper/myvirtualdisk.
> 
> I'd like to configure libvirt in a way that allows me to directly
> assign such devices to a VM. This does not work when I create a
> filesystem directory storage pool in virt-manager since virt-manager
> obviously choked in /dev/mapper/control, which is a character special
> device that is only readable by root. I currently help myself by
> linking the devices in question manually to /dev/luksdev and having a
> filesystem directory storage pool point to that directory. this works,
> but is ugly.
> 
> Is there a nicer way to get the contents of /dev/mapper available as
> volumes in virt-manager?
> 
> Greetings
> Marc
> 
> -- 
> -----------------------------------------------------------------------------
> Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
> Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 31958061
> Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 31958062
> 
> _______________________________________________
> libvirt-users mailing list
> libvirt-users@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvirt-users

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux