[libvirt] Regarding lxc driver for libvirt.

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

 



Hi,
I am new to libvirt.
I want to create a Domain using libvirt XML. In order to mount the
host's '/home/srikanth' directory to the new container's '/' directory,
my XML format is shown below:

<domain type='lxc' id='1'>
  <name>container1_vm</name>
    <memory>500000</memory>
      <os>
          <type>exe</type>
          <init>/bin/sh</init>
      </os>
      <vcpu>1</vcpu>
      <clock offset='utc'/>
      <on_poweroff>destroy</on_poweroff>
      <on_reboot>restart</on_reboot>
      <on_crash>destroy</on_crash>
      <devices>
        <emulator>/usr/libexec/libvirt_lxc</emulator>
  	<filesystem type='mount'>
	  <source dir='/home/srikanth'/> 
	  <target dir='/'/> 
	</filesystem>
	<console type='pty' />
      </devices>
</domain>


With the above libvirt XML, Domain is defining, but not starting. When I
issue the start command it's saying "Domain started", but showing "shut
off" status. If I changed the target directory(<traget dir='/'/>) from
'/' to '/home/container1'(<traget dir='/home/container1'/>), the domain
is starting normally and I am able to see the contents in the target
directory.

Can you please let me know, how can I set the target directory to '/'?

By the way, I am using libvirt version o.7.6.

Regards,
Srikanth.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]