[libvirt-users] How to get uuid info inside a lxc container created by libvirt_lxc

Claudio Bley cbley at av-test.de
Tue Jul 8 06:54:20 UTC 2014


At Tue, 08 Jul 2014 12:19:40 +0800,
Qiang Guan wrote:
> 
> 
> 于 2014年07月08日 12:06, Eric Blake 写道:
> > On 07/07/2014 10:02 PM, Qiang Guan wrote:
> >> Hi ,
> >>
> >> Is there anyway to get uuid info inside a lxc container which is created
> >> by libvirt_lxc?
> >>
> >> For kvm, we can use dmidecode or lshw to get this info inside vm. Is
> >> there any tools
> >> to do this thing for libvirt lxc?
> > Per the docs:
> > http://libvirt.org/drvlxc.html#envvars
> > pid 1 inside lxc inherits $container_uuid into its environment variables.
> Thanks for help.
> But in my lxc container, It seems no such envvars existed:

Look at the environment of the process with PID 1:

# tr '\0' '\n' < /proc/1/environ

-- 
Claudio




More information about the libvirt-users mailing list