VMware Cloud Community
plaurent49
Contributor
Contributor

use vimsh : hostsvc/maintenance_mode_enter don't work on my ESX ???

I try to use vimsh and hostvc/maintenance_mode_enter command

It doesn't work. On my VC, my esx doesn't enter in maintenance mode.

It tried this, but still same problem :

Enter maintenance mode (turn on): vimsh -n -e /hostsvc/maintenance_mode_enter

Exit maintenance mode (turn off): vimsh -n -e /hostsvc/maintenance

I need this type of command before using shutdown command ...

Here is hostsummary info ( release ... ).

Is there a fix to install on VC ? ESX release ?

-


Release :

# vmware -v

VMware ESX Server 3.0.1 build-32039

VC is V2.0.1

-


$ hostsvc/hostsummary

(vim.host.Summary) {

dynamicType = <unset>,

dynamicProperty = (vmodl.DynamicProperty) [],

host = 'vim.HostSystem:ha-host',

hardware = (vim.host.Summary.HardwareSummary) {

dynamicType = <unset>,

dynamicProperty = (vmodl.DynamicProperty) [],

vendor = "HP",

model = "ProLiant BL460c G1",

uuid = "34313636-3536-435a-4a36-343730324c33",

memorySize = 12884668416,

cpuModel = "Intel(R) Xeon(R) CPU 5160 @ 3.00GHz",

cpuMhz = 3000,

numCpuPkgs = 2,

numCpuCores = 4,

numCpuThreads = 4,

numNics = 4,

numHBAs = 3

},

runtime = (vim.host.RuntimeInfo) {

dynamicType = <unset>,

dynamicProperty = (vmodl.DynamicProperty) [],

connectionState = "connected",

inMaintenanceMode = false,

bootTime = "2007-11-12T11:49:54.244788+01:00"

},

config = (vim.host.Summary.ConfigSummary) {

dynamicType = <unset>,

dynamicProperty = (vmodl.DynamicProperty) [],

name = "al14.chu-angers.intra",

port = 902,

product = (vim.AboutInfo) {

dynamicType = <unset>,

dynamicProperty = (vmodl.DynamicProperty) [],

name = "VMware ESX Server",

fullName = "VMware ESX Server 3.0.1 build-32039",

vendor = "VMware, Inc.",

version = "3.0.1",

build = "32039",

localeVersion = "INTL",

localeBuild = "000",

osType = "vmnix-x86",

productLineId = "esx",

apiType = "HostAgent",

apiVersion = "2.0.0"

},

vmotionEnabled = false

},

quickStats = (vim.host.Summary.QuickStats) {

dynamicType = <unset>,

dynamicProperty = (vmodl.DynamicProperty) [],

overallCpuUsage = 73,

overallMemoryUsage = 1025,

distributedCpuFairness = <unset>,

distributedMemoryFairness = <unset>

},

overallStatus = "gray",

rebootRequired = false,

customValue = (vim.CustomFieldsManager.Value) []

}

0 Kudos
5 Replies
dominic7
Virtuoso
Virtuoso

Have you powered off or relocated all of your VMs? You can't enter maintenance mode unless you do so. I've also found that it doesn't come out and explicitly tell you this either.

0 Kudos
plaurent49
Contributor
Contributor

Before to try to enter on maintenance mode, I didn't relocated my VM. One VM is working on my ESX.

My ESX and VM are powered on.

On my VI, I have 12 esx, HA, vmotion, DRS are avalable.

Why this vimsh command doesn't put my ESX on maintenance mode ( migrate VM working

on it to other ESX ) ?

Thanks for any advice, ideas ...

Regards.

0 Kudos
TCronin
Expert
Expert

Make sure that vm doesn't have:

A cd-rom or floppy attached

A network connection that doesn't match on another host

A datastore that isn't available on another host (or is hosted on a local datastore)

A DRS rule that sets it to something other than automatically managed

Tom Cronin, VCP, VMware vExpert 2009 - 2021, Co-Leader Buffalo, NY VMUG
0 Kudos
wtreutz
Enthusiast
Enthusiast

I had seen the same effect.

when I initiate "vimsh: hostsvc/maintenance_mode_enter" on a host, who has active VMs

the ESX-Host did not "go" to maintenace mode. When I do the command on an "vm clean"

ESX-Host it works correctly.

When i initiate the goto maintenance form inside the vcms, it migrate the VMs from the ESX-Host.

For my opinion, the "goto maintenance mode" from inside the vcms "do a little more" than the

the vimsh-command.

The answer I get form VMware to the vimsh was -- it is not official supported

regards

Werner

plaurent49
Contributor
Contributor

Thanks for your answers.

I tried to enter in maintenance mode my ESX ( vm clean, no vm working on it ). It works !

It 's interresting. With some VM on it, it doesn't work, without VM it Works.

The goal of this maintenance mode it to migrate VM working on a ESX on other ESX.

On GUI interface if works fine, with vimsh it works partially.

So, now I have stil my problem :

How to create a schedule script which can :

1 - Enter in maintenance mode an ESX ( remove all VM from it ).

2 - Shutdown -R ( reboot ) an ESX

3 - Quit maintenance mode.

?

My point of view is that it is important in a production site to reboot properly ESX.

So how to do this 3 steps ?

Best regards.

Patrick.

0 Kudos