I accidentally disabled the network adapter on Windows virtual machine on compute engine. I tried delete-access-config and add-access-config through gcloud utility and that did not seem to make any difference. Any suggestions on how to enable the network adapter back so I can RDP back into VM or am I going to have to re-build the VM?
gcloud compute project-info add-metadata --metadata serial-port-enable=1
The console:
- Go to the Metadata page.
- Click Edit to edit metadata entries.
- Add a new entry with the key serial-port-enable and value 1.
Then, to connect the serial port on Windows VM you can use the gcloud command below (replace with your windows instance name) or trough the console [2]
gloud command line:
gcloud compute connect-to-serial-port <windows instance name> --port 2
The console:
- Click the instance you want to connect to.
- Under Remote access, click Connect to serial console to connect on the default port (port 1).
- If you want to connect to another serial port, click the down arrow next to the Connect to serial console button and change the port number accordingly.
- For Windows instances, pull down the dropdown menu next to the button and connect to Port 2 to access the serial console.
Links:
[1]https://cloud.google.com/compute/docs/instances/interacting-with-serial-console
[2]https://cloud.google.com/compute/docs/instances/interacting-with-serial-console#connectserialconsole
[1]https://cloud.google.com/compute/docs/instances/interacting-with-serial-console
Carefully and I already do it , but after I click to connect to serial consolo port 2 . It open new windows same the picture I already upload before . I already try use gcloud to connect and I still can't enter anything
This is picture in my cloud
Hello,
I was unable to reproduce the issue. I suggest following the below method to resolve this issue, try enabling the network adapter by using a temporary startup script [1] by following these steps:
1. Go to Google Cloud Console -> select your Compute Engine instance -> Click Edit.
2. Under custom metadata, type ‘windows-startup-script-cmd’[2] on key box and type ‘netsh interface set interface name="Local Area Connection" admin=enabled’ [2] on value.
3. Click ‘save’.
4. Restart your instance by clicking on ‘Reset’.
5. After rebooting try connecting to your instance through RDP.
[1] https://cloud.google.com/compute/docs/startupscript#providing_startup_script_contents_directly
[2] https://cloud.google.com/compute/docs/startupscript#providing_a_startup_script_for_windows_instances