Hi All,
I have a windows VM created in GCP and it is registered in our company domain. I have created the machine image of the VM. When I try to create another VM using this image (provided the new name to the VM), the issue I am facing is :
Even though the newly created VM have its name set, but inside the VM the host name is still the original VM name of the image. Also, new VM got the domain settings from image, it is updating the IP address of the original VM in the domain controller with this new VM IP.
Can some one please advise on what would be the best solution to this situation. All I wanted is, the new VM host name (inside the VM) also gets updated with the name we give during VM creation.
Regards,
Pradeep
You are able to create new VM with same image while having your own custom hostname in GCP [1] by:
-expanding the "Networking, disks, security, management, sole tenancy" section . While creating new VM with image
-again expanding "Networking"
-Now in "hostname" field provide your custom hostname. Make sure hostname must have at least two labels like "myserver.com" where "myserver" being first label and "com" being second label.
-with other necessary customization, click Create.
Thank You
[1] https://cloud.google.com/compute/docs/instances/custom-hostname-vm#create-custom-hostname
Hi gcpsupp,
** Please note I am referring to Windows based VM
Thanks for reaching out on this. I have tried with above settings, but still no luck.
The VM got created with the same name as the machine image.
If you see the VM basic Information, I have populated the hostname value
I expect my new server name to be test-image-hostname-1 inside the server as host name.
Hope I am not missing anything. As I mentioned the issue with this is, the moment this VM comes online, it is overwriting (as the name matches to the name in out internal domain controller) the IP address of original VM where the image created.
Regards,
Pradeep
hi @sp2007 , jus want to check if you got an opportunity to look in to this. thank you.