VMware Cloud Community
Michelle_Laveri
Virtuoso
Virtuoso

esxcfg-vmknic command

I've been investigating this command... to create VM Kernel switches from the COS....

It works pretty well - but one thing I've noticed is that there doesn't seem to be switch for enabling VMotion on the switch... or setting the default gateway value - which the VI client does prompt you do...

Does any one know of way of setting these parameters from the COS?

Regards

Mike

Regards
Michelle Laverick
@m_laverick
http://www.michellelaverick.com
0 Kudos
89 Replies
Michelle_Laveri
Virtuoso
Virtuoso

I wouldn't have though this setting would be in the SQL DB...

Because if you moved an ESX host from one datacenter to another - you would potentially loose a lot of configuration information...

That said - for all i know it could well be in the DB!

We wouldn't have this grief if there was a switch on the esx-vmknic command!!! (hint, hint) Smiley Happy

Regards

Mike

Regards
Michelle Laverick
@m_laverick
http://www.michellelaverick.com
0 Kudos
mmenne
Contributor
Contributor

I discussed the COS commands with VMWare support several times with several different issues during and after the beta period.

There is a disconnect somewhere between what VIC shows and what COS shows. The commands are there in COS, but VMWare support told me not to use them because VIC does more behind the scenes.

I can use the commands and make things work, but the VIC doesn't always show the updates.

My last message to them was referring to a situation where I no longer had network access from VIC to ESX and had to use the console commands. If that happens, my only option is COS from KVM. There has been no response on that message as of yet.

0 Kudos
Michelle_Laveri
Virtuoso
Virtuoso

I discussed the COS commands with VMWare support

several times with several different issues during

and after the beta period.

There is a disconnect somewhere between what VIC

shows and what COS shows. The commands are there in

COS, but VMWare support told me not to use them

because VIC does more behind the scenes.

I can use the commands and make things work, but the

VIC doesn't always show the updates.

My last message to them was referring to a situation

where I no longer had network access from VIC to ESX

and had to use the console commands. If that

happens, my only option is COS from KVM. There has

been no response on that message as of yet.

that's interesting post on two counts. I do feel we are being discouraged from using the command-line... it bugs me when command's don't have man pages... grrrr.... Smiley Happy

