Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

(SOLVED) Paused VM is powered off instead of hibernated/shutdown correcly

Featured Replies

I have a windows VM on my ssd cache drive, I want to have it paused most of the time, but when it is paused and I shutdown/reboot unraid the windows install inside the VM gets powered incorrectly(instead of hibernated/shutdown correctly).

 

If I hibernate the VM manually it usually takes around 10 seconds for the ssd to stop showing reads/writes, I increased the "VM shutdown time-out" to 90 but problem persists.

 

The VM doesn't have any extra hardware attached to it.

 

Is this normal unraid behavior? any way to workaround it? thanks

vm.png

 

Edit:

Unraid(6.8.3) isn't considering/handling correctly paused VMs (/etc/rc.d/rc.libvirt -> stop_running_machines)

If you have a paused VM you'll run into forced VMs shutdown when shutting down/rebooting Unraid and also issues when trying to stop Unraid array

I made a solution for this (see below)

I tested the solution on versions: 6.8.3, 6.9.1, 6.9.2

Update:

It seems the issue is a bit worst on 6.9.1 as it seems to force a parity check after an unclean shutdown caused by the bug. Luckily the solution still works for 6.9.1

Last Update:

The issue seems fixed and it is marked as fixed on the changelog since unraid Version 6.10.0 2022-05-07

You can still use the solution on older unraid versions

Edited by danielocdh
issue fixed on 6.10.0

5 minutes ago, danielocdh said:

Is this normal unraid behavior?

Yes, because you haven't set it in VM Settings

image.png.f14d7b03c7460fad240ad919365cfc59.png

 

And you will also have to install on the VM the Virtio Guest Tools (which is in the virtio iso)

  • Author
11 hours ago, Squid said:

Yes, because you haven't set it in VM Settings

image.png.f14d7b03c7460fad240ad919365cfc59.png

 

And you will also have to install on the VM the Virtio Guest Tools (which is in the virtio iso)

there are only 2 "upon host shutdown" settings, which one would would I have to set to avoid an incorrect shutdown?

I guess I didn't fully explained myself, I tried with "upon host shutdown" on both shutdown or hibernate, the VM still gets powered off incorrectly.

virtio tools are installed, manual hibernate and stop from unraid work correctly(windows is hibernated/shutdown correctly)

  • 3 weeks later...
  • Author

The issue is fixed since unraid Version 6.10.0 2022-05-07, so you only need to use the script on older versions.

 

So the fix I'm using now (tested on Unraid 6.8.3, 6.9.1, 6.9.2) is to edit /etc/rc.d/rc.libvirt ->stop_running_machines to correctly handle paused VMs on shutdown/reboot or array stop. Basically I just added commands so stop_running_machines tries to resume the paused VMs, after that they will be hibernated/shutdown as usual.

 

rc.libvirt is not persistent so I created a php script to edit it as needed, I'm running the script with CA User Scripts with the scheduling set as "At First Array Start Only" (need to run the script once after creating it). php script file attached

 

script

Edited by danielocdh
fixed on 6.10.0

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.