VM shutdown instead of suspend

QNAP NAS solution for server virtualization and clustering/HA/FT
Post Reply
dF2002
New here
Posts: 3
Joined: Sat May 16, 2015 5:32 am

VM shutdown instead of suspend

Post by dF2002 »

Hi, is it possible to have a VM (Ubuntu 14) do a shutdown instead of suspend when I shutdown my NAS?

I generally shutdown my NAS nightly, and auto-reboot each day. However, the VM Ubuntu goes into suspend, and causes the time to be several hours off in the VM Ubuntu. This further creates problems with scheduled cron jobs. Or perhaps there is a way to shutdown the VM Ubuntu a few minutes before the scheduled shutdown of the NAS?
User avatar
pwilson
Guru
Posts: 22533
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: VM shutdown instead of suspend

Post by pwilson »

dF2002 wrote:Hi, is it possible to have a VM (Ubuntu 14) do a shutdown instead of suspend when I shutdown my NAS?

I generally shutdown my NAS nightly, and auto-reboot each day. However, the VM Ubuntu goes into suspend, and causes the time to be several hours off in the VM Ubuntu. This further creates problems with scheduled cron jobs. Or perhaps there is a way to shutdown the VM Ubuntu a few minutes before the scheduled shutdown of the NAS?
I can't imagine why anyone would ever shutdown a NAS, except to transport it elsewhere, but yes, of course this is possible. Simply schedule the shutdown to occur via the Crontab on the "Host OS":

Code: Select all

ssh root@192.168.1.103  /sbin/shutdown -h now
Assuming your VM lives at 192.168.1.103. Simply exchange the SSH Authorized keys between your Guest OS (Ubunutu), and the Host OS (QTS). Check out QNAPedia article: How To Set Up Authorized Keys. If you have the keys in place, you can execute commands on the GuestOS without providing any password information whatsoever when executing the command in question on your Ubuntu VM.

Simply setup this "cron event" to occur several minutes before you shutdown the NAS. If you shutdown your NAS at night, when do your scheduled Backups occur? :roll: :roll: :roll: :roll: :shock: My NAS runs 24/7/365 here, and my Backups occur "Daily".

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.
dF2002
New here
Posts: 3
Joined: Sat May 16, 2015 5:32 am

Re: VM shutdown instead of suspend

Post by dF2002 »

Hi, thanks.
Yes I suppose I could leave it on 24/7. It is almost exclusively a 4x6tb media box serving up Kodi, and only gets used in the evening, so sits 20 hours a day idle. I have been scheduling it to shutdown late at night, and back up after supper.
I have another qnap with 2x8tb planning to use for backups. I really should think about an automated backup schedule, and maybe use it for backing up my Win10 system. ;)
User avatar
pwilson
Guru
Posts: 22533
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: VM shutdown instead of suspend

Post by pwilson »

dF2002 wrote:Hi, thanks.
Yes I suppose I could leave it on 24/7. It is almost exclusively a 4x6tb media box serving up Kodi, and only gets used in the evening, so sits 20 hours a day idle. I have been scheduling it to shutdown late at night, and back up after supper.
I have another qnap with 2x8tb planning to use for backups. I really should think about an automated backup schedule, and maybe use it for backing up my Win10 system. ;)
I do my Backups in the middle of the night here. In fact my poor NAS works harder when I'm sleeping than it does when I'm awake. Use that "other" QNAP to backup all your machines, including "this" NAS. RTRR can be used to Backup between NAS devices. I have no idea what the best method of Backing up Windows goes. I used to use Norton Ghost to my NAS under Windows 7. (I no longer run Windows at all).

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.
vikino
Know my way around
Posts: 131
Joined: Sun Jul 10, 2016 3:06 am

Re: VM shutdown instead of suspend

Post by vikino »

hi all,
is there any chance to change this? For ex.when updating QTS then it would be nice if my windows servers shut down too,instead od hibernating them...
Post Reply

Return to “Server Virtualization & Clustering”