GCP VM Clone issue with hostname inside server

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.

 

Some additional notes:

 

The VM got created with the same name as the machine image.

dumpalap_0-1644790052748.png

 

If you see the VM basic Information, I have populated the hostname value

 

dumpalap_1-1644790052750.png

 

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

0 8 1,369
8 REPLIES 8

Hello,

I have tried to create a VM with an image from another VM. I was able to specify a different hostname for this second VM. I was following the guidance of these two links [1][2]. Are you following any particular documentation?

 

As for your second question about the domain, I would suspect that the new VM, given a different hostname, would not overwrite the domain IP of the original VM because it has a different hostname. Is this what you mean?

 

Let me know if any of this helps.

 

[1] Creating a VM instance with a custom hostname : 

https://cloud.google.com/compute/docs/instances/custom-hostname-vm?hl=en#create-custom-hostname

 

[2] Create VM instances from machine images : 

https://cloud.google.com/compute/docs/machine-images/create-instance-from-machine-image?hl=en#create...

Hi @murphyderek ,

Thank you for responding. I do not have any issues with the Linux based VMs. Its the problem with Windows based VMs. Just want to check if you have tried with Windows based images.

 

Regards,

Pradeep

Hello,

I tried to create a Windows VM from an image while specifying a custom hostname and I was successful. Just curious, what are the steps you are going through? (Any specific documentation?)

Hi @murphyderek ,

I tried following above links only. even though I have populated host name different than what is of image, it still not getting updated.

I still see the hostname as source VM of image. I tried in my personal google account to. its the issue with windows VM. 

Can you please recheck at your side the host name inside the windows VM got new name ? 

It may be possible with VirtualBox to place the VM in the same network, thus allowing you to contact the host over the network, you still need to know the host to find out what its IP or hostname is... 

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
I am on the same direction, I just installed the VM ware with different OS's on my desktop and now im configuring my Windows Server 2003 Enterprise edition inside my VM ware with Windows 7, and Fedora Core 4, for now. Maybe cloning the same hostname might give you conflicts and perhaps if you assign a different hostname other than the same hostname and IP address from your actual ISP, will allow you to have a connection within the server? This is to see if the setup process I'm configuring is correct. Windows Sever is complicated to work how you want it to work without the security risks if you configure it correctly.

I am afraid that I do not completely understand your last post. Can you elaborate or put the information in a simpler form? For example, what do you mean by “VM ware”? Do you mean the VMware product for virtual machines seen here[1]? 

 

Google Cloud VMware Engine : 

https://cloud.google.com/vmware-engine?hl=en

Facing same issue with RHEL 7+ and Centos 7+ (Rhel 8 , rhel 9, centos ) VMS on GCP.
Cloned vm still uses same hostname of its original vm