You can use the Emergency Management Services (EMS) console which once connected, will present you with a Command Prompt.
- From your terminal or in Cloud Shell, enable connections to the serial ports on your VM:
gcloud compute instances add-metadata <VM-NAME> --metadata=serial-port-enable=1
Replacing <VM-NAME>
with the name of the VM on which to enable the serial ports.
- Connect to the EMS console on serial port
2
of your VM:
gcloud compute connect-to-serial-port <VM-NAME> --port 2
Replacing <VM-NAME>
with the name of the VM with the serial port to connect to.
- Verify that you see output similar to the following:
Computer is booting, SAC started and initialized.
Use the "ch -?" command for information about using channels.
Use the "?" command for general help.
SAC>
EVENT: The CMD command is now available.
SAC>
- Create a new command prompt session by using the
cmd
command and verify output similar to the following:
The Command Prompt session was successfully launched.
SAC>
EVENT: A new channel has been created. Use "ch -?" for channel help.
Channel: Cmd0001
SAC>
- Connect to the new command prompt session by using the
ch -si 1
command and verify output similar to the following:
Name: Cmd0001
Description: Command
Type: VT-UTF8
Channel GUID: 28de7392-5413-11ea-bb03-c9656a2ed613
Application Type GUID: 63d02271-8aa4-11d5-bccf-00b0d014a2d0
Press <esc><tab> for next channel.
Press <esc><tab>0 to return to the SAC channel.
Use any other key to view this channel.
Press Enter
to connect to the session.
Sign in to the session by entering your login credentials for this VM, after which the EMS console opens in the C:\Windows\system32
directory. Type help
for a list of available commands in the EMS console.
Links: