Troubleshooting virtual machines
If a virtual machine fails to deploy
Review the error message on the VM right pane. One of the possible root causes is that compute nodes lack free RAM or CPU resources to host the VM.
If a virtual machine is stuck in a failed or transitional state
Reset the VM to its last stable state: active, shut down or shelved:
- Click the stuck VM.
- On the VM right pane, click Reset state.
If a virtual machine is stuck with the “Powering off” task state
In this case, a VM will have the “Active (Powering off)” status on its right pane.
You can cancel this task by running vinfra service compute server cancel-stop
(refer to "vinfra service compute server cancel-stop" in the Administrator Command Line Guide). The command will cancel the guest OS shutdown and return the VM to the active state.
If logging is disabled inside a virtual machine
To troubleshoot a VM, you can also examine the VM console log by clicking Download console log on the VM right pane. The log will contain log messages only if logging is enabled inside the VM, otherwise the log will be empty.
To enable logging, do the following:
-
In Linux VMs, enable the TTY1 and TTYS0 logging levels:
-
Add the line
GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0"
to the file /etc/default/grub. -
Depending on the boot loader, run either
# grub-mkconfig -o /boot/grub/grub.cfg
or
# grub2-mkconfig -o /boot/grub2/grub.cfg
-
Reboot the VM.
-
-
In Windows VMs, enable Emergency Management Services (EMS) console redirection:
-
Start Windows PowerShell by using administrator privileges.
-
In the PowerShell console, set the COM port and baud rate for EMS console redirection. As Windows VMs have only the COM1 port with the transmission rate of 9600 bps, run:
bcdedit /emssettings EMSPORT:1
-
Enable EMS for the current boot entry:
bcdedit /ems on
-
You may also enable driver status logging to see the list of loaded drivers. This can be useful for troubleshooting a faulty driver or long boot process. Do the following:
- Start System Configuration by using administrator privileges.
- In the System Configuration windows, open the Boot tab, and select the check boxes OS boot information and Make all boot settings permanent.
- Confirm the changes and restart the system.