Proxmox 4.0 VE fresh install: can't shutdown VMs with host

Taras_

New Member
Oct 22, 2015
12
0
1
Shutdown works correctly from GUI both for individual VMs and for all VMs together ("Stop al VMs"), but VM's don't stop during host shutdown/reboot.

In task log I can see&nbsp ("Stop al VMs"):
Code:
Task viewer: Stop all VMs and Containers
Stopping VM 101 (timeout = 180 seconds)
Stopping VM 100 (timeout = 180 seconds)
TASK OK</span>

Host reboot:
Code:
Task viewer: Stop all VMs and Containers
TASK OK
Seems like Proxmox don't even try to shutdown guests :(

P.S. Shutdown of CTs with host are OK.
 
First guest if FreeBSD (pfSense), another is Windows 2008 R2 with all vitio stuff installed. Both guests don't stop with host and there aren't any errors (timeouts) in Proxmox's "Task history".

And I can't understand why "Shutdown all VMs" works fine?
 
I don't believe in timeout because I can't confirm it.

1. Where can I see something like "Timeout reached"?
2. What difference between "Stop all VMs" from GUI and shutting down the host?
3. When clicking "Stop all VMs" I can see in log a string for each VM (i.e. "Stopping VM 101 (timeout = 180 seconds)") but when I shutdown host I can see only "STATUS OK". So, I can't see/confirm Proxmox is trying to shutdown VMs.
 
I set "Shutdown timeout" to 600 for both VMs and restarted Proxmox via GUI. Host went away in less than minute. It's not a timeout/acpi problem.
 
Oh, I've got it now, sorry. So shutdown in GUI works as expected. Hm, I don't have this issue because I explicitly shutdown important VMs before planned host shutdown.

If you do service pve-manager stop does it return immediately? That should take down the VMs and CTs.
 
"service pve-manager stop" works well, it waits for all VMs and CTs to shutdown:
Code:
root@web1:~# date; service pve-manager stop; date
Thu Oct 22 18:18:29 MSK 2015
Thu Oct 22 18:19:10 MSK 2015
root@web1:~#

