Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
3dc7016a
Commit
3dc7016a
authored
Mar 12, 2019
by
Francesc Guasch
Browse files
doc(manual): how to set the hostname
issue #1010
parent
4c07978e
Changes
1
Hide whitespace changes
Inline
Side-by-side
docs/docs/set_hostname.rst
0 → 100644
View file @
3dc7016a
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.
Linux
-----
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
rc.local
~~~~~~~~
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
Windows
-------
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.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment