<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<STYLE>
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
BODY {
        LINE-HEIGHT: 1.5; FONT-FAMILY: 微软雅黑; COLOR: #000000; FONT-SIZE: 10.5pt; 36719: ; 38597: ; 40657: 
}
</STYLE>

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