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
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.
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
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"
You shouldn't need quotes on the vmware-vim-cmd options.
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
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
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.
Ill post my results here later's, got to get some work done - hope this is OK
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"
hry depping my middle name is duncan cool, thanks everyone for your help
> 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.