Server Reinstalls¶
Equinix Metal™ offers the ability to provision a new instance on the same hardware, essentially bringing the server back to it's pre-provision state and re-running the provision. This process preserves your IP addresses, user data, and some parts of your networking configuration.
Some things to note:
- Reinstalls take a little longer than a fresh provision.
- Reinstall deprovisions the server. It wipes the disks, checks the firmware, and generally brings the server back to a pre-operating system, bare metal state. You do have some data preservation options, if you reinstall from the API.
- Second, Reinstall reinstalls an operating system. It does not have to be the same as the previous operating system; you can choose a different OS when you start the Reinstall. It also will re-run automation or configuration that you have specified in your User Data.
- If you are installing or reinstalling an Equinix Metal OS image, you will get the most recently published image version, not necessarily the same image version that is currently on the server.
Limitations¶
Reinstalling is not supported for servers that do not have a public IPv4 address. This includes both servers that were deployed without a public IP address and servers that were placed into a Pure Layer 2 mode.
Reinstalling is supported for servers that are in either Hybrid Bonded or Hybrid Unbonded mode. When the reinstall is complete, any connected VLANs and other configuration in the Equinix Metal portal is preserved. You will, however, have to reconfigure your servers for handling VLAN traffic in the operating system.
Reinstalling a Server¶
To reinstall a server, click Server Actions from the server's Overview. Click Reinstall.
Then select the operating system you want to be installed from the drop-down. The current operating system is selected by default. If you choose the Custom iPXE, a field for your iPXE script URL will appear.
Note that you do not have to option to preserve data when you reinstall a server through the Equinix Metal console. If you want to use those options, you will need to reinstall through the API.
To reinstall a server from the CLI, use the metal device reinstall
command.
metal device reinstall -d <device-id> [-operating-system <os-slug>] [--preserve-data]
Specify the operating system to install with the --operating-system
flag. The --preserve-data
flag preserves data on disks where the OS is not going to be installed.
To reinstall a server in the API, send a POST
request to the /devices/{id}/actions
endpoint. In the body of the request, specify the action "type"
as "reinstall"
along with the reinstall options you would like.
curl -X POST -H 'X-Auth-Token: {token}' -H 'Content-Type: application/json' "https://api.equinix.com/metal/v1/devices/{id}/actions" -d '{"type":"reinstall"}'
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Auth-Token: <API_TOKEN> " \
"https://api.equinix.com/metal/v1/devices/{id}/actions" \
-d '{
"type": "reinstall",
"operating_system": "<os_slug>",
"preserve_data": false,
"deprovision_fast": false
}'
"operating_system"
is an optional parameter where you can specify the OS you would like to be installed. If omitted, the current OS will be reinstalled."preserve_data"
is an optional parameter. Iftrue
then non-root disks will not be touched during a reinstall and data volumes will be retained. If not included, it defaults tofalse
."deprovision_fast"
is an optional parameter. Iftrue
then disk wipes will be skipped during a reinstall, cutting turnaround time. If not included, it defaults tofalse
."ipxe_script_url"
is an optional parameter to specify an iPXE OS image. If you are using custom iPXE, the"operating_system"
parameter must be"custom_ipxe"
.