VMware Cloud Community
gogogo5
Hot Shot
Hot Shot

mgmt-vmware - PART 2

Want to earn some points? Please can somebody running ESX 3.01[/b] and VC 2.01[/b] with some Windows 2003 VMs perform the following on a dev/test box.

1. In VC, click on your ESX host then click the Configuration Tab

2. Click Virtual Machine Startup/Shutdown under Software

3. Click Properties in top-right

4. Check the box Allow virtual machines to start and stop[/i] automatically...etc etc

5. Change Default Startup and Shutdown Delay to 60 secs

6. Ensure Continue immediately if the VMWare Tools start is unchecked

7. Select Shutdown Action = Guest Shutdown

8. Move Up one or more VMs to the Automatic Startup header

9. Click OK

10. Goto the ESX host running the VMs and run the service mgmt-vmware restart[/i] command

11. Wait 2 minutes

12. Open a console to your VM configured above, logon and open the command prompt

13. Type uptime[/i] or if this is not installed open the Properties of your virtual NIC in the VM and look at the Connected Duration time

14. What do you see? A time that looks like the VMs hasn't been up for very long?

thanks

0 Kudos
25 Replies
admin
Immortal
Immortal

Just tested this, the Windows VM was restarted on mgmt-vmware restart. That's not good is it!

Going to move some Linux VMs on and see if they behave the same way, will post the results in a minute.

VirtualKenneth
Virtuoso
Virtuoso

Me me me Smiley Wink

After restarting the mgmt-vmware my guest VM shutsdown for some reason, when the mgmt-vmware starts again (directly after the "stopping" obviously) the guest VM starts again.

When checking the uptime it displays me the time that my VM is started (in my case 2 minutes)

VirtualKenneth
Virtuoso
Virtuoso

damn, just 1 minute to late Smiley Wink

0 Kudos
admin
Immortal
Immortal

Yep same for Linux VMs, they get a soft-shutdown command too. Seems the auto-shutdown feature is triggered by restarting the management agent.

0 Kudos
VirtualKenneth
Virtuoso
Virtuoso

Strange stuff, somehow the VMware ESX Server Host Agent Services[/i] sends out a real system halt:

Dec 12 13:14:04.724: vmx| TOOLS sending 'OS_Halt' (1) state change request

I've tried to move the system to the Manual Startup section but even there it will automatically shutdown if started with the mgmt-vmware restart.

Correction Smiley Wink

Message was edited by:

Vliegenmepper

0 Kudos
admin
Immortal
Immortal

That's as expected though, in the Manual Startup group the 'Shutdown' column is still set to the 'Shutdown Action' you set in the above drop-down box, the difference is if the machines are in the Manual Startup group they will not be auto-powered on after the agent comes back. That's because the 'Startup' column is set to 'disabled'.

VMs in the Automatic Startup group will be shutdown before ones in the Manual Startup group.

The real problem here is that the management agent is clearly responsible for the auto-startup/shutdown of VMs, and restarting it triggers an auto-shutdown. I presume this is because it's been assumed that the mgmt-vmware agent would only be shutdown on a ESX server reboot, in which case the desired response would be to shut down all the VMs, but it's a major over-sight not to check whether the host is actually shutting down or not!

Filing a request for this to be rectified in a future version is about all we can do, in the mean time I guess you'll just have to remember to disable auto-startup/shutdown before[/b] restarting the management agent. Glad I didn't find this out the hard way!

0 Kudos
TomHowarth
Leadership
Leadership

dually stored and marked for future retrieval, thanks to gogogo5 for finding this anominally

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
0 Kudos
gogogo5
Hot Shot
Hot Shot

Ah at last, I think my PART 2 post had better marketing Smiley Wink

Well I am glad that other find this too as i was getting a bit concerned it could have been specific to my environment.

I am surprised running the restart command causes this. Imagine you have 15 VMs running in production, you run the command for whatever reason you need to then BANG! your VMS reboot and your phone starts ringing....quite a heavy handed result when the host itself is not being restarted.

VMware - any comments, it this really by design?

My workaround procedure before running the command is to simply disable automatic startup/shutdown by unticking the Allow etc etc box, run the command then re-tick it.

