Re: How to enable mount loop device in LXC using libvirt LXC driver

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

 



On Thu, Mar 06, 2014 at 03:06:29PM +0800, Du Jun wrote:
> When I try to mount loop device in a linux container, I got the following
> error message:
> mount: Could not find any loop device. Maybe this kernel does not know
>        about the loop device? (If so, recompile or `modprobe loop'.)
> 
> I wonder how to enable mount loop device in LXC using libvirt LXC driver?

You don't want to try to setup loop mounts yourself - tell libvirt todo
it in the XML eg

  <filesystem type='file'>
     <source file='/some/file/image'/>
     <target dir='/some/mount/point'/>
  </filesystem>

and then libvirt will create a loop device and mount it. If you just want
the loop device and not mounted, then use <block type='file'> instead.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

_______________________________________________
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