Basic Troubleshoot
Connecting to the Host QEMU
First, use cse-admin and password K19 to ssh to the host QEMU (e.g. ecc-a-qemu01.rd.unr.edu) machine.
The qemu number can be calculated: (computer number + 1) / 2.
Example: A-07 would be (7+1)/2 = 4 = QEMU04.
A-08 would be (8+1)/2 = 4 = QEMU04.
Waking up a VM
When the monitor of the VM is off, you can ssh to the host machine to see if the host machine is not turn off accidentally.
If the host machine is on(which means that you can ssh to it), you can check the status of the corresponding VM by :
Use systemctl status hmux@ecc-a-(machine number) to check the status of the vms.
Use uptime to check how long the machine have been running.
# systemctl status hmux@ecc-(Lab)-(Machine Number)
$ systemctl status hmux@ecc-a-09
To wake up the vm
# socat - UNIX-CONNECT:/var/run/qemu/ecc-(Lab)-(Machine Number)/monitor
$ socat - UNIX-CONNECT:/var/run/qemu/ecc-a-09/monitor
VM is not responding
- Try to Stop Vms:
# systemctl stop hmux@ecc-(Lab)-(Machine Number)
$ systemctl stop hmux@ecc-a-01
- If Stop Does Not Work, Use Socat
To gently shutdown the vm, first login to the host machine and connect to the monitor file as root
$ socat - UNIX-CONNECT:/var/run/qemu/ecc-a-${COMP_NUMBER}/monitor # Once connected to the monitor, type quit to shutdown gracefully $ quit
- If Stop and Socat Do Not Work, Kill the Proccess
If the machine is still not responding, a more forceful command will be required. First, find the process id of the rogue VM
$ ps aux | grep qemu
This will output the processes being run with qemu, one of which should be the machine that is causing issues. Once the correct pid is found, kill the process by typing
$ sudo kill ${pid}
To Start Vms
# systemctl start hmux@ecc-(Lab)-(Machine Number)
$ systemctl start hmux@ecc-a-01
Restart Host
You may need to resart the host if the USB connection is not working.
$ reboot
Qemu Host not responding to start command
If the virtual machines are not responding after the the host restarted, use the unbind script with the following command with root.
$ /var/qemu/unbind.sh
Create a new Virtual Machine
- ssh to the host machine
- get root access by entering $ sudo su
- $ cd /var/tmp
- $ ls to make sure win10.iso and virtio.iso are within the directory
- Remove the old volume
# lvremove (volume group)/(Vm name)
$ lvremove vg0/ecc-a-17
- Create a new blank volume:
# lvcreate (Size) -n (Vm name ) (volume group)
$ lvcreate -L300G -n ecc-a-17 vg0
- Last Author
- cpollock
- Last Edited
- Sep 25 2017, 4:27 PM