Reset-Machine-ID
—
resets the machine identity state
Reset-Machine-ID |
[-H hostname |
--hostname hostname]
[-Z zabbix_server |
--zabbix zabbix_server]
[-A |
--install-zabbix-agent ]
[-M | --skip-machine-id ]
[-S |
--skip-ssh-configuration ]
[-K |
--skip-ssh-key-replacement ]
[--yes-to-all-i-am-really-sure ] |
Reset-Machine-ID
resets the machine
identity state, particularly for a cloned VM, to make it appear as a new
machine. It performs the following tasks:
* Reset /etc/machine-id,
* Reset /var/lib/dbus/machine-id (symlink to /etc/machine-id),
* Change hostname, if a new one is provided (--hostname parameter).
* Provide hardened settings for SSH client and server.
* Create new SSH key pair.
The changes are made interactively on request, unless the option
--yes-to-all-i-am-really-sure is used.
The following options are available:
-H
hostname |
--hostname
hostname
- Set the given hostname.
-Z
zabbix_server |
--zabbix
zabbix_server
- Configure an already-installed Zabbix Agent for a given Zabbix
server.
-A
|
--install-zabbix-agent
- Try to install Zabbix Agent, if necessary, when a Zabbix server is given
but no Zabbix Agent is installed. This will add the current Zabbix PPA on
Debian/Ubuntu/Fedora systems. Note that a Zabbix PPA may not be available
for the used distribution! On FreeBSD, the Zabbix Agent is installed from
the FreeBSD Ports Collection.
-M
|
--skip-machine-id
- Do not reset the machine ID.
-S
|
--skip-ssh-configuration
- Do not make SSH configuration changes.
-K
|
--skip-ssh-key-replacement
- Do not replace SSH keys.
--yes-to-all-i-am-really-sure
- Create new keys (delete old ones) as well as replace sshd_config and
ssh_config without interactively asking for confirmation.
- sudo Reset-Machine-ID
-
- sudo Reset-Machine-ID --yes-to-all-i-am-really-sure
-
- sudo Reset-Machine-ID --hostname dbserver.domain.example
-
- sudo Reset-Machine-ID -H server.domain.example -Z zabbix.domain.example
-A
-
- sudo Reset-Machine-ID -H server.domain.example --zabbix
zabbix.domain.example --install-zabbix-agent
-
- sudo Reset-Machine-ID --skip-ssh-configuration
--skip-ssh-key-replacement
-