|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
Change hostid to particullar string
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. Code:
[root@oldserver ~]# hostid 17acc883 Code:
[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. Code:
#!/usr/bin/python
from struct import pack
hostid = pack("I",int("0x210a2500",16))
filename = "/etc/hostid"
open(filename,"wb").write(hostid) |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can I change hostid? | getrue | Red Hat | 4 | 07-24-2012 05:24 PM |
| How to change hostid saved in rpool? | aixlover | Solaris | 21 | 02-28-2012 10:28 AM |
| Change Solaris hostid | avisht | Solaris | 21 | 12-21-2010 08:50 AM |
| procedure to change hostid of Sun server | girish.batra | Solaris | 4 | 02-11-2009 02:21 AM |
| How to change the HostID?--SunFire880 | surainbow | Solaris | 2 | 07-21-2008 11:15 PM |
|
|