VMware Cloud Community
gogogo5
Hot Shot
Hot Shot

Scripted Install and Multiple NICs

My issue is:

I have created a ks script for our ESX build standard. Our servers have 2 onboard nics and a dual-port nic in a PCI slot.

However, when I run the script it is trying to use the first port on the dual-nic card but I want the install use the first onboard nic.

After manually installing ESX, it shows that vmnic0 is the first port on dual-port PCI card and vmnic1 is the first onboard nic.

So I am trying to find a way to run my script and force vmnic1 to be SC pnic to be used for install.

Can I do this or shall I just take out the PCI card, run the install, then reinsert the dual-port card and take it from there?

Reply
0 Kudos
8 Replies
ilatimer
Hot Shot
Hot Shot

We change this by adding the following line to a post configuration script:

/usr/sbin/esxcfg-vswitch vSwitch0 -L vmnic2

Where vmnic2 is the nic we want the for the SC.

virtech
Expert
Expert

You should be able to specifiy the Service console nic via your .cfg file.

i.e ksdevice=eth1

eth0 & eth1 are usually the on board nics, followed by eth2,3 for pci

Reply
0 Kudos
gogogo5
Hot Shot
Hot Shot

I've tried the ksdevice switch at the installation boot command prompt i.e:

esx ks=floppy ksdevice=eth0 method=cdrom

but for some reason after the install completed it still "bound" vmnic1 to the SC. I want vmnic0 bound.

Reply
0 Kudos
virtech
Expert
Expert

how are you deploying the ESX build ? via cd-rom , NFS , FTP ?

Reply
0 Kudos
gogogo5
Hot Shot
Hot Shot

hi

please see my previous post for the esx command:

esx ks=floppy ksdevice=eth0 method=cdrom

so, ks.cfg is on floppy, media is CD-ROM

Reply
0 Kudos
ThomasNiesel
Contributor
Contributor

Hi,

We change this by adding the following line to a post

configuration script:

/usr/sbin/esxcfg-vswitch vSwitch0 -L vmnic2

Where vmnic2 is the nic we want the for the SC.

I tried this, but it seems, that the esxcfg-vswitch is not executed. Do I have to add a --nochroot to the %post command?

Regards

Thomas P. Niesel

Reply
0 Kudos
BUGCHK
Commander
Commander

Thomas,

you can't use esxcfg-vswitch[/i] in the %post[/b] section, because the VMkernel is not present. You need to delay it until the first boot.

Reply
0 Kudos
ThomasNiesel
Contributor
Contributor

Hi Bugchk,

thanks for the hint. I wrote a %post script, that produces a little shellscript, which is then executet by rc.local - that works.

Regards

Thomas P. Niesel

Reply
0 Kudos