OpenVZ Forum


Home » Mailing lists » Users » /usr/bin/hostid in VPS
Re: /usr/bin/hostid in VPS [message #31018 is a reply to message #30927] Fri, 13 June 2008 08:06 Go to previous message
Josip Rodin is currently offline  Josip Rodin
Messages: 14
Registered: November 2007
Junior Member
On Tue, Jun 10, 2008 at 03:07:21PM -0400, Alastair Neil wrote:
> I would like to encapsulate a server that runs a variety of license managers
> including flexlm.  Many of these systems rely on generating a hostid
> generally either the MAC address of the primary network interface or a hash
> generated by /usr/bin/hostid.  In an OpenVZ VPS hostid returns 00000000, is
> there a way to spoof this so that I can keep the license managers happy
> regadless of the system/network inferface it is actually using? I tried
> setting up a veth device that spoofed the original MAC address but hostid
> still returns 00000000.

That program basically returns the value of the gethostid() call, and that
comes from <unistd.h>. As far as I can tell from glibc sources
(sysdeps/unix/sysv/linux/gethostid.c) all you need to do is edit
the file /etc/hostid (either with something that calls sethostid() or
manually)...?

-- 
     2. That which causes joy or happiness.
 
Read Message
Read Message
Previous Topic: iosched question
Next Topic: Veth mac generation
Goto Forum:
  


Current Time: Mon Jul 15 20:59:43 GMT 2024

Total time taken to generate the page: 0.02417 seconds