VMware Cloud Community
hharold
Enthusiast
Enthusiast
Jump to solution

"service mgmt-vmware restart" in a scripted install...

Hi,

as a lot of you propably do, I do a "service mgmt-vmware restart" in a scripted install.

I need this because I want to use vmware-vim-cmd ommands.

When the "service mgmt-vmware restart" is executed, the complete installation halts, and just sits there.

When I do a "service mgmt-vmware restart" manully from a SSH session, no problems.

When I do a "service mgmt-vmware restart" from a console session (HP iLOE) the problem become clearer.

During the restart the screen moves to the "logon to ESX server....press ALT-F1 etc " - screen

When I press ALT-F1 i re-enter my session again and see the result of the "service mgmt-vmware restart" command.

But this clearly kills my script as it cannot continue.

Anyone any ideas?

btw: ESX 3.5 U3

Thanks and kind regards,

Harold

0 Kudos
1 Solution

Accepted Solutions
kjb007
Immortal
Immortal
Jump to solution

Other users that I know of put all of the vmkernel commands in a file to run at boot, and not during the kickstart itself. Put all your commands in a script, and have /etc/rc.local run it on boot, and then remove it from rc.local.

-KjB

VMware vExpert

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB

View solution in original post

0 Kudos
8 Replies
kjb007
Immortal
Immortal
Jump to solution

Just a thoughtm, but have you tried having it run in the background with an '&'.

-KjB

VMware vExpert

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
mcowger
Immortal
Immortal
Jump to solution

Its probably because of the redirection of STDIN and STDOUT.

Considered simply running those commands on first reboot?






--Matt

VCP, vExpert, Unix Geek

--Matt VCDX #52 blog.cowger.us
0 Kudos
hharold
Enthusiast
Enthusiast
Jump to solution

Its probably because of the redirection of STDIN and STDOUT.

Considered simply running those commands on first reboot?

That would certainly be a good workaround.

But why does a mgmt-vmware restart work in every kickstart scripts but mine....??

0 Kudos
hharold
Enthusiast
Enthusiast
Jump to solution

Just a thoughtm, but have you tried having it run in the background with an '&'.

Thanks for your reply.

Unfortunately this did not work. Same issue, session looses focus and jumps to start screen.

0 Kudos
kjb007
Immortal
Immortal
Jump to solution

Other users that I know of put all of the vmkernel commands in a file to run at boot, and not during the kickstart itself. Put all your commands in a script, and have /etc/rc.local run it on boot, and then remove it from rc.local.

-KjB

VMware vExpert

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
hharold
Enthusiast
Enthusiast
Jump to solution

Problem solved.

The problem was not the session losing focus, but my post script starting to early.

We used rc3.d/S11configuration, this came to early, hostd is not started at that time.

Now using rc.local which starts as the last startup script, and vmware-vim-cmd commands are running fine!

Thanks all for your help.

Regards,

Harold

0 Kudos
kjb007
Immortal
Immortal
Jump to solution

No porlbem. Don't forget to leave points for helpful / correct posts.

-KjB

VMware vExpert

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
AlbertWT
Virtuoso
Virtuoso
Jump to solution

Hi guys, just wanted to add something here,

I'm using ESXi 4.0, and i was facing the problem of "_Another task is already in progress_" error, practically the VM could not be used at all (turn on restart or even force off).

in ESXi 4.0 SSH console, using the command "service mgmt-vmware restart" will do no good Smiley Sad

therefore the solution is by using: services.sh restart command, quite simple and it doesn't kill the whole VM process which is currently running on production, the only thing that is affected is the VCB backup, it failed when that command issued. Finally in your vCenter console, right click on your ESXi host in which you run the command and then click on reconnect.

hope this can be a blessing for everyone.

Kind Regards,

AWT

/* Please feel free to provide any comments or input you may have. */
0 Kudos