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
kix1979
Immortal
Immortal

There is no way. Keep in mind that the host has to be connected to VC in order for vMotion to even work, so a CLI command while nice, is not really needed. However, I would still love to have a switch for it to simplify scripting.

Kix

PS. Go to sleep it's late there, and lets go ENG!

Thomas H. Bryant III
0 Kudos
Michelle_Laveri
Virtuoso
Virtuoso

There is no way. Keep in mind that the host has to

be connected to VC in order for vMotion to even work,

so a CLI command while nice, is not really needed.

yes....

However, I would still love to have a switch for it

to simplify scripting.

yes. me too - same reasona...

Kix

PS. Go to sleep it's late there, and lets go ENG!

I know! I couldn't sleep... so got up for half-an-hour and then went back to bed....

"Lets go ENG!" - sorry I don't follow....???

Regards

Mike

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

"Lets go ENG!" - sorry I don't follow....???

Is he referring to that silly sporting event in Germany that you chaps still have a team competing in??? Smiley Happy

0 Kudos
Michelle_Laveri
Virtuoso
Virtuoso

Ahh right....

actually we say... "EN-GURRR-LAND"

we play portugal this afternoon - got my beer and burger for half time... i imagine we will not bad in first half, and decline in the second... excuses?

1. Wrong temperature

2. too long season in the UK premiership

3. wounded players

4. "different type of football abroad"

5. Its not about winning, its about being a valiant looser...

anyway, putting my natural pessimism aside... come on england!!!! Smiley Happy

Regards

Mike

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

5. Its not about winning, its about being a valiant

looser...

On behalf of the USA, we will provide political asylum for the entire team after their loss on penalty kicks a few minutes ago. Since soccer (football on that side of the pond) has no following here, Beckham and the rest of the team could walk down Broadway in Manhattan without anyone recognizing them...IN THEIR UNIFORMS!!!

Interesting match from what I saw, and I was cheering for ENG to win until the end... Smiley Sad

0 Kudos
Michelle_Laveri
Virtuoso
Virtuoso

boo hoo Smiley Sad

well, i guess there's always wimbledon.... mmm, come to think of that shall, i just switch of the telly?

penalities again! arghhh....

dispondantly

mike

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

Mike, have you had any luck with this?

You can use the esxcfg-route command to specifiy the vmkernel default gateway address, then the VI client doe's not prompt for this.

0 Kudos
Michelle_Laveri
Virtuoso
Virtuoso

Yep...

I managed to set the VM Kernel nic up and used the esxcfg-vmnic and esxcfg-route command...

only thing I can't seem to set from the command-line is X VMotion...

Note:

This is a sample of how i did it:

esxcfg-vswitch -a vSwitch3

esxcfg-vswitch -A "VM Kernel" vSwitch3

esxcfg-vswitch -L vmnic3 vSwitch3

esxcfg-vmknic -a "VM Kernel" -i 192.168.2.202 -n 255.255.255.0

esxcfg-route 192.168.2.1

Regards

Mike

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

Yes thats exactly where I am now, stuck with enabling the vmotion part!!

0 Kudos
Michelle_Laveri
Virtuoso
Virtuoso

There's a very nice/helpful VMware employee called CHogan who helped me with a bag of stuff in the last week and half...

I think the general impression is that this isn't available in the CLI... after all you need VC to trigger a VMotion...

I don't buy this really - but that said there was no way to enable VMotion in ESX 2.x/VC1.x from the CLI... so its not huge surprise that it still can't be done...

This must be stored on the ESX host "somewhere" - probably in the conf file... but it really scares me to go in there right now!!!

Regards

Mike

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

Mike in 2.5.X you could edit /etc/vmwware/hwconfig and specifiy vmotion details in there......This worked for us ok.

I'm guessing the esx.conf is the place to make the same changes, but you're right I'm not too keen on going in there either!

0 Kudos
Michelle_Laveri
Virtuoso
Virtuoso

Oh, i didn't know it could be done....

I know this is a ESX 3.x forum but out interest what would the proceedure/entries be?

I'm sure some enterprising fellow could back up the conf file - make the change - compare the conf files - and see the differences...

Regards

Mike

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

You can script the changes to the esx.conf file or replace it entirely. You would have to reboot to get all of the changes to take effect, but it does work in the testing I have done with replacing the file. However, like you said there is no error checking so you have to test the heck out of it before you do this across lots of hosts.

Thomas H. Bryant III
0 Kudos
Michelle_Laveri
Virtuoso
Virtuoso

well, i guess i am that enteprising fellow...

this what i did....

I disabled X VMotion on my VM Kernel switch

backed up the /esx/vmware/esx.conf file to ./esx.back

Re-enabled the X VMotion

and then used

comm -3 esx.conf esx.bak...

the only thing they didn't share was:

/adv/Migrate/Enabled = "1"

So... i disabled it again... and tried

echo /adv/Migrate/Enabled = '"1"' >> /etc/vmware/esx.conf

and then restarted the hostd service with:

service mgmt-vmware restart...

However, when i returned to the VI Client my tick was NOT[/b] in the box...

This can't be the whole story - what if i have more than one VMkernel PortGroup - how would the system know on which portgroup to enable the option? So there must be another option else where... this /adv/Migrate/Enabled option must be for the server, and another change in made on the vSwitch held somewhere else????

Regards

Mike

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

Perhaps they store that information in the database for VC?

Thomas H. Bryant III
0 Kudos
Michelle_Laveri
Virtuoso
Virtuoso

hey, perhaps I need to do a reboot as suggested...

Regards

Mike

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

just doing that now!

0 Kudos
Michelle_Laveri
Virtuoso
Virtuoso

nope... nothing doing...

reboot didn't help...

Regards

Mike

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

nope in fact on my box the entry is removed when mgmt-vmware restart is restarted and obviously when its rebooted.

Must be another option somewhere.

0 Kudos