[Fusioninventory-user] Container OpenVZ (Proxmox) and UUID

Matthieu.Marc at ensam.eu Matthieu.Marc at ensam.eu
Tue Jun 2 08:18:55 UTC 2015

> -----Message d'origine-----
> De : Fusioninventory-user [mailto:fusioninventory-user-bounces+matthieu.marc=ensam.eu at lists.alioth.debian.org] De la part de David DURIEUX
> Envoyé : mardi 2 juin 2015 10:11
> À : fusioninventory-user at lists.alioth.debian.org
> Objet : Re: [Fusioninventory-user] Container OpenVZ (Proxmox) and UUID
> Le Tue, 02 Jun 2015 09:28:22 +0200
> Guillaume Rousse <guillomovitch at gmail.com> a écrit:
> >Le 26/05/2015 15:41, Matthieu.Marc at ensam.eu a écrit :
> >> Finally I managed to make it working patching two files :
> >> Vmsystem.pm and Virtuozzo.pm to make the UUID of the guest = UUID + 
> >> "-" + CT_ID.
> >>
> >> Le patch was made for 2.3.16 version.
> >>
> >> To be able to make it working, dmidecode must be working on the 
> >> guest. To do so, yo must configure the guest with the two following 
> >> command (stop the guest first) :
> >>
> >>    vzctl set $VEID --devnodes mem:r --save
> >>    vzctl set $ VEID  --capability sys_rawio:on --save
> >>
> >> If someone found another way to get an identifier of the host from 
> >> the guest, the two previous command would be useless.
> >Rather than changing guest ID to include host ID so as to make it 
> >globally unique (whereas it is currently host-specific), I think just 
> >populating the dedicated host ID attribute (UUID) on the guest would be 
> >enough, and far less intrusive.
> >
> >Of course, the algorithm used on GLPI side to establish the 
> >relationship beween host and guest should be:
> >- virtual machine ID (HARDWARE/VMID element) on the guest should match 
> >virtual machine ID (VIRTUALMACHINE/VMID) on the host
> >- physical machine ID (HARDWARE/UUID element) on the guest should match 
> >physical machine ID (VIRTUALMACHINE/UUID) on the host
> >
> >The first condition in enough only for virtualization technologies that 
> >use globaly unique virtual machine identifiers.
> >
> >David ?
> Not really understand that, UUID is unique, so not undertand how it's possible to have same UUID on multiple VMs...
> FOr me it's a problem with vm system you use and made some modifications like it in UUID fields is not a good idea (glpi wait UUID and if not in right format can ignore it, code used to associate VM and host will be broker...)
> David
> ++

On Promox (OpenVZ), the UUID of the VM are the same that the UUID of the host. And we must configure all guest VM with the two commands above in order to make dmidecode work. Otherwise, the guest VM is unable to get the UUID.

I don't think we can change openvz easily.  But maybe we can find that having the same UUID on the host and on the guest is a chance because it is the only way to make the association between the host and the guests.

Matthieu MARC

More information about the Fusioninventory-user mailing list