I've did some inplace upgrades with ISO's & tarballs - in Beta/RC1 and found my COS networking was "shafted" (that's a technical terms) so spent sometime getting to grips with the esxcfg commands to correct this...

I used stuff like this (without an ilo I was using a KVM to get to the "shafted" machine)

esxcfg-vswitch -a vSwitch0

esxcfg-vswitch -p "Service Console" vSwitch0

esxcfg-vswitch –L vmnic0 vSwitch0

esxcfg-vswif –a vswif0 -p "Service Console" i 192.168.2.102 –n 255.255.255.0

then editing /etc/sysconfig/network to set the default gateway and device used...

If your interested im in the process of writing a cmd-line guide...

Regards

Mike

Regards
Michelle Laverick
@m_laverick
http://www.michellelaverick.com
0 Kudos
kix1979
Immortal
Immortal

If you need any help let me know, I have way to may CLI scripts. One of these days I will actually write a kickstart guide with all my config tweaks.

Thomas H. Bryant III
0 Kudos
Michelle_Laveri
Virtuoso
Virtuoso

that would be very useful...

2b honest - I've never monkied around with kickstart - because i hardly ever have to mass deployments - just resets of my various boxes when I screw them up... Smiley Happy

(that's sounds reassuring doesn't it)

Mike Laverick

98% of what I have learned is from screw-ups... this does mean I screw about 98% of the time...\!!! Smiley Happy

Regards
Michelle Laverick
@m_laverick
http://www.michellelaverick.com
0 Kudos
mmenne
Contributor
Contributor

that's interesting post on two counts. I do feel we

are being discouraged from using the command-line...

it bugs me when command's don't have man pages...

grrrr.... Smiley Happy

I've did some inplace upgrades with ISO's & tarballs

- in Beta/RC1 and found my COS networking was

"shafted" (that's a technical terms) so spent

sometime getting to grips with the esxcfg commands to

correct this...

I used stuff like this (without an ilo I was using a

KVM to get to the "shafted" machine)

esxcfg-vswitch -a vSwitch0

esxcfg-vswitch -p "Service Console" vSwitch0

esxcfg-vswitch –L vmnic0 vSwitch0

esxcfg-vswif –a vswif0 -p "Service Console" i

192.168.2.102 –n 255.255.255.0

then editing /etc/sysconfig/network to set the

default gateway and device used...

If your interested im in the process of writing a

cmd-line guide...

Regards

Mike

We are definitely being discouraged from using the command line. They don't want us to, but there are times when it is not only convenient, but absolutely mandatory (loss of network connectivity).

esxcfg-route is the routing command for VMKernel.

In order to get the COS routing to work, I simply used route

route add default gw X.X.X.X

If you look at vSwitch definitions (esxcfg-vswitch -l) in the COS, they will list 32 ports. There are supposedly 8 "reserved" ports that aren't shown in the VIC. If you look at the same switch in the VIC, it shows only 24 ports. The GUI is supposed to be "correct" according to VMWare. I'm not sure why they would want them to be different. It only causes more confustion.

Also, if you change the COS IP/NM/Routing from the command line, it will restore network connectivity, but the VIC still shows the old information. The COS command do not update the GUI. This was the source of my SR with VMWare. That's when they told me that the GUI does more than the console commands do (not that they would tell me what that actually is).

0 Kudos
Michelle_Laveri
Virtuoso
Virtuoso

The COS

command do not update the GUI. This was the source

of my SR with VMWare. That's when they told me that

the GUI does more than the console commands do (not

that they would tell me what that actually is).

yes, i have little script that runs a service mgmt-vmware restart while I am working at the cos... this causes a disconnect in the VI client - but if you have VC - it does (eventually) reconnect... for the most part this does the trick...

Regards

Mike

Regards
Michelle Laverick
@m_laverick
http://www.michellelaverick.com
0 Kudos
virtech
Expert
Expert

So I guess we are no further along with this then?

0 Kudos
Michelle_Laveri
Virtuoso
Virtuoso

mmm... i guess this thread has a number of mini-threads in side it...

no further on from what? - can you get us back "on message"...

Regards

Mike

Regards
Michelle Laverick
@m_laverick
http://www.michellelaverick.com
0 Kudos
virtech
Expert
Expert

Sorry to be so vague, What I meant was we are no further ahead of enabling VMotion from the COS ? or at least seeing the change reflected in the VIC ?

0 Kudos
Michelle_Laveri
Virtuoso
Virtuoso

ahhh, yes - not being vague - just that we roamed around on this topic a little bit...

I thought I'd cracked it with comm-parision of the esx.conf file - and finding the migrate flag... tried looking at the /net entries to see if there was a Vmotion Enabled = 1 flag but no joy...

So to answer, no further on...

Regards

Mike

Regards
Michelle Laverick
@m_laverick
http://www.michellelaverick.com
0 Kudos
virtech
Expert
Expert

Ok in the mean time I'll raise a SR with VMware to see what they have to say.

0 Kudos
admin
Immortal
Immortal

Editing esx.conf will have no effect on the currently running system, the only way for it to take effect is to reboot the system. The proper way to do what you are trying to do is:

esxcfg-advcfg -s 1 /adv/Migrate/Enable

esx.conf is not intended to be edited by hand.... ever. That file is not directly read by hostd and is used at boot to restore settings not at runtime.

0 Kudos
admin
Immortal
Immortal

The commands are there in COS, but VMWare support told me not to use them because VIC does more behind the scenes.

This is the general idea used when creating the esxcfg-* commands. They are designed to get you out of tight spots when the system is not fixable by the VI client (like dead COS networking) and do not support the full array of commands that the VI client supports.

That said there are a few corner cases where you can do things with the esxcfg-* tools that are not possible in the VI client because esxcfg-* operate below the hostd/management/VC level.

0 Kudos
admin
Immortal
Immortal

See my message above about enabling advanced options. There is still no guarentee that this will work however Smiley Happy

At the COS level (esxcfg-*) there is no knowledge of VMotion, it can however flip the same bit that VC flipped, but whether that is the whole story on enabling VMotion, I don't know.

0 Kudos
Michelle_Laveri
Virtuoso
Virtuoso

Editing esx.conf will have no effect on the currently

running system, the only way for it to take effect is

to reboot the system. The proper way to do what you

are trying to do is:

esxcfg-advcfg -s 1 /adv/Migrate/Enable

esx.conf is not intended to be edited by hand....

ever. That file is not directly read by hostd and is

used at boot to restore settings not at runtime.

ahhh, that's how its done... thanks for sharing that information with us...

kind regards

Mike

Regards
Michelle Laverick
@m_laverick
http://www.michellelaverick.com
0 Kudos
Michelle_Laveri
Virtuoso
Virtuoso

Oh, i tried that command

but I got

Exception occured: Unable to find branch adv

any ideas?

Regards

Mike

Regards
Michelle Laverick
@m_laverick
http://www.michellelaverick.com
0 Kudos
admin
Immortal
Immortal

Sorry waiting for caffeine to soak in:

esxcfg-advcfg -s 1 /Migrate/Enable

0 Kudos
kix1979
Immortal
Immortal

Is the documentation for this stuff coming or will it even be released?

Thomas H. Bryant III
0 Kudos
kix1979
Immortal
Immortal

Unable to find option Enable, there is "Enabled" but it still does not force the kernel nic to vMotion enabled.

Message was edited by:

kix1979

Thomas H. Bryant III
0 Kudos