Will Chen Posted May 31, 2022 Share Posted May 31, 2022 如果直接重启unraid系统没有执行虚拟机的关机,重启后进入虚拟机会看到意外关机的提示,应该是用的强制关闭。 现在每次重启都需要手动点击虚拟机的关机后再重启,这个能用脚本解决吗? Quote Link to comment
Hiccup Posted June 1, 2022 Share Posted June 1, 2022 建议手动关闭vm,停止阵列后,再进行重启。防止数据的异常丢失。 Quote Link to comment
lyqalex Posted June 2, 2022 Share Posted June 2, 2022 具体是什么虚拟机?一般出现你说的现象是因为不具备完整的acpi管理造成,以黑裙和openwrt为代表,黑裙安装powerbutton插件,openwrt编译时勾选acpid。 Quote Link to comment
mysll Posted June 5, 2022 Share Posted June 5, 2022 新建一个文件,/boot/config/stop 写上 #!/bin/sh virsh shutdown 虚拟机名字 stop和go文件一样,一个是启动执行,一个是关机执行 1 Quote Link to comment
lyqalex Posted June 5, 2022 Share Posted June 5, 2022 12 hours ago, mysll said: 新建一个文件,/boot/config/stop 写上 #!/bin/sh virsh shutdown 虚拟机名字 stop和go文件一样,一个是启动执行,一个是关机执行 这样会导致虚拟机异常关机,如黑晖。虚拟机安装插件支持acpi关机指令会更好。 Quote Link to comment
mysll Posted June 10, 2022 Share Posted June 10, 2022 On 6/5/2022 at 11:37 PM, lyqalex said: 这样会导致虚拟机异常关机,如黑晖。虚拟机安装插件支持acpi关机指令会更好。 shutdown并不会异常关机,如果没有acpi,shutdown可能没有作用,强行关机是virsh destroy Quote Link to comment
Will Chen Posted June 16, 2022 Author Share Posted June 16, 2022 On 6/2/2022 at 10:15 AM, lyqalex said: 具体是什么虚拟机?一般出现你说的现象是因为不具备完整的acpi管理造成,以黑裙和openwrt为代表,黑裙安装powerbutton插件,openwrt编译时勾选acpid。 是黑裙,已经加了acpi驱动了,可以在虚拟机管理页面点击停止正常关机,但是如果直接重启unraid就会收到异常关机的提示,和点强制停止的效果一样 Quote Link to comment
Will Chen Posted June 16, 2022 Author Share Posted June 16, 2022 On 6/10/2022 at 9:31 PM, mysll said: shutdown并不会异常关机,如果没有acpi,shutdown可能没有作用,强行关机是virsh destroy 感谢大佬, shutdown 是可以的,但是有个问题就是命令是异步的,不会等待虚拟机关闭,就是执行完马上会收到 Domian xxx is being shutdown,但这时候虚拟机还没那么快关机,如果是放在关机脚本估计就是还是直接断电了, 我估计还得加个轮询判断一下😓 Quote Link to comment
mysll Posted June 16, 2022 Share Posted June 16, 2022 1 hour ago, Will Chen said: 感谢大佬, shutdown 是可以的,但是有个问题就是命令是异步的,不会等待虚拟机关闭,就是执行完马上会收到 Domian xxx is being shutdown,但这时候虚拟机还没那么快关机,如果是放在关机脚本估计就是还是直接断电了, 我估计还得加个轮询判断一下😓 我都是这样弄的,都是正常关机的,你是不是群晖关机要很久,他有个设置是等待多久如果还没有关掉,就会强行关掉虚拟机,你打开你的dsm的网页,然后unraid里重启,看着dsm的网页看看执行到哪 一步了 Quote Link to comment
Solution mysll Posted June 16, 2022 Solution Share Posted June 16, 2022 4 minutes ago, mysll said: 我都是这样弄的,都是正常关机的,你是不是群晖关机要很久,他有个设置是等待多久如果还没有关掉,就会强行关掉虚拟机,你打开你的dsm的网页,然后unraid里重启,看着dsm的网页看看执行到哪 一步了 https://forums.unraid.net/topic/69868-dealing-with-unclean-shutdowns/ Quote Link to comment
Will Chen Posted June 17, 2022 Author Share Posted June 17, 2022 14 hours ago, mysll said: 我都是这样弄的,都是正常关机的,你是不是群晖关机要很久,他有个设置是等待多久如果还没有关掉,就会强行关掉虚拟机,你打开你的dsm的网页,然后unraid里重启,看着dsm的网页看看执行到哪 一步了 关机是挺久的 我试试看 Quote Link to comment
Will Chen Posted June 17, 2022 Author Share Posted June 17, 2022 14 hours ago, mysll said: https://forums.unraid.net/topic/69868-dealing-with-unclean-shutdowns/ 666,延长了等待时间,可以了,感谢😁 Quote Link to comment
muihiuwev Posted March 25 Share Posted March 25 On 6/17/2022 at 10:07 AM, Will Chen said: 666,延长了等待时间,可以了,感谢😁 具体命令怎么写,请教 Quote Link to comment
Will Chen Posted April 11 Author Share Posted April 11 On 3/26/2023 at 4:06 AM, muihiuwev said: 具体命令怎么写,请教 界面就可以改,Setting - VM Manager Quote Link to comment
Recommended Posts
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.