VM shutdown instead of suspend

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

VM shutdown instead of suspend

Postby dF2002 » Mon Aug 31, 2015 8:14 am

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: 22589
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: VM shutdown instead of suspend

Postby pwilson » Mon Aug 31, 2015 10:24 am

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

Postby dF2002 » Tue Sep 01, 2015 5:20 am

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: 22589
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: VM shutdown instead of suspend

Postby pwilson » Tue Sep 01, 2015 6:17 am

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
Getting the hang of things
Posts: 71
Joined: Sun Jul 10, 2016 3:06 am

Re: VM shutdown instead of suspend

Postby vikino » Sun Aug 13, 2017 5:19 am

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...
TVS-1282T3-i7-64G + 8x WD Red Pro 10TB, 4x Samsung 850 512GB SSD + 2x Samsung 850 M.2 512GB cache, 2x 1TB Samsung 960 Pro M.2 NVMe SSD in QM2 card
TS-453B-8G + 4x WD Red 6TB + 2x 128GB NVMe SSD in QM2 card for cache


Return to “Server Virtualization & Clustering”

Who is online

Users browsing this forum: No registered users and 2 guests