Commit 3dc7016a authored by Francesc Guasch's avatar Francesc Guasch
Browse files

doc(manual): how to set the hostname

issue #1010
parent 4c07978e
Set Hostname
The hostname of a virtual machine can be changed on startup. The name of
the virtual domain is passed in a smbios string and can be used to rename.
This feature is available from release 0.3.4.
The virtual machine name can be read with dmidecode
.. prompt:: bash $
dmidecode | grep hostname | awk -F: '{ print $3}'
To set the hostname you must create a script that runs on startup, this one line should
be enough for most cases:
.. prompt:: bash $
hostname `dmidecode | grep hostname | awk -F: '{ print $3}'`
Some tools may read the hostname from the config file, set it like this:
.. prompt:: bash $
dmidecode | grep hostname | awk -F: '{ print $3}' | sed -e 's/^ //' > /etc/hostname
If you Linux system supports rc.local just add this lines to it and the hostname
will be updated on boot:
hostname `dmidecode | grep hostname | awk -F: '{ print $3}'`
hostname > /etc/hostname
SMBios information is available in Windows too. The data is stored in the
registry and also can be shown with a tool called WMI.
Contributed information would be appreciated.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment