[virt-tools-list] [virt-manager PATCH] man: add a example of how to config user namespace for LXC

Chen Hanxiao chenhanxiao at cn.fujitsu.com
Tue Feb 11 03:04:00 UTC 2014


From: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>

update virt-xml man page and add a example.

Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
---
 man/virt-xml.pod | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/man/virt-xml.pod b/man/virt-xml.pod
index 44f6353..177b4b9 100644
--- a/man/virt-xml.pod
+++ b/man/virt-xml.pod
@@ -326,6 +326,10 @@ Generate XML for a virtio console device and print it to stdout:
 
   # virt-xml --build-xml --console pty,target_type=virtio
 
+Enable user namespace for lxc container, user ID 1000 on the host system will be mapped to user ID 0 inside container LXC1. So does group ID.
+
+  # virt-xml --connect=lxc:/// LXC1 --edit --idmap uid_start=0,uid_target=1000,uid_count=10,gid_start=0,gid_target=1000,gid_count=10
+
 
 =head1 BUGS
 
-- 
1.8.2.1




More information about the virt-tools-list mailing list