I have a problem with reconfiguring a vswitch from cli.
I have looked at the KB article entitled
However, when i access the cli through tech support mode & type the comand
esxcfg-vswitch -U <vmnic> <vSwitch> #unlink an uplink
the command is not recognised!
the doc does not tell me if i need to be in another directory.
I am not very proficient with the OS.
Can someone help me out please?
Thanks
Colin
its esxcfg NOT esx-cfg
Could you copy the exact command that you entered please
using the esxcfg-vswitch command we can manage the vSwitch
the syntax for removing an uplink is: -U|--unlink=pnic Remove pnic from the uplinks for the vswitch.
first check you switch by using the following command
so if I wanted to remove vmnic1 from this switch I would use the following command>
esxcfg-vswitch -U vmnic1 vSwitch1
and if I wanted to add the link I would use the following command>
esxcfg-vswitch -L vmnic1 vSwitch1
Hi,
Thanks for the reply, the problem i have now is that the host is disconnected from vCenter server.
I connected to vMA & i can see the switch but cannot access to make changes.
[vi-admin@onivma ~]$ vicfg-vswitch --sessionfile ~/myfile --vihost oniesx006.oni.co.uk -d vSwitch0
Unable to communicate with the remote host, since it is disconnected.
I am trying to connect via UCS manager to try the commands you posted again.
Colin
cgwalsh wrote:
However, when i access the cli through tech support mode & type the comand
esxcfg-vswitch -U <vmnic> <vSwitch> #unlink an uplink
Which version of ESXi are you using? 4.0, 4.1 or 5.0?
If you lost access to the managment network you could also use the DCUI to connect a VMNIC to the vSwitch0 for management. That might be easier.
ESXi 4.0
It is from DCUI that i have an issue with the commands.
i need to get connectivty restored to the host, although there are no VMs on there yet.
its esxcfg NOT esx-cfg
lets assume you have one physical nic on your ESX then that will be called vmnic0, if you have one vSwitch it will be called vSwitch0
so first check if you have an uplink
type esxcfg-vswitch -l to list your vSwitch
if you have no vmnic or are missing the one that you want to use for the management network then you need to add it by using the following command:
esxcfg-vswitch -L vmnic0 vSwitch0 ----- replace 0 in vmnic0 with your vmnic and same for the switch replace 0 in vSwitch0 for your switch no.
I feel a bit stupid now !
anyway, the problem i have is that i need to reassign both the vmnics to the exisitng dvswitch, to get connectivity back to the host.
using the command esxcfg-vswitch -P <vmnic> -V <unused dvPort ID> <dvSwitch> where do i find the value for the unused dvPort ID?
Thanks in advance!
What i am trying to do is replace the dvswitch with a vswitch, so i can install the Nexus 1000v.
I have attached both of the vnics to the virtual switch, but cannot access it.
I think i am missing a vmkernel port on the vswitch.
So can i create the vmkernel for the vswitch via cli, or should i re-connect the vmnics to the dvswitch?
To be honest i would offer the following piece of advice, try and understand how a standard vSwitch works before moving to to configure a dvSwitch, thats not meant to offend just a piece of advice, its like trying to run before you can walk.
to change uplinks to a dvSwitch you need to use the following command
esxcfg-vswitch -P <vmnic> -V <unused dvPort ID> <dvSwitch> #add a DVS uplink
for example
esxcfg-vswitch -P vmnic1 -V 1 dvSwitch-VMnetwork
struggling with the commands...
Have a look at these
The dvswitch was configured & working.
The issue is that to install the Nexus 1000v the switches need to be standard not dv.
so what i was trying to do was create a standard switch & use that instead of the dvswitch.
however i forgot to create the vmkernel port in the management vlan (this is the same as the vlan interface on a switch as i undeerstand it) & have lost connectivity.
I need to get back onto the host via either the vswitch or dvswitch!
thanks
can you post the results of
OK i have the following vmkernel ports configured, i just need to get the assigned to the vswitch on both nics!
ok so you have vmnic0 and vmnic1 connected to de dvSwitch and no uplinks for the management network on vSwitch1
if you want to use one of the 2 nics already in use then you need unlink from dvSwitch and add to vSwitch
esxcfg-vswitch -Q vmnicX -V <dvPort ID of vmnic> <dvSwitch> #unlink a DVS uplink
esxcfg-vswitch -L vmnicX vSwitch1
i thought i done that, don't i need to add a vmkernel port to the vswitch next on vlan 55?
i need to confirm the portgroup name for vlan 55, see the following
I'd suggest you restore the stand switch and setup you dvSwitch again from the beginning with all of the steps clearly documented before starting.
