Sponsored Content
Operating Systems Solaris Change hostID of Solaris 10 virtual/guest machine installed by Virtual Box 4.1.12 on Windows-XP host Post 302632171 by hicksd8 on Sunday 29th of April 2012 11:56:21 AM
Old 04-29-2012
This is how I do it.

First decide what hostid you want to set the system to.

NOTE: THE CODE BELOW ONLY APPLIES TO SOLARIS X86

You need to add lines to the bottom of /etc/rc2.d/S20sysetup (which is executed when the system boots).

This is a copy of the whole file after I've added the lines to the bottom with comments to explain what I'm doing............

THIS IS PROVIDED AS AN EXAMPLE ONLY. INPUT YOUR OWN VALUES FOR HOSTID.

Code:
 
#!/sbin/sh
#
# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident "@(#)sysetup 1.27 06/06/05 SMI"
if [ -z "$_INIT_PREV_LEVEL" ]; then
 set -- `/usr/bin/who -r`
 _INIT_PREV_LEVEL="$9"
fi
[ $_INIT_PREV_LEVEL != S -a $_INIT_PREV_LEVEL != 1 ] && exit 0
# Uncomment this line to print the complete system configuration on startup
#[ -x /usr/sbin/prtconf ] && /usr/sbin/prtconf
# If there are trademark files, print them.
[ -d /etc/tm ] && /usr/bin/cat /etc/tm/* 2>/dev/null
#
# Run rctladm to configure system resource controls based on the settings
# previously saved by rctladm.  See rctladm(1m) for instructions on how to
# modify resource control settings.
#
if [ -f /etc/rctladm.conf ] && [ -x /usr/sbin/rctladm ]; then
 /usr/sbin/rctladm -u
fi
#
# Change hostid to 807a6e94
# Convert to decimal value = 2155507348
# Use HEXADECIMAL to BINARY conversion, HEX to Decimal converter, Hexdecimal convertor for heavy lifting
#
# Convert decimal value to ASCII chars = 32 31 35 35 35 30 37 33 34 38
# Use above web site for this too
#
# Pad ASCII char string to eleven values (if necessary) using zeros
# Result 32 31 35 35 35 30 37 33 34 38 0
# If string is only nine chars pad with "00 0" to make eleven
#
# Set the hostid to 807a6e94 - Let's do it!!
echo "hw_serial/v 32 31 35 35 35 30 37 33 34 38 0" | mdb -kw
# That's it!  Job done!
#

Once you've done the added lines you can test it without rebooting by executing:

Code:
 
/etc/rc2.d/S20sysetup

The hostid should change on the fly (or you should get an error telling you what's wrong. Obviously syntax is critical).

Hope that helps. I've just tested it on Solaris 10 (x86).

Last edited by hicksd8; 04-29-2012 at 02:02 PM..
 

10 More Discussions You Might Find Interesting

1. Solaris

Is there any Virtual data center as we have Virtual Machine?

Do we have any Virtual Data Center software as we have Virtual Machine? I want to practice everything of Solaris practically but i don't have resources like data center which includes Servers, Data storages, switches, and other things. (2 Replies)
Discussion started by: karman0931
2 Replies

2. Virtualization and Cloud Computing

virtual box instalation problem in windows XP machine

Hi friends, i have downloaded VirtualBox-3.0.4-50677-Win.exe , when i try to install i have selected virtualbox USB support , virtualbox networking support . when i click the install button, after some progress bar completion , i am getting the below error messages.... (4 Replies)
Discussion started by: vr_mari
4 Replies

3. Windows & DOS: Issues & Discussions

Need suggestions on Virtual Machine software for Windows

Hi, I am currently having an issue with Virtualbox. It, at one point in time, worked like a charm. Then my internal 500GB HD failed in my PC. It was under warranty and I sent off for another one but did not want to pay for the expedited shipping nor did I want to wait a few weeks to get the... (1 Reply)
Discussion started by: tlarkin
1 Replies

4. Solaris

Solaris virtual machine access on host os

Hi I have two solaris 10 virtual machines on my Vista laptop. I want to access both machines using putty in vista. I used DHCP while installing virtual machines. one machine gets the ip address and other does not. What is the problem? can i assign a static ip address if yes how? ... (2 Replies)
Discussion started by: ankurk
2 Replies

5. Ubuntu

ip on ubuntu installed using Virtual Box

Hi All I have few computers in the same network using a wifi router. In Each of them I installed VirtualBox and I created an image of Ubuntu 8.04 The thing is that each of those images has the same ip eth0=10.0.2.15. Do you know how can I make possible each virtual machine having another IP or... (2 Replies)
Discussion started by: manustone
2 Replies

6. UNIX for Dummies Questions & Answers

How can i understand if a Java Virtual Machine is installed on Unix??

Hello, i would like to figute out, if there is any JVM installed on my unix account. How can i figure that out?? Thanks (1 Reply)
Discussion started by: g_p
1 Replies

7. Red Hat

My RHEL virtual Machine Does not have Virtual Machine Manager Desktop Tool

My RHEL virtual Machine Does not have Virtual Machine Manager Desktop Tool Hi, I don't seem to have the Virtual Machine Manager Desktop tool set up on my RHEL6 Machine. The Linux machine runs off VMWare player and I'm not sure whether it is a VMWare software issue or a problem with the RHEL6... (2 Replies)
Discussion started by: accipiter1
2 Replies

8. AIX

IBM Virtual Machine OS on intel x86 and x64? IBM AIX OS on IBM Virtual Machine?

Hi There, I have zero information and zero knowledge for IBM virtual machine except Amazon cloud and VMware ESXi (Only Linux OS available). Anyone could provide me the following answer - Can IBM VM been deploy on X86 and X64 (Intel Chip)? If answer is yes any chance to deploy AIX OS... (13 Replies)
Discussion started by: chenyung
13 Replies

9. Solaris

Solaris 10 virtual - how do I tell physical host?

uname -a reports type Generic so I know its virtual. Assume its an ldom somewhere. How do I find out what physical host server is? (4 Replies)
Discussion started by: psychocandy
4 Replies

10. UNIX for Beginners Questions & Answers

Providing virtual machine priority in kvm based virtual machines

Hi All, Is there any way I can prioritize my VMs when there is resource crunch in host machine so that some VMs will be allocated more vcpu, more memory than other VMs in kvm/qemu hypervisor based virtual machines? Lets say in my cloud environment my Ubuntu 16 compute hosts are running some... (0 Replies)
Discussion started by: SanjayK
0 Replies
rctladm(1M)															       rctladm(1M)

NAME
rctladm - display or modify global state of system resource controls SYNOPSIS
rctladm [-lu] [-e action] [-d action] [name...] The rctladm command allows the examination and modification of active resource controls on the running system. An instance of a resource control is referred to as an rctl. See setrctl(2) for a description of an rctl; see resource_controls(5) for a list of the rctls supported in the current release of the Solaris operating system. Logging of rctl violations can be activated or deactivated system-wide and active rctls (and their state) can be listed. The following options are supported: -d action Disable (-d) or enable (-e) the global action on the specified rctls. If no rctl is specified, no action is taken and an -e action error status is returned. You can use the special token all with the disable option to deactivate all global actions on a resource control. You can set the syslog action to a specific degree by assigning a severity level. To do this, specify syslog=level, where level is one of the string tokens given as valid severity levels in syslog(3C). You can omit the common LOG_ prefix on the severity level. -l List available rctls with event status. This option displays the global event actions available for each rctl and the action name used with the enable (-e) and disable (-d) options. The global flag values for the control are also displayed. If one or more name operands are specified, only those rctls matching the given names is displayed. This is the default action if no options are specified. -u Configure resource controls based on the contents of /etc/rctladm.conf. Any name operands are ignored. The following operands are supported: name The name of the rctl to operate on. Multiple rctl names may be specified. If no names are specified, and the list action has been specified, then all rctls are listed. If the enable or disable action is specified, one or more rctl names must be specified. Example 1: Activating System Logging for Specific Violations The following command activates system logging of all violations of task.max-lwps. # rctladm -e syslog task.max-lwps # Example 2: Examining the Current Status of a Specific Resource The following command examines the current status of the task.max-lwps resource. $ rctladm -l task.max-lwps task.max-lwps syslog=DEBUG $ The following exit values are returned: 0 Successful completion. 1 A fatal error occurred. A message is written to standard error to indicate each resource control for which the operation failed. The operation was successful for any other resource controls specified as operands. 2 Invalid command line options were specified. /etc/rctladm.conf Each time rctladm is executed, it updates the contents of rctladm.conf with the current configuration. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWesu | +-----------------------------+-----------------------------+ setrctl(2), getrctl(2), prctl(1), rctlblk_get_global_flags(3C), rctlblk_get_global_action(3C), attributes(5), resource_controls(5) By default, there is no global logging of rctl violations. 1 Oct 2004 rctladm(1M)
All times are GMT -4. The time now is 07:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy