By Vishal Bulbule.Jan 12, 2023
Introduction
Google has recently introduced new feature to rename VM from cloud console. This feature is still in preview mode and we will wait from google to hear more update from this features general availability.
In this article we will focus on some points which we need to remember before renaming VM.
- Boot disk name
- Hostname(Default)
- Hostname(custom)
Rename VM Feature
To rename VM Instance from Cloud console , VM instance should be in stop state.
Boot Disk
Renaming VM will only rename your VM instance name and not boot disk name. Boot disk name will remain same as before. So most of the cases in our confuration , especially in IaC (Terraform) we specify boot disk name as VM name that has to be taken care and analyse impact to avoid any further issues .before renaming VM.
Before rename — Boot disk name is same as VM instance name
After restart ( Only VM name changed but boot disk name is unchanged)
Hostname — Default
Before restart — Default hostname is same as VM instance name.
After rename — Default hostname is same as VM Instance name.
Custom-hostname
Before rename — custom hostname and VM name we set same with domain name appended.
After rename –
After rename only VM name changed and custom hostname remains unchanged. if you are using custom hostname or FQDN in connections, configuration then either you need to make sure its unchanged or change custom hostname in sync with VM instance name manually.
Please refer below video for demo
The original article published on Medium.