You are performing some kind of configuration on a Google cloud-based Windows server and then it suddenly disconnects from the internet. I’m sure you have already encountered such issues before. This guide will show you how to recover quickly with minimal fuss.
This problem can arise due to errors in network, routing, and VPN client settings, not to mention Windows Firewall configuration issues.
While using Google Cloud (using the console), you can access the instance SAC (Special Administration console) interface via the serial console port. Through SAC, you can initiate and access the command-line interface with administrator privileges to resolve the problem.
The console is similar to a terminal window. The input and output are in text mode. There is also no graphical interface or mouse support.
Keep in mind that you will require the server or domain administrator password for the server to perform the following steps.
Let’s Simulate This Scenario
In order to create a demonstration for this article, I simulated a server that is disconnected from the Internet. I connected to the server and intentionally changed the instance IP address from Obtain an IP address automatically (DHCP) to a static setting with the IP 126.96.36.199.
As you can see, the server stopped responding to pings immediately. After a few seconds, the RDP (remote desktop) connection was also lost.
Getting the Server Back Online
1. On the Google Cloud Compute Engine page, click on the instance name, then click on Connect to serial console button:
If the button is greyed out and not clickable, click on Edit and check the Enable connecting to serial ports option. Save the changes.
If the instance is part of an instance group, or you prefer to work with cli, you can use the following gcloud command:
gcloud compute instances add-metadata <INSTANCE_NAME> --metadata serial-port-enable=1 --project <PROJECT-ID>
Click the Connect to serial console button. You should now see a new screen opening up with the instance console.
2. The screen you see now is the output of the SAC, through which we will reach the command line interface.
SAC allows the execution of multiple operations, but I’ll keep things simple. Let’s use SAC to reach the server command-line interface.
3. Type in the command:
to create the command prompt session, and then type the command:
ch -sn <ChannelName>
to switch to the command line screen. Press Enter.
In the example below, the Channel name is Cmd0001.
Some connection details will now appear on the screen. This information is irrelevant to this demo. Press Enter in the console screen to proceed.
4. To access the command-line interface, you must connect with the domain/server administrator credentials. Enter the username, domain (optional), password, and press Enter.
You have now accessed the server’s command-line interface with administrator privileges:
5. Using cli commands, you can handle common configuration errors that may have caused the server to disconnect:
- Turn off the Windows firewall.
- Disable VPN interface.
- Delete the static route from the routing table.
8. In the configuration error I simulated, I need to revert the network settings from a static IP setting of 188.8.131.52 to DHCP. Type:
to receive a list of the network interfaces configuration in the server.
The server has one network interface named Ethernet, and the network interface IP address is 184.108.40.206.
9. Use the following command to change the interface settings from static IP to DHCP, replace InterfaceName with your server interface name:
netsh interface ip set address "<InterfaceName>" dhcp
That’s it. The server is back online and responding to ping:
This methodology applies only to Google Cloud users who are dealing with accidental and sudden network disconnections. Stay productive!