Thanks to all that replied - I will award Helpful points to the first 2 ppl that replied (cause I can only assign a max of 2).

0 Kudos
sbeaver
Leadership
Leadership

Because of this post I have disabled automatic startup and shutdown and the more I think about it I begin to wonder if the automatic startup and shutdown is really needed anymore of you are running a cluster with DRS and HA. My thoughts are this.... If you are going to shutdown a host for any reason you would put that host in maintenance mode and let all the VM's vmotion to the host hosts automatically and with HA if you were to lose a host the VM would allready restart on the other hosts in the cluster. So with that in mind what do we gain by having the VM set to automatically restart?

Steve Beaver
VMware Communities User Moderator
VMware vExpert 2009 - 2020
VMware NSX vExpert - 2019 - 2020
====
Co-Author of "VMware ESX Essentials in the Virtual Data Center"
(ISBN:1420070274) from Auerbach
Come check out my blog: [www.virtualizationpractice.com/blog|http://www.virtualizationpractice.com/blog/]
Come follow me on twitter http://www.twitter.com/sbeaver

**The Cloud is a journey, not a project.**
0 Kudos
gogogo5
Hot Shot
Hot Shot

Good point. I guess now it would be relevant to those who do not have the DRS/HA modules licensed and each ESX host is treated as a standalone entity.

0 Kudos
sbeaver
Leadership
Leadership

This stills need to be addressed I went through an issue that I had to restart the mgmt-vmware service a few times and if my VM's would have gone down that would have been very bad

Steve Beaver
VMware Communities User Moderator
VMware vExpert 2009 - 2020
VMware NSX vExpert - 2019 - 2020
====
Co-Author of "VMware ESX Essentials in the Virtual Data Center"
(ISBN:1420070274) from Auerbach
Come check out my blog: [www.virtualizationpractice.com/blog|http://www.virtualizationpractice.com/blog/]
Come follow me on twitter http://www.twitter.com/sbeaver

**The Cloud is a journey, not a project.**
0 Kudos
admin
Immortal
Immortal

Yep, I've been thinking the same, in a DRS/HA setup the Auto-startup/shutdown is basically redundant.

It still shouldn't behave like this though, a management agent restart should not trigger a 'host down' action, there needs to be some more intelligence in the auto-startup/shutdown routines.

0 Kudos
sbeaver
Leadership
Leadership

Has anyone submitted a bug or SR on this?

Steve Beaver
VMware Communities User Moderator
VMware vExpert 2009 - 2020
VMware NSX vExpert - 2019 - 2020
====
Co-Author of "VMware ESX Essentials in the Virtual Data Center"
(ISBN:1420070274) from Auerbach
Come check out my blog: [www.virtualizationpractice.com/blog|http://www.virtualizationpractice.com/blog/]
Come follow me on twitter http://www.twitter.com/sbeaver

**The Cloud is a journey, not a project.**
0 Kudos
gogogo5
Hot Shot
Hot Shot

Now that the community has confirmed this happens in general rather than some dodgy config of mine I will submit this. Thanks again to those that followed my steps to reproduce

Thanks also to acr[/b] who provided feedback from my Part 1 message too.

0 Kudos
bertdb
Virtuoso
Virtuoso

sbeaver, autostart/autostop can still be valuable when the whole infrastructure goes down (planned or unplanned).

0 Kudos
acr
Champion
Champion

Hi there..

Ah, thats were youve got me....!!

Mine's still ESX 3 and VC 2... So i gues i'll have to plan my upgrade...

0 Kudos
acr
Champion
Champion

Hey gogogo5, seems you've started something... were all at it now..

You've got all these mobile labs...!!

Anyway nice to see its not only my setup you've managed to comondere..!!

So i see we all got this issue..

If they'd been up late with us last night they already know about this..!!

0 Kudos
acr
Champion
Champion

You've got to be quick to beat Alex...!!

0 Kudos
gogogo5
Hot Shot
Hot Shot

If they'd been up late with us last night they

already know about this..!!

hey acr - i guess it shows that if you mention the chance to get some points then it makes commandeering a lot easier Smiley Wink

this is a good forum and nice to see people validating this issue for the benefit of all.

until the next bottle of midnight oil then.....

0 Kudos