Hello guys,
currently I'm working on migration services from physical to virtual server (RHEL 6). One form applications is binded to hostid of old server.
I put value of hostid from old server to the /etc/hostid on new server, but output of hostid command is giving nonsenses then.
[root@oldserver ~]# hostid
17acc883
[root@newserver tmp]# hostid
18ac2644
[root@newserver tmp]# echo 17acc883 > /etc/hostid
[root@newserver tmp]# hostid
63613731
Can anybody help??
Thanks.
---------- Post updated at 12:50 ---------- Previous update was at 12:37 ----------
So I have found solution.
#!/usr/bin/python
from struct import pack
hostid = pack("I",int("0x210a2500",16))
filename = "/etc/hostid"
open(filename,"wb").write(hostid)