If you have an instance that you forgot where the instance is created in GCP ( Google cloud platform )or AWS (Amazon web services) for identification we need to run commands based on the Operating systems that you have created. The use of finding out the platform created is to pay bills assign IP or restart or delete instances.
The main use of the tutorial methods is to ask the metadata server whether a Virtual Machine is running in Compute Engine, depending on the operating system of the Virtual Machine.
Find using the metadata server
For the Linux Operating System-based Virtual Machine, you need to follow the command to find out the partner.
curl metadata.google.internal -i
It will return the data like below-attached image
For the Windows Operating System-based Virtual Machine, you need to follow the command to find out the partner.
curl metadata.google.internal -i
It will return the data like below-attached image
Find using the operating system tools
Depending on the virtual machine’s working device, use one of the following tactics to apply device this is particular to the virtual machine working device to hit upon if the VM is going for walks in Compute Engine.
For the Linux Operating System-based Virtual Machine, you need to follow the command to find out the partner.
sudo dmidecode -s system-product-name | grep "Google Compute Engine"
It will return the data like below-attached Image
For the Windows Operating System-based Virtual Machine, you need to follow the command to find out the partner.
msinfo32
It will return the data like below-attached Image
The image shows that it was a google cloud instance.
Thanks for reading this post. If you find this post useful you can give ratings.