VMware Cloud Community
Munster
Contributor
Contributor
Jump to solution

Renaming a 'Service Console' portgroup using vmware-vim-cmd

Hey all

Just been going through the forums regarding the 'vmware-vim-cmd' command and was wondering if there was a way one could rename the Service console portgroup. Have a script I'm preparing and one of its steps is to rename its SC which I really dunno how to do using 'Vmware-vim-cmd' .

Any help would be great ?

Munster

(PS - thanks in advance)

Reply
0 Kudos
1 Solution

Accepted Solutions
cheeko
Expert
Expert
Jump to solution

As far as I know, there is no way to rename a portgroup. Be it with esxcfg-vswif/vswitch or with vmware-vim-cmd. However deleting and adding it with the new name should do the trick for you.

The addvmportgroup option in kickstart can be 0 or 1. It tells the setup to either add a default portgroup for virtual machines called "VM Network" on the first vSwitch or not. It has nothing to do with the Service Console portgroup naming.

View solution in original post

Reply
0 Kudos
8 Replies
cheeko
Expert
Expert
Jump to solution

Add a new SC Portgroup with the desired name and delete the old one named "Service Console"

esxcfg-vswitch vSwitch -A "My New Service Console"

esxcfg-vswitch vSwitch -D "Service Console"

leonardo1
Enthusiast
Enthusiast
Jump to solution

<![endif]><![if gte mso 9]>

<!--

/* Font Definitions */

@font-face

{font-family:"Cambria Math";

panose-1:2 4 5 3 5 4 6 3 2 4;

mso-font-charset:0;

mso-generic-font-family:roman;

mso-font-pitch:variable;

mso-font-signature:-1610611985 1107304683 0 0 159 0;}

@font-face

{font-family:Calibri;

panose-1:2 15 5 2 2 2 4 3 2 4;

mso-font-charset:0;

mso-generic-font-family:swiss;

mso-font-pitch:variable;

mso-font-signature:-1610611985 1073750139 0 0 159 0;}

/* Style Definitions */

p.MsoNormal, li.MsoNormal, div.MsoNormal

{mso-style-unhide:no;

mso-style-qformat:yes;

mso-style-parent:"";

margin-top:0cm;

margin-right:0cm;

margin-bottom:10.0pt;

margin-left:0cm;

line-height:115%;

mso-pagination:widow-orphan;

font-size:11.0pt;

font-family:"Calibri","sans-serif";

mso-fareast-font-family:Calibri;

mso-bidi-font-family:"Times New Roman";

mso-fareast-language:EN-US;}

.MsoChpDefault

{mso-style-type:export-only;

mso-default-props:yes;

font-size:10.0pt;

mso-ansi-font-size:10.0pt;

mso-bidi-font-size:10.0pt;

mso-ascii-font-family:Calibri;

mso-fareast-font-family:Calibri;

mso-hansi-font-family:Calibri;}

@page Section1

div.Section1

-->

deleting vswif

Esxcfg-vswif -d

vswif0

deleting port group

Esxcfg-vswitch –D “Service Console” vSwitch (o que o service

console esta)

add service console an another vswitch

Esxcfg-vswitch –A “Service Console” vswitch (service console is going)

create vswif

Esxcfg-vswif –a vswif0 –p “Service Console” –i new_ip –n mask

add service console vlan

Esx-vswitch –v 443 –p

“Service Console” vswitch0

Reply
0 Kudos
leonardo1
Enthusiast
Enthusiast
Jump to solution

deleting vswif

Esxcfg-vswif -d

vswif0

deleting port group

Esxcfg-vswitch –D “Service Console” vSwitch (o que o service

console esta)

add service console an another vswitch

Esxcfg-vswitch –A “Service Console” vswitch (service console is going)

create vswif

Esxcfg-vswif –a vswif0 –p “Service Console” –i new_ip –n mask

add service console vlan

Esx-vswitch –v 443 –p

“Service Console” vswitch0

Munster
Contributor
Contributor
Jump to solution

Thanks to both Leornardo and Cheeko for your prompt response but If I can eloborate what my problem is it might make things a little more clearer.

The issue I have is I will be using this script as an addon to my ks.cfg build script. What i need is the following

1 - The ability to rename the SC console from the default 'Service Console' named portgroup to 'ServCons'. I think I 'may' have rectified the problem - before i need to run the postbuild script by means of the following command which is held within the ks.cfg file

network --bootproto --device eth0 static --ip %SCIPADDR% --netmask 255.255.255.128 --hostname %HOSTNAME% --addvmportgroup=ServCons --vlanid=2000

This I think creates the SC on the primary eth0 NIC - hence if I'm not mistaken this creates a SC portgroup called 'ServCons' with a vlanid of 2000

I can then attach the NICs and and add any additional portgroups and the like.

Everyone seems to be using the esxcfg- commands but i was wondering if there might be a way to amend this using the 'vmware-vim-cmd' commands ???

Munster

Reply
0 Kudos
cheeko
Expert
Expert
Jump to solution

As far as I know, there is no way to rename a portgroup. Be it with esxcfg-vswif/vswitch or with vmware-vim-cmd. However deleting and adding it with the new name should do the trick for you.

The addvmportgroup option in kickstart can be 0 or 1. It tells the setup to either add a default portgroup for virtual machines called "VM Network" on the first vSwitch or not. It has nothing to do with the Service Console portgroup naming.

Reply
0 Kudos
petedr
Virtuoso
Virtuoso
Jump to solution

There is a good document available which explains all the vimsh ( vmware-vim-cmds ).

http://knowledge.xtravirt.com/white-papers/scripting.html

www.thevirtualheadline.com www.liquidwarelabs.com
Reply
0 Kudos
Munster
Contributor
Contributor
Jump to solution

Hey thanks Petedr

The 'advanced networking config doco' looks like exactly what i need. Much appreciated for the link looks like i'll have to get the SC and its portgroup created using the initial build and then delete it as my first step in my post build script and recreate it again. Shame you can't run everything using the one command base (i.e. either VMWARE-VIM-CMD or esxcfg-xxxxx commands) This means however i'll be able to create the new SC portgroup as per my requirements. Thanks to all for your help.

Regards

Munster

Reply
0 Kudos
petedr
Virtuoso
Virtuoso
Jump to solution

Munster,

No problem, hope things work out for what you are trying to do.

www.thevirtualheadline.com www.liquidwarelabs.com
Reply
0 Kudos