Is there a way to keep VM alive?

chchia

Active Member
Aug 18, 2020
82
30
38
47
one of my VM running windows 10 with HDMI and Audio passthrough, but something is wrong, 1st start on the vm the HDMI sound will work just fine, but if i restart the Windows 10 within vm, the next start on ward i will lost HDMI sound. this especially when windows update and it restart it self and i will lost the sound.

I need to shut it down, and use proxmox webui to start it again to get the HDMI sound work.
(i dont know why it doesnt work on every restart, but that another topic to discuss. it was Intel i7100 CPU with IGP and HDMI Audio passthrough).

so i am thinking of another option to set a cron tab to start the VM every few minutes, i have this in crontab -e

3 * * * * /usr/sbin/qm start 101 >/dev/null 2>&1

which suppose the crontab try to start vm 101 every 3 minutes when i shut it down just to make sound work and i dont need to open proxmox webui (i know it will create a lot of log of Error: VM 101 is already running if the crontab work).

however, the crontab doesnt work, i shutdown the VM, waited 5 minutes, vm 101 was never started by crontab.

if i run this in the console /usr/sbin/qm start 101 >/dev/null 2>&1 vm 101 will get started correctly.

any suggestion or advice?

i hope something like to ping vm 101 every 3 minutes, if 101 is not responding, then qm start 101

thank you.
 
Last edited:
3 * * * * /usr/sbin/qm start 101 >/dev/null 2>&1
*/3 for every 3 minutes, otherwise its 3 min past the hour.
https://en.wikipedia.org/wiki/Cron

I need to shut it down, and use proxmox webui to start it again to get the HDMI sound work.
(i dont know why it doesnt work on every restart, but that another topic to discuss. it was Intel i7100 CPU with IGP and HDMI Audio passthrough).
You can tell Windows to shutdown on update and use HA (even single node) to keep the service alive (running). Then on every shutdown the VM is started up by HA.
 
i didnt know that HA is work even in single node, thank you so much!
 

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!