VMware Cloud Community
ZbyszekS
Enthusiast
Enthusiast
Jump to solution

ESX 4.0 problem with post install in kick start.

Hello all,

I have problem with writing a kickstart script for esx4. All is working OK until I try to enable vmotion. my kickstart script looks like:

accepteula

keyboard us

auth --enablemd5 --enableshadow

  1. Canonical drive names:

clearpart --overwritevmfs --drives=mpx.vmhba0:C0:T0:L0

  1. Uncomment to use first detected disk:

#clearpart --firstdisk

  1. Uncomment the esxlocation line and comment out the clearpart

  2. and physical partitions to do a non-destructive reinstall.

#esxlocation --uuid=2be8278c-007b-4389-947f-0f6a72a23036

install cdrom

rootpw --iscrypted $1$fh40NuLv$jo1FUrvpfHEXHINgANoEj/

timezone --utc 'Poland'

network --addvmportgroup=true --device=vmnic1 --bootproto=static --ip=192.168.10.10 --netmask=255.255.255.0 --gateway=192.168.10.1 --nameserver=192.168.10.1 --hostname=test

part '/boot' --fstype=ext3 --size=1100 --ondisk=mpx.vmhba0:C0:T0:L0

  1. Uncomment to use first detected disk:

#part '/boot' --fstype=ext3 --size=1100 --onfirstdisk

part 'none' --fstype=vmkcore --size=110 --ondisk=mpx.vmhba0:C0:T0:L0

  1. Uncomment to use first detected disk:

#part 'none' --fstype=vmkcore --size=110 --onfirstdisk

part 'Storage1' --fstype=vmfs3 --size=8604 --grow --ondisk=mpx.vmhba0:C0:T0:L0

  1. Uncomment to use first detected disk:

#part 'Storage1' --fstype=vmfs3 --size=8604 --grow --onfirstdisk

virtualdisk 'esxconsole' --size=7604 --onvmfs='Storage1'

part 'swap' --fstype=swap --size=600 --onvirtualdisk='esxconsole'

part '/var/log' --fstype=ext3 --size=2000 --onvirtualdisk='esxconsole'

part '/' --fstype=ext3 --size=5000 --grow --onvirtualdisk='esxconsole'

%post --interpreter=bash

esxcfg-vswitch -L vmnic0 vSwitch0

esxcfg-vswitch -D 'VM Network' vSwitch0

esxcfg-vswitch -A 'VLAN 64' vSwitch0

esxcfg-vswitch -A 'iSCSI' vSwitch0

esxcfg-vmknic -a "iSCSI" -i 192.168.10.11 -n 255.255.255.0

esxcfg-route 192.168.10.1

esxcfg-route -a default 255.255.255.0 192.168.10.1

service mgmt-vmware restart

sleep 5

/usr/bin/vmware-vim-cmd hostsvc/vmotion/vnic_set vmk0

service mgmt-vmware restart

when i run the command /usr/bin/vmware-vim-cmd hostsvc/vmotion/vnic_set vmk0 after install in the ssh it is enabling vmotion, but when it is run by the installer in %post section it is not working what I'm doing wrong??

Regards

Zbyszek

0 Kudos
1 Solution

Accepted Solutions
ZbyszekS
Enthusiast
Enthusiast
Jump to solution

I made an startup script and it started to work.

View solution in original post

0 Kudos
2 Replies
johkra
Contributor
Contributor
Jump to solution

Hi,

I had the same problem. I think everytime the command /usr/bin/vmware-vim-cmd was used an error like "Authd error: 514 Error connecting to hostd-vmdb service instance" occured. For me it helped to add a huge wating time before using the command. So instead of your using "sleep 5" after the service mgmt-vmware restart I used "sleep 600". A lower value might also work, but I wanted to make really sure Smiley Wink .

0 Kudos
ZbyszekS
Enthusiast
Enthusiast
Jump to solution

I made an startup script and it started to work.

0 Kudos