In log I can see:
Code:
[COLOR=#000000][FONT=tahoma]Stopping CT 103 (timeout = 60 seconds)[/FONT][/COLOR]
[COLOR=#000000][FONT=tahoma]Stopping CT 102 (timeout = 60 seconds)[/FONT][/COLOR]
[COLOR=#000000][FONT=tahoma]Stopping VM 101 (timeout = 600 seconds)[/FONT][/COLOR]
[COLOR=#000000][FONT=tahoma]Stopping VM 100 (timeout = 600 seconds)[/FONT][/COLOR]
[COLOR=#000000][FONT=tahoma]TASK OK[/FONT][/COLOR]
 
Shutdown logs? (not the task viewer but the host logs on shutdown). You can easily capture that using a configured IPMI serial console.
Maybe boot without "quiet"
 
Shutdown logs? (not the task viewer but the host logs on shutdown). You can easily capture that using a configured IPMI serial console.
Maybe boot without "quiet"

I was talking about Proxmox's "Event viewer". I restart Proxmox via "Restart" in GUI, not with a server's power button.
 

Attachments

  • proxmox_guest_shutdown_problem.png
    proxmox_guest_shutdown_problem.png
    52.4 KB · Views: 13
Code:
--> Oct 22 22:49:13 pve1 pve-manager[2537]: Stopping VMs and Containers
Oct 22 22:49:13 pve1 spiceproxy[1806]: received signal TERM
Oct 22 22:49:13 pve1 spiceproxy[1806]: server closing
Oct 22 22:49:13 pve1 spiceproxy[1807]: worker exit
Oct 22 22:49:13 pve1 spiceproxy[1806]: worker 1807 finished
Oct 22 22:49:13 pve1 spiceproxy[1806]: server stopped
Oct 22 22:49:13 pve1 pvestatd[1761]: received signal TERM
Oct 22 22:49:13 pve1 pvestatd[1761]: server closing
Oct 22 22:49:13 pve1 pvestatd[1761]: server stopped
Oct 22 22:49:13 pve1 rrdcached[2541]: Stopping RRDtool data caching daemon: rrdcached.
Oct 22 22:49:13 pve1 pve-ha-lrm[1801]: received signal TERM
Oct 22 22:49:13 pve1 pve-ha-lrm[1801]: server stopped
Oct 22 22:49:13 pve1 hwclock[2525]: hwclock from util-linux 2.25.2
Oct 22 22:49:13 pve1 hwclock[2525]: Using the /dev interface to the clock.
Oct 22 22:49:13 pve1 hwclock[2525]: Last drift adjustment done at 1445543142 seconds after 1969
Oct 22 22:49:13 pve1 hwclock[2525]: Last calibration done at 1445543142 seconds after 1969
Oct 22 22:49:13 pve1 hwclock[2525]: Hardware clock is on UTC time
Oct 22 22:49:13 pve1 hwclock[2525]: Assuming hardware clock is kept in UTC time.
Oct 22 22:49:13 pve1 hwclock[2525]: Waiting for clock tick...
Oct 22 22:49:13 pve1 hwclock[2525]: ...got clock tick
Oct 22 22:49:13 pve1 hwclock[2525]: Time read from Hardware Clock: 2015/10/22 19:49:13
Oct 22 22:49:13 pve1 hwclock[2525]: Hw clock time : 2015/10/22 19:49:13 = 1445543353 seconds since 1969
Oct 22 22:49:13 pve1 hwclock[2525]: 1445543353.500000 is close enough to 1445543353.500000 (0.000000 < 0.001000)
Oct 22 22:49:13 pve1 hwclock[2525]: Set RTC to 1445543353 (1445543353 + 0; refsystime = 1445543353.000000)
Oct 22 22:49:13 pve1 hwclock[2525]: Setting Hardware Clock to 19:49:13 = 1445543353 seconds since 1969
Oct 22 22:49:13 pve1 hwclock[2525]: ioctl(RTC_SET_TIME) was successful.
Oct 22 22:49:13 pve1 hwclock[2525]: Not adjusting drift factor because it has been less than a day since the last calibration.
--> Oct 22 22:49:13 pve1 pvesh: <root@pam> starting task UPID:pve1:00000A54:000039D1:56293DB9:stopall::root@pam:
--> Oct 22 22:49:13 pve1 pvesh: <root@pam> end task UPID:pve1:00000A54:000039D1:56293DB9:stopall::root@pam: OK
--> (added in pve-manager init script just after pvesh call) --> Oct 22 22:49:13 pve1 pve-manager[2537]: Stopping VMs and Containers: finish
Oct 22 22:49:14 pve1 pvepw-logger[1252]: received terminate request (signal)
Oct 22 22:49:14 pve1 pvepw-logger[1252]: stopping pvefw logger
Oct 22 22:49:15 pve1 pve-ha-crm[1789]: received signal TERM
Oct 22 22:49:15 pve1 pve-ha-crm[1789]: server received shutdown request
Oct 22 22:49:15 pve1 pve-ha-crm[1789]: server stopped
Oct 22 22:49:15 pve1 pveproxy[1791]: received signal TERM
Oct 22 22:49:15 pve1 pveproxy[1791]: server closing
Oct 22 22:49:15 pve1 pveproxy[1794]: worker exit
Oct 22 22:49:15 pve1 pveproxy[1792]: worker exit

I don't think it's hardware-related.
 
Never said it is hardware. It looks like pve-manager (daemon, not service) does not do its job on shutdown. The "Stopping VMs and Containers" comes from /etc/init.d/pve-manager script. "stopall" is puhsed as the service script says, it seems, but nothing after, except "OK" that may mean "OK, I've got the command".

I assume this issue happens to everybody because I see no reason to happen to you only, therefore it is a bug. Proxmox?
 
I can confirm this on my setup...shutdown on GUI works but not on shutdown of host
 
Some guests don't play cleanly with a shutdown of the host, it depends on their OS. I make it a rule to shutdown each guest from within it's own OS first before finally issuing the host shutdown. Don't count on the host to do it for you.
 
Some guests don't play cleanly with a shutdown of the host, it depends on their OS. I make it a rule to shutdown each guest from within it's own OS first before finally issuing the host shutdown. Don't count on the host to do it for you.
What about UPS initiated shutdown? Do you think all Proxmox'es should live in first-class data center and be equipped with redundant PSUs connected to a first-class UPSes backed with diesel generators?

P.S. There is no activity for a month in this bug - https://bugzilla.proxmox.com/show_bug.cgi?id=783
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!