Unix/Linux Go Back    

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.

Change hostid to particullar string

Red Hat

Thread Tools Search this Thread Display Modes
Old Unix and Linux 01-23-2013   -   Original Discussion by brusell
brusell's Unix or Linux Image
brusell brusell is offline
Registered User
Join Date: Oct 2009
Last Activity: 22 October 2016, 3:57 PM EDT
Location: Germany
Posts: 94
Thanks: 15
Thanked 4 Times in 4 Posts
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.

[root@oldserver ~]# hostid 

[root@newserver tmp]# hostid 
[root@newserver tmp]# echo 17acc883 > /etc/hostid
[root@newserver tmp]# hostid 

Can anybody help??


---------- Post updated at 12:50 ---------- Previous update was at 12:37 ----------

So I have found solution.

from struct import pack
hostid = pack("I",int("0x210a2500",16))
filename = "/etc/hostid"

The Following User Says Thank You to brusell For This Useful Post:
rkhyd (06-03-2014)
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 06:24 PM
How to change hostid saved in rpool? aixlover Solaris 21 02-28-2012 11:28 AM
Change Solaris hostid avisht Solaris 21 12-21-2010 09:50 AM
procedure to change hostid of Sun server girish.batra Solaris 4 02-11-2009 03:21 AM
How to change the HostID?--SunFire880 surainbow Solaris 2 07-22-2008 12:15 AM

All times are GMT -4. The time now is 01:26 PM.