Project

General

Profile

Feature #2311

UUID of LXC container in libvirt environment

Added by Alexander Evseev about 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
inventory
Target version:
Start date:
10/22/2013
Due date:
% Done:

100%

For junior contributor:
No

Description

Libvirt on container start sets some environment variables, especially LIBVIRT_LXC_UUID, which may be used for linking container to host.

See attached module.

LXC.pm Magnifier - Get UUID from LIBVIRT_LXC_UUID environment variable (725 Bytes) Alexander Evseev, 10/22/2013 07:45 AM

1-environ.txt Magnifier (177 Bytes) Alexander Evseev, 10/25/2013 05:40 PM

virsh_lxc.txt Magnifier (144 Bytes) Alexander Evseev, 10/28/2013 08:20 AM

Libvirt_LXC.pm Magnifier (2.71 KB) Alexander Evseev, 10/28/2013 08:21 AM

History

#1 Updated by Gonéri Le Bouder about 4 years ago

  • Category set to inventory
  • Status changed from New to Feedback
  • Target version set to 2.4.0

Hi Alexander,

Thank you for the changes. In order to add a unit-test, can you please attach an example of the /proc/1/environ file?

#2 Updated by Alexander Evseev about 4 years ago

#3 Updated by Alexander Evseev about 4 years ago

One more thing...

FusionInventory does not detect LXC containers running by Libvirtd because virsh needs custom connect string ("-c lxc:///" - see attached Libvirt_LXC.pm).

Example of virsh output in attached virsh_lxc.txt.

#4 Updated by Alexander Evseev about 4 years ago

#5 Updated by Alexander Evseev almost 4 years ago

  • Status changed from Feedback to Resolved
  • % Done changed from 0 to 100

Applied in changeset commit:d841c32cdf19c95f73c2ba71d66a38cb2464b00f.

#6 Updated by Anonymous almost 4 years ago

Applied in changeset commit:59c4813650e472e2a165361d67922932a01c5680.

#7 Updated by Gonéri Le Bouder almost 4 years ago

  • Assignee set to Gonéri Le Bouder

Thank you Alexander for the patches. I hope you are fine with the changes I did on the master branch.

#8 Updated by Anonymous over 3 years ago

Applied in changeset commit:367a998eee76f7aed761d954d1ca58d461259912.

#9 Updated by Guillaume Rousse over 3 years ago

  • Target version changed from 2.4.0 to 2.3.10

Backported in stable branch.

#10 Updated by Guillaume Rousse over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF