I'm developing kickstart to deploy ESX4 U1 to upgrade our 100 ESX 3.5 servers. After trying for a day, I got almost everything working. The problem is vSwitch0 is created with only 32 ports. I can use vi client to change port num after, but it is nice to have everything set using kickstart.
Is there a command to change num of ports for vSwitch0? I know you can create a vSwitch with num of port for new vswitch, but not for vSwitch0 which is created during istallation.
For those using pxe boot and having issue with no cos nics added by user, it is not a real error message, press Alt + F1 to see the real error message, it should tell you what the problem is.
Thanks
I do this in my postconfig:
perl -pi -w -e 's/\/net\/vswitch\/child\[0000\]\/numPorts = \"\d+\"/\/net\/vswitch\/child\[0000\]\/numPorts = \"256\"/g;' /etc/vmware/esx.conf
Ben
esxcfg-vswitch -a <vswitchname>:numports
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".
Thanks for the quick reply.
vSwitch0 is created automatically during kickstart with 32 ports and I can't recreate it at postscript. The command can be used to create vSwitch1, etc.
Is there any solution to that?
Thanks
can I ask why you need more than the supplied default? Typically you'll just have the COS and VMkernel ports on vSwitch0. Is it a limitation you have with pNICs?
Yes, these are all blades and each of them only has 2 pnics. There is nothing I can do until hardware refresh end of next year.
I do this in my postconfig:
perl -pi -w -e 's/\/net\/vswitch\/child\[0000\]\/numPorts = \"\d+\"/\/net\/vswitch\/child\[0000\]\/numPorts = \"256\"/g;' /etc/vmware/esx.conf
Ben
Thanks for the idea. Works like a charm.
Found the command to do it instead of modifying conf file.
vmware-vim-cmd hostsvc/net/vswitch_setnumports vSwitch0 64
I believe that command relies on hostd to be running, so you need to put a loop in there to check for a running hostd.
Ben