VMware Cloud Community
admin
Immortal
Immortal

vimsh vmotion command no longer Works in update 2

I used to be able to configure vmotion to enable via the kickstart script but since I upgraded to update 2 it no longer works, any ideas...

esxcfg-vswitch -A VMotion vSwitch0

esxcfg-vmknic -a VMotion -i 10.1.1.127 -n 255.255.255.0

esxcfg-route 10.1.1.254

service mgmt-vmware restart

sleep 40

vimsh -n -e "hostsvc/vmotion/vnic_set vmk0"

i have checked that vmk0 is correct using

vimsh

then

hostsvc/vmotion/netconfig_get

0 Kudos
13 Replies
casselc
Enthusiast
Enthusiast

I've been able to enable vmotion using the vmware-vim-cmd variant of what you're currently using, i.e. vmware-vim-cmd hostsvc/vmotion/vnic_set vmk0.

glynnd1
Expert
Expert

Zippy, below is a snippit from my 3.5 KS file, okay so it is a big snippet, but it has what you want. The line in bold is the magic line, note the change from vmish to vmware-vim-cmd

echo "Configuring vSwitch0 for two NICs supporting Service Console & VMotion in an active/standby & standby/active"

echo "Adding second NIC to vSwitch0"

esxcfg-vswitch -U vmnic0 vSwitch0

vmware-vim-cmd internalsvc/refresh_network

esxcfg-vswitch -L vmnic0 vSwitch0

esxcfg-vswitch -L vmnic2 vSwitch0

echo "Creating VMotion portgroup"

esxcfg-vswitch --add-pg VMotion vSwitch0

esxcfg-vswitch --vlan 473 --pg VMotion vSwitch0

echo "Configuring VMotion IP setting"

esxcfg-vmknic --add VMotion --ip 10.142.173.1XXXX --netmask 255.255.255.0

echo "Enabling VMotion"

vmware-vim-cmd hostsvc/vmotion/vnic_set vmk0

vmware-vim-cmd internalsvc/refresh_network

echo "Setting Service Console portgroup to active/standby"

vmware-vim-cmd hostsvc/net/portgroup_set --nicorderpolicy-active vmnic0 vSwitch0 "Service Console"

vmware-vim-cmd hostsvc/net/portgroup_set --nicorderpolicy-standby vmnic2 vSwitch0 "Service Console"

echo "Setting VMotion portgroup standby/active"

vmware-vim-cmd hostsvc/net/portgroup_set --nicorderpolicy-active vmnic2 vSwitch0 VMotion

vmware-vim-cmd hostsvc/net/portgroup_set --nicorderpolicy-standby vmnic0 vSwitch0 VMotion

vmware-vim-cmd internalsvc/refresh_network

admin
Immortal
Immortal

I have changed to below and it still fails...

esxcfg-vswitch -A VMotion vSwitch0

esxcfg-vmknic -a VMotion -i 10.1.1.51 -n 255.0.0.0

esxcfg-route 10.1.1.123

service mgmt-vmware restart

sleep 40

vmware-vim-cmd "hostsvc/vmotion/vnic_set vmk0"

0 Kudos
casselc
Enthusiast
Enthusiast

You shouldn't need quotes on the vmware-vim-cmd options.

0 Kudos
glynnd1
Expert
Expert

vmk0 maybe different on your system. It will be different if you've alread had VMotion setup, even if you've already deleted.

Use "vmware-vim-cmd hostsvc/vmotion/netconfig_get" to find out what it currently is.

Have a read of http://knowledge.xtravirt.com/white-papers/esx-3x.html, VMISH for ESX 3.5

0 Kudos
admin
Immortal
Immortal

OK no quotes and it still fails everything else in the script works, dead odd + I have checked it is vmk0 thanks for the syntax

0 Kudos
casselc
Enthusiast
Enthusiast

Can you try it outside of a scripted install to see what the error message is, or redirect the error message to a log file during the scripted install.

0 Kudos
admin
Immortal
Immortal

Ill post my results here later's, got to get some work done - hope this is OK

0 Kudos
admin
Immortal
Immortal

I added the line in bold and it now works -WEIRD

esxcfg-vswitch -A VMotion vSwitch0

esxcfg-vmknic -a VMotion -i 10.1.1.127 -n 255.255.255.0

esxcfg-route 10.1.1.254

vimsh -n -e "/internalsvc/refresh_network"

service mgmt-vmware restart

sleep 40

vimsh -n -e "hostsvc/vmotion/vnic_set vmk0"

0 Kudos
depping
Leadership
Leadership

this is what I used last time:

/usr/bin/vimsh -n -e “hostsvc/vmotion/vnic_set vmk0″

Duncan

My virtualisation blog:

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
admin
Immortal
Immortal

hry depping my middle name is duncan cool, thanks everyone for your help

0 Kudos
depping
Leadership
Leadership

you rule Smiley Happy

Duncan

My virtualisation blog:

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
BUGCHK
Commander
Commander

> vimsh -n -e "/internalsvc/refresh_network"

I use that, too

> service mgmt-vmware restart

> sleep 40

I don't use these, just ' refresh_network'.

After the server has booted, I once wait for the service to come up using a loop construct I've picked up from the forums a while ago and the proceed with the customization.

0 Kudos