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.

[6.3.0-rc4] Shutdown processing does not complete when VMs take too long

Featured Replies

Description: The "Shutdown time-out" value of 60 seconds is too short to let the rc.libvirt script finish.

 

How to reproduce: Shutdown with a VM that hangs.  This happens when a Windows 10 VM is processing updates.

 

Expected results: The VM would at least be forced to shutdown and unRAID shutdown processing would continue normally.

 

Actual results: The VM is shutdown with the equivalent of pulling the plug and stopping services events are not processed.

 

Other information: The rc.libvirt script is used to shutdown VMs and has a 60 second timer it uses to allow VMs time to shutdown normally.  If the timer runs out, VMs are forced to shutdown.  The "Shutdown time-out" value of 60 seconds is not enough time for the rc.libvirt script to complete causing shutdown processing to be abruptly terminated.

 

rc.libvirt snippet:

TIMEOUT=${TIMEOUT:-60}
OPTS=${OPTS:-" -f /etc/libvirt/libvirtd.conf -p $PIDFILE "}

check_running_machines() {

  count=0

  for machine in $(/usr/sbin/virsh list --uuid --state-running | grep -v ^$); do
    /usr/sbin/virsh shutdown $machine
  done

  echo -n "Waiting on VMs to shutdown"

  while [ $(/usr/sbin/virsh list --name --state-running | grep -v ^$ | wc -l) -gt "0" ]; do
    if [ "$count" -ge "$TIMEOUT" ]; then
      break
    fi
    echo -n "."
    count=$(expr $count + 1)
    sleep 1
  done

  echo ""

  if [ $(/usr/sbin/virsh list --name --state-running | grep -v ^$ | wc -l) -gt "0" ]; then

    echo "The following VMs are still running, forcing shutdown: $(/usr/sbin/virsh list --state-running --name | grep -v ^$ | paste -sd ',')"
    for machine in $(/usr/sbin/virsh list --state-running --uuid | grep -v ^$); do
      /usr/sbin/virsh destroy $machine
    done

    sleep 2
  fi

}

 

Suggestion:

- Set default "Shutdown time-out" to 90 seconds.

- Do not let a value of less than 90 seconds be used.

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.