On 2013-08-08 16:53 , Daniel P. Berrange wrote:
On Thu, Aug 08, 2013 at 03:56:35PM +0800, hzguanqiang@corp.netease.com wrote:
> But when I did the same thing under libvirt of version 1.1.0 with debian host OS, the execution result changed:
>
> #disk info of host
> hzguanqiang@debian:~$ df -hl
> Filesystem                                              Size  Used Avail Use% Mounted on
> rootfs                                                  4.0G  1.6G  2.2G  42% /
> udev                                                     10M     0   10M   0% /dev
> tmpfs                                                   4.8G  468K  4.8G   1% /run
> /dev/disk/by-uuid/12bb656b-4f80-4386-aa07-4bf90a3111b4  4.0G  1.6G  2.2G  42% /
> tmpfs                                                   5.0M  4.0K  5.0M   1% /run/lock
> tmpfs                                                   9.9G     0  9.9G   0% /run/shm
> /dev/sda8                                               428G  112G  313G  27% /home
> /dev/sda6                                               7.9G  159M  7.8G   2% /tmp
> /dev/sda5                                                16G  2.7G   14G  17% /var
> cgroup_root                                              24G     0   24G   0% /sys/fs/cgroup
> /dev/nbd5                                               1.4G  851M  466M  65% /home/openstack/stack/data/nova/instances/eed45ccb-3707-4815-9ae4-c7a2f56adb64/rootfs
 
 
> hzguanqiang@debian:~$ vir lxc-enter-namespace  instance-00000037 --noseclabel /bin/df -hl
> Filesystem                                              Size  Used Avail Use% Mounted on
> rootfs                                                  4.0G  1.6G  2.2G  42% /
> udev                                                     10M     0   10M   0% /dev
> tmpfs                                                   4.8G  468K  4.8G   1% /run
> /dev/disk/by-uuid/12bb656b-4f80-4386-aa07-4bf90a3111b4  4.0G  1.6G  2.2G  42% /
> tmpfs                                                   5.0M  4.0K  5.0M   1% /run/lock
> tmpfs                                                   9.9G     0  9.9G   0% /run/shm
> /dev/sda8                                               428G  112G  313G  27% /home
> /dev/sda6                                               7.9G  159M  7.8G   2% /tmp
> /dev/sda5                                                16G  2.7G   14G  17% /var
> cgroup_root                                              24G     0   24G   0% /sys/fs/cgroup
> /dev/nbd5                                               1.4G  851M  466M  65% /home/openstack/stack/data/nova/instances/eed45ccb-3707-4815-9ae4-c7a2f56adb64/rootfs
 
What does  'ls /proc/self/ns' show on the host ?
 
Also what is your guest XML configuration for 'intsance-0000000037' ?
 
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 :|
 
Hi Daniel,
 
The info you want to see are as following:
 
hzguanqiang@debian:~$ ls /proc/self/ns
ipc  net  uts
hzguanqiang@debian:~$ vir dumpxml instance-00000037
<domain type='lxc' id='6096'>
  <name>instance-00000037</name>
  <uuid>2b39180a-cec0-4423-83e9-4446a27409ea</uuid>
  <memory unit='KiB'>10485760</memory>
  <currentMemory unit='KiB'>10485760</currentMemory>
  <vcpu placement='static'>8</vcpu>
  <cputune>
    <shares>32768</shares>
    <period>100000</period>
    <quota>400000</quota>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64'>exe</type>
    <init>/sbin/init</init>
    <cmdline>console=tty0 console=ttyS0</cmdline>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/lib/libvirt/libvirt_lxc</emulator>
    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/opt/stack/data/nova/instances/2b39180a-cec0-4423-83e9-4446a27409ea/rootfs'/>
      <target dir='/'/>
    </filesystem>
    <interface type='bridge'>
      <mac address='fa:16:3e:01:f1:14'/>
      <source bridge='br100'/>
      <target dev='veth0'/>
      <filterref filter='nova-instance-instance-00000037-fa163e01f114'/>
    </interface>
    <console type='pty' tty='/dev/pts/2'>
      <source path='/dev/pts/2'/>
      <target type='lxc' port='0'/>
      <alias name='console0'/>
    </console>
  </devices>
  <seclabel type='none'/>
</domain>
 
------------------    
Best regards!
GuanQiang
16:58:07