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.

重启Unraid不会关闭执行虚拟机的关机

Featured Replies

如果直接重启unraid系统没有执行虚拟机的关机,重启后进入虚拟机会看到意外关机的提示,应该是用的强制关闭。

现在每次重启都需要手动点击虚拟机的关机后再重启,这个能用脚本解决吗?

Solved by mysll

建议手动关闭vm,停止阵列后,再进行重启。防止数据的异常丢失。

脚本肯定可以实现,但是我不会

具体是什么虚拟机?一般出现你说的现象是因为不具备完整的acpi管理造成,以黑裙和openwrt为代表,黑裙安装powerbutton插件,openwrt编译时勾选acpid。

新建一个文件,/boot/config/stop

写上

#!/bin/sh

virsh shutdown 虚拟机名字

stop和go文件一样,一个是启动执行,一个是关机执行

12 hours ago, mysll said:

新建一个文件,/boot/config/stop

写上

#!/bin/sh

virsh shutdown 虚拟机名字

stop和go文件一样,一个是启动执行,一个是关机执行

这样会导致虚拟机异常关机,如黑晖。虚拟机安装插件支持acpi关机指令会更好。

On 6/5/2022 at 11:37 PM, lyqalex said:

这样会导致虚拟机异常关机,如黑晖。虚拟机安装插件支持acpi关机指令会更好。

shutdown并不会异常关机,如果没有acpi,shutdown可能没有作用,强行关机是virsh destroy

  • Author
On 6/2/2022 at 10:15 AM, lyqalex said:

具体是什么虚拟机?一般出现你说的现象是因为不具备完整的acpi管理造成,以黑裙和openwrt为代表,黑裙安装powerbutton插件,openwrt编译时勾选acpid。

是黑裙,已经加了acpi驱动了,可以在虚拟机管理页面点击停止正常关机,但是如果直接重启unraid就会收到异常关机的提示,和点强制停止的效果一样

image.png.bf42049af83171cbd333517b0bbdfa25.png

 

  • Author
On 6/10/2022 at 9:31 PM, mysll said:

shutdown并不会异常关机,如果没有acpi,shutdown可能没有作用,强行关机是virsh destroy

感谢大佬, shutdown 是可以的,但是有个问题就是命令是异步的,不会等待虚拟机关闭,就是执行完马上会收到 Domian xxx is being shutdown,但这时候虚拟机还没那么快关机,如果是放在关机脚本估计就是还是直接断电了, 我估计还得加个轮询判断一下😓

1 hour ago, Will Chen said:

感谢大佬, shutdown 是可以的,但是有个问题就是命令是异步的,不会等待虚拟机关闭,就是执行完马上会收到 Domian xxx is being shutdown,但这时候虚拟机还没那么快关机,如果是放在关机脚本估计就是还是直接断电了, 我估计还得加个轮询判断一下😓

我都是这样弄的,都是正常关机的,你是不是群晖关机要很久,他有个设置是等待多久如果还没有关掉,就会强行关掉虚拟机,你打开你的dsm的网页,然后unraid里重启,看着dsm的网页看看执行到哪 一步了

  • Solution
4 minutes ago, mysll said:

我都是这样弄的,都是正常关机的,你是不是群晖关机要很久,他有个设置是等待多久如果还没有关掉,就会强行关掉虚拟机,你打开你的dsm的网页,然后unraid里重启,看着dsm的网页看看执行到哪 一步了

https://forums.unraid.net/topic/69868-dealing-with-unclean-shutdowns/

  • Author
14 hours ago, mysll said:

我都是这样弄的,都是正常关机的,你是不是群晖关机要很久,他有个设置是等待多久如果还没有关掉,就会强行关掉虚拟机,你打开你的dsm的网页,然后unraid里重启,看着dsm的网页看看执行到哪 一步了

关机是挺久的 我试试看

  • 9 months later...
On 6/17/2022 at 10:07 AM, Will Chen said:

666,延长了等待时间,可以了,感谢😁

具体命令怎么写,请教

  • 3 weeks later...
  • Author
On 3/26/2023 at 4:06 AM, muihiuwev said:

具体命令怎么写,请教

 

界面就可以改,Setting - VM Manager

Snipaste_2023-04-11_10-44-55.png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

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.