You are on page 1of 8

1.

Enabling SSH root login in ESX Host: -


Use any one of the bellow examples to Enabling SSH root login: -
Login to ESX Service Console using remote console modular or physical console.
Open the following file: vi /etc/ssh/sshd_config then press ‚I‛ to enter into insert mode
Example – 1 Enabling SSH Root Login
Step0. Use the command to find whether root login enabled or not.
cat /etc/ssh/sshd_config | greap PermitRootLogin 
Step1. Type vi /etc/ssh/sshd_config  ‚open the file to edit‛
Step2. Type /PermitRootLogin  (To find the ‚PermitRootLogin no‛)
Step3. Press ‚I‛ to enter into insert mode.
Step4. Replace the ‚PermitRootLogin no‛ to ‚PermitRootLogin yes‛
Step5. Press Esc button in the keyboard then type :x  ‚:x is nothing but save and exit‛
Restart the sshd service using any one of the bellow method.
Step4. service sshd restart  or /etc/init.d/sshd restart
Example – 2 Enabling SSH Root Login through shortcut
Step1. sed -i 's/PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_config
Step2. service sshd restart
2. Enabling VMware-webAccess Service in ESX Host: -
Use any one of the bellow examples to Enabling vmware-webAccess service in ESX Host:
Login to ESX Service Console using remote console modular or physical console.
Check the vmware-webAccess service is configured to start with ESX host or not.
syntax: - chkconfig vmware-webAccess --list
1|P ag e

V T G U R U V M w a r e v S p h er e - 4 . 1 A d m i n i s t r a t i o n T r a i n i n g I n s t i t u t e i n H y d e r a b a d
Example – 1 Enabling vmware-webAccess service to auto start with ESX Host
Step1. chkconfig vmware-webAccess on “Configure to auto start with ESX”
Step2. service vmware-webAccess start “Start the Service‛ Or
/etc/init.d/vmware-webAccess start
If you want to check all ESX Host service auto startup status, use this bellow command.
service --status-all
3. List of Networking Commands in ESX Server: -

a. esxcfg-vswitch –l  ‚To list out the existing vSwitchs and Portgroup details‛
b. esxcfg-nics –l  ‚To list out the physical NIC’s configurations details‛
c. esxcfg-vswif –l  ‚To list out the existing Service Console Virtual adopter configurations‛
d. esxcfg-vmknic –l  “To list out the existing VMkernel Virtual adopter configurations‛
e. esxcfg-route –l  ‚To list out the VMkernel Routing Configuration details‛
f. esxcfg-firewall –q  “To list out the firewall configuration details‛
g. esxcfg-info “To list out the ESX Host Configuration details‛
4. Create and Configure vSwitch through ESX service console: -

Use esxcfg-vswitch command for creating and modifying Virtual Switch ‚vSwitchs: in ESX Host:
Before creating vSwitch first list out the existing vSwitchs configurations details using bellow command.
Example – 1 Creating vSwitch in ESX Host
Creating vSwitch with specific number of ports: -
esxcfg-vswitch –a ‚Provide vSwitch Name : Provide number of ports which you would like to configure‛
esxcfg-vswitch -a vSwitch:1024
Creating vSwitch with specific MTU ‚Jumbo packet size: -

2|P ag e

V T G U R U V M w a r e v S p h er e - 4 . 1 A d m i n i s t r a t i o n T r a i n i n g I n s t i t u t e i n H y d e r a b a d
esxcfg-vswitch –a ‚Provide vSwitch Name‛ -m Provide MTU Number ‚depends on your physical switch
support‛
esxcfg-vswitch -m 9000 vSwitch
Setp1. esxcfg-vswitch –l

Step2. esxcfg-vswitch –a vSwitchX ‚X is a numerical value – to keep uniqueness‛

Example – 1 Deleting vSwitch in ESX Host


Setp1. esxcfg-vswitch –l
Step2. esxcfg-vswitch –d vSwitchX ‚X is a numerical value – make sure before deleting it‛

3|P ag e

V T G U R U V M w a r e v S p h er e - 4 . 1 A d m i n i s t r a t i o n T r a i n i n g I n s t i t u t e i n H y d e r a b a d
Example – 1 Adding Uplink to vSwitch
# esxcfg-vswitch –L ‚Provide VMNIC Name‛ ‚Provide vSwitch Name‛ to adding up-linking
physical port to particular vSwitchs into esx-server.
Step3. esxcfg-vswitch –L vmnicX vSwitchX ‚X is a numerical value of vSwitch and vmnic ID‛
Example – 2 Removing Uplink from vSwitch
Step3. esxcfg-vswitch –U vmnicX vSwitchX ‚X is a numerical value of vSwitch and vmnic ID‛
5. Create and Configure PortGroups through ESX service console: -

Use esxcfg-vswitch command for creating and modifying Virtual Switch PortGroups in ESX Host:
Before creating vSwitch first list out the existing vSwitchs configurations details using bellow command.
Setp1. esxcfg-vswitch –l
Step2. esxcfg-vswitch –A ‚Port Group Name‛ ‚Provide vSwitch Name‛ under which vSwitch u
want to create this port group‛
Example – 1 Adding Virtual Machine Portgroup to vSwitch
Syntax: - esxcfg-vswitch –A “VM Network” vSwitchX (‚‛ need to be given if single
parameter is provided into two words) ‚X is a numerical value – to keep uniqueness‛

4|P ag e

V T G U R U V M w a r e v S p h er e - 4 . 1 A d m i n i s t r a t i o n T r a i n i n g I n s t i t u t e i n H y d e r a b a d
Deleting Virtual Machine Portgroup from vSwitch
Step1. Before going to delete the ‚VM Network‛ portgroup we need to unregister all VM’s
(Virtual Machines) from the portgroup, please follow the link Unregister VM’s
Example – 1 Adding Virtual Machine Portgroup to vSwitch
Syntax: - esxcfg-vswitch –D “VM Network” vSwitchX (‚‛ need to be given if single
parameter is provided into two words) ‚X is a numerical value – to keep uniqueness‛
Configuring VMkernel Portgroup & Virtual Adopter IP-Address Details
Step1. esxcfg-vswitch –A ‚Port Group Name‛ ‚Provide vSwitch Name‛ under which vSwitch u
want to create this port group‛
Step -1 Adding VMkernel Portgroup to vSwitch
Syntax: - esxcfg-vswitch –A VMkernel vSwitchX ‚X is a numerical value – to keep
uniqueness‛
esxcfg-vmknic –a ‚Provide vmkernel Name‛ –i ‚Provide the IP-Address‛ –n ‚Provide the Netmask‛
–p ‚Provide the Port-Group Name‛ to add the ip-address to the VMkernel port-group in particular
vSwitch into esx-server..
Step - 2 Adding VMkernel Virtual Adopter IP-Address
Syntax: - esxcfg-vmknic –a vmk1 –i 192.168.0.152 –n 255.255.255.0 –p
VMkernel2

Deleting VMkernel Portgroup & Virtual Adopter IP-Address Details from vSwitch
To delete VMkernel we need a proper order ‚Completely reveres order of creation‛.
Step.1 esxcfg-vmknic –d ‚Provide VMkernel Portgroup Name‛ removing particular vmknic
from the specified portgroup.
Step - 1 Delete VMkernel Virtual Adopter
5|P ag e

V T G U R U V M w a r e v S p h er e - 4 . 1 A d m i n i s t r a t i o n T r a i n i n g I n s t i t u t e i n H y d e r a b a d
Syntax: - esxcfg-vmknic –d VMkernel ‚X is a numerical value – which is Portgroup No‛
Step - 2 Deleting VMkernel Portgroup from vSwitch
Step.2 esxcfg-vswitch –D ‚Port Group Name‛ ‚Provide vSwitch Name‛ to delete particular
port groups from vSwitchs in the esx-server.
Syntax: - esxcfg-vswitch –D VMkernel vSwitchX (make sure before deleting it.)
Configuring Service Console Portgroup & Virtual Adopter IP-Address Details
Step1. esxcfg-vswitch –A ‚Port Group Name‛ ‚Provide vSwitch Name‛ under which vSwitch u
want to create this port group‛
Step – 1 Adding Service Console Portgroup to vSwitch
Syntax: - esxcfg-vswitch –A “Service Console” vSwitchX (‚‛ need to be given if single
parameter is provided into two words)
esxcfg-vswif –a ‚Provide VSWIF Name‛ –i ‚Provide the IP-Address‛ –n ‚Provide the Net mask‛ –p
‚Provide the Port-Group Name‛ to add the ip-address to the Service Console port-group in particular
vSwitch into esx-server..
Step - 2 Adding Service Console Virtual Adopter IP-Address
Syntax: - esxcfg-vswif –a vswif1 –i 192.168.0.152 –n 255.255.255.0 –p
“Service Console‛
Deleting Service Console Portgroup & Virtual Adopter IP-Address Details from vSwitch
To delete Service Console we need a proper order ‚Completely reveres order of creation‛.
Step.1 esxcfg-vswif –d ‚Provide vswif Name‛ removing particular vswif from esx-server
Step - 1 Delete Service Console Virtual Adopter
Syntax: - esxcfg-vswif –d vswifX ‚X is a numerical value – which is Virtual Adopter No‛
Step - 2 Deleting Portgroup from vSwitch
Step.2 esxcfg-vswitch –D ‚Port Group Name‛ ‚Provide vSwitch Name‛ to delete particular
port groups from vSwitchs in the esx-server.

6|P ag e

V T G U R U V M w a r e v S p h er e - 4 . 1 A d m i n i s t r a t i o n T r a i n i n g I n s t i t u t e i n H y d e r a b a d
Syntax: - esxcfg-vswitch –D “Service Console” vSwitchX (‚‛ need to be given if single
parameter is provided into two words) make sure before deleting it.
Adding Uplink to portgroup
####### make sure you already added the same uplink to the vSwitch fist ######
esxcfg-vswitch –M ‚Provide vmnicX Name‛ –p ‚Provide the Port-Group Name‛
‚Provide vSwitch Name‛.
Example – 1 adding Uplink to portgroup
Exp: - syntax: - esxcfg-vswitch –M vmnic1 –p “VM Network” vSwitchX
Removing Uplink from portgroup
esxcfg-vswitch –N ‚Provide vmnicX Name‛ –p ‚Provide the Port-Group Name‛ ‚Provide vSwitch
Name‛ Removing uplink to the port-group in particular vSwitch into esx-server..
Example – 2 Removing Uplink to portgroup
Exp: - syntax: - esxcfg-vswitch –N vmnic1 –p “VM Network” vSwitchX
Configuring VLAN ID to Service Console | VM Network and VMkernel Portgroup
esxcfg-vswitch –v ‚Provide VLAN ID‛ –p ‚Provide the Port-Group Name‛ ‚Provide vSwitch Name‛
esxcfg-vswitch -v 99 -p ‚Services Console‛ vSwitch
esxcfg-vswitch -v 100 -p VMKernel vSwitch
esxcfg-vswitch -v 101 -p ‚VM Network‛ vSwitch
Disable VLAN ID on Port Groups

esxcfg-vswitch –v ‚Provide VLAN ID as Zero ‘0’ ‛ –p ‚Provide the Port-Group Name‛ ‚Provide
vSwitch Name‛ VLAN ID will be disabled on particular portgroup.
esxcfg-vswitch -v 0 -p ‚Services Console‛ vSwitch

7|P ag e

V T G U R U V M w a r e v S p h er e - 4 . 1 A d m i n i s t r a t i o n T r a i n i n g I n s t i t u t e i n H y d e r a b a d
Configuring ESX NFS SHARES Command line Configuration

List out NFS Shares in ESX Server using Service Console – Command line.
esxcfg-nas -l
Adding NFS share in read & write mode to ESX Server using Service Console ‚Command line.
esxcfg-nas -a NFS-SHARE -o 192.168.0.2 -s /NFS-SHARE
Adding NFS share in read only mode to ESX Server using Service Console ‚Command line.
esxcfg-nas -a NFS-SHARE -o 192.168.0.2 -s /NFS-SHARE

Deleting NFS Shares from Command mode

Deleting NFS share from ESX Server using Service Console ‚Command line.
esxcfg-nas -d NFS-SHARE

8|P ag e

V T G U R U V M w a r e v S p h er e - 4 . 1 A d m i n i s t r a t i o n T r a i n i n g I n s t i t u t e i n H y d e r a b a d

You might also like