FYI - windows how to check for BSOD on Windows VM and reset

damon1

Active Member
Apr 18, 2019
95
9
28
57
Hi All,

this is partly for me in case I forget but also for other windows users.
Sometimes when you migrate a VM from one node to another it will give you a BSOD normally straight away but it might take a few minutes
When you get a BSOD on a windows VM you might have noticed the CPU goes to 100% and stays there

If you are a programmer then you can use "plink" which is part of the "Putty" program group ( requires a reboot of the computer )
This is available for windows and a simple install, ensure you use PUTTY to connect to each Proxmox node as it will transfer the fingerprint automatically. You need these for this to run.
You install Putty on the machine you want to monitor your VM's, which can be a VM itself but on the same network unless you want to open it to the WAN and port forward to each node etc...

You could create a shell or a batch file to find the list of VM's and there CPU usage, I use a programming language called XOJO.

plink -ssh 192.168.0.100 -l root -pw YourPassword -batch pvesh get /cluster/resources

192.168.0.100 is the IP of one of your Proxmox NODES.
-batch = no prompts
Everything after "-batch" is the command you want to run (pretty sure you only have one command)
Will return something like this

──────────────────────────┬─────────┬─────────┬────────────┬─────────┬───────┬────────┬────────────┬────────────┬────────────┬──────┬──────┬───────────┬──────────────┬─────────────┐
│ id │ type │ cpu │ disk │ hastate │ level │ maxcpu │ maxdisk │ maxmem │ mem │ node │ pool │ status │ storage │ uptime │
╞══════════════════════════╪═════════╪═════════╪════════════╪═════════╪═══════╪════════╪════════════╪════════════╪════════════╪══════╪══════╪═══════════╪══════════════╪═════════════╡
│ node/DC1 │ node │ 14.76% │ 7.18 GiB │ │ │ 32 │ 27.19 GiB │ 62.75 GiB │ 47.68 GiB │ DC1 │ │ online │ │ 19h 5m 47s │
├──────────────────────────┼─────────┼─────────┼────────────┼─────────┼───────┼────────┼────────────┼────────────┼────────────┼──────┼──────┼───────────┼──────────────┼─────────────┤
│ node/DC2 │ node │ 2.36% │ 6.71 GiB │ │ │ 16 │ 27.19 GiB │ 62.75 GiB │ 24.77 GiB │ DC2 │ │ online │ │ 18h 58m 43s │
├──────────────────────────┼─────────┼─────────┼────────────┼─────────┼───────┼────────┼────────────┼────────────┼────────────┼──────┼──────┼───────────┼──────────────┼─────────────┤
│ node/DC5 │ node │ 3.41% │ 3.64 GiB │ │ │ 56 │ 93.99 GiB │ 62.82 GiB │ 35.31 GiB │ DC5 │ │ online │ │ 19h 9m 20s │
├──────────────────────────┼─────────┼─────────┼────────────┼─────────┼───────┼────────┼────────────┼────────────┼────────────┼──────┼──────┼───────────┼──────────────┼─────────────┤
│ node/DC8 │ node │ 19.84% │ 5.16 GiB │ │ │ 32 │ 27.19 GiB │ 110.09 GiB │ 45.58 GiB │ DC8 │ │ online │ │ 19h 9m 17s │
├──────────────────────────┼─────────┼─────────┼────────────┼─────────┼───────┼────────┼────────────┼────────────┼────────────┼──────┼──────┼───────────┼──────────────┼─────────────┤
│ qemu/100 │ qemu │ 2.00% │ 0.00 B │ │ │ 4 │ 48.00 GiB │ 4.00 GiB │ 1.58 GiB │ DC1 │ │ running │ │ 18h 57m 19s │
├──────────────────────────┼─────────┼─────────┼────────────┼─────────┼───────┼────────┼────────────┼────────────┼────────────┼──────┼──────┼───────────┼──────────────┼─────────────┤
│ qemu/101 │ qemu │ 1.69% │ 0.00 B │ │ │ 4 │ 48.00 GiB │ 4.00 GiB │ 1.54 GiB │ DC5 │ │ running │ │ 18h 57m 45s │
├──────────────────────────┼─────────┼─────────┼────────────┼─────────┼───────┼────────┼────────────┼────────────┼────────────┼──────┼──────┼───────────┼──────────────┼─────────────┤
│ qemu/102 │ qemu │ 1.43% │ 0.00 B │ │ │ 4 │ 48.00 GiB │ 4.00 GiB │ 1.65 GiB │ DC2 │ │ running │ │ 18h 57m 28s │
├──────────────────────────┼─────────┼─────────┼────────────┼─────────┼───────┼────────┼────────────┼────────────┼────────────┼──────┼──────┼───────────┼──────────────┼─────────────┤
│ qemu/103 │ qemu │ 4.85% │ 0.00 B │ started │ │ 4 │ 48.00 GiB │ 4.00 GiB │ 2.27 GiB │ DC5 │ │ running │ │ 18h 57m 42s │



So we know VM 103 is using 4.85% of cpu. If it had a BSOD then it would show 100+%
We also know VM 103 is running on DC5, lets assume it has 100+% and we have checked it 3 times and each time it is over 100%.

To find the IP of DC5 we need to run this command
plink -ssh 192.168.0.100 -l root -pw YourPassword -batch pvesh get /cluster/status
will show you this

──────────┬────────────┬─────────┬───────────────┬───────┬───────┬────────┬───────┬────────┬─────────┬─────────┐
│ id │ name │ type │ ip │ level │ local │ nodeid │ nodes │ online │ quorate │ version │
╞══════════╪════════════╪═════════╪═══════════════╪═══════╪═══════╪════════╪═══════╪════════╪═════════╪═════════╡
│ cluster │ Daisychain │ cluster │ │ │ │ │ 4 │ │ 1 │ 49 │
├──────────┼────────────┼─────────┼───────────────┼───────┼───────┼────────┼───────┼────────┼─────────┼─────────┤
│ node/DC1 │ DC1 │ node │ 192.168.0.100 │ │ 1 │ 2 │ │ 1 │ │ │
├──────────┼────────────┼─────────┼───────────────┼───────┼───────┼────────┼───────┼────────┼─────────┼─────────┤
│ node/DC2 │ DC2 │ node │ 192.168.0.101 │ │ 0 │ 3 │ │ 1 │ │ │
├──────────┼────────────┼─────────┼───────────────┼───────┼───────┼────────┼───────┼────────┼─────────┼─────────┤
│ node/DC5 │ DC5 │ node │ 192.168.0.105 │ │ 0 │ 5 │ │ 1 │ │ │
├──────────┼────────────┼─────────┼───────────────┼───────┼───────┼────────┼───────┼────────┼─────────┼─────────┤
│ node/DC8 │ DC8 │ node │ 192.168.0.108 │ │ 0 │ 4 │ │ 1 │ │ │
└──────────┴────────────┴─────────┴───────────────┴───────┴───────┴────────┴───────┴────────┴─────────┴─────────┘


From this we can see that DC5 is the node with IP 192.168.0.105

so to reset the VM we use the command


plink -ssh 192.168.0.105 -l root -pw YourPassword -batch qm reset 103

You use the IP of the node that has the VM and "qm reset 103" will issue a reset command.

Given you have a BSOD there is no point in doing "qm shutdown 103"

Hope this helps me or someone in the future.

thanks
Damon
 
alternatively, if the VM is fine and it is only the transfer from on node to another that causes a
CRITICAL STRUCTURE error

then run this as an ADMIN from CMD

wmic RecoverOS set AutoReboot = True

this tells windows 10 to reboot after a BSOD
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!