Friday 25 May 2012

In ESXi 4 how to create local user account and allow them to login as Root User

Please follow the below steps to Create Local Users in  ESXi 4.1

Step 1:  Login to the ESXi Server using Remote Tech Support with root user credentials
Step 2: Create a local user with the below command

# useradd rajas

Step 3: By default local user account created will not be presented shell access. Hence change the shell using below commands

#usermod -s /bin/ash <username>
#usermod -s /bin/ash rajas

Step 4: By default home directory for local users will not be created. Please create a home directory for user using below commands.

#mkdir -p /home/<username>
#mkdir -p /home/rajas

Step 5: change the ownership of the home directory as below

#chown rajas /home/rajas

Step 6: U can login with rajas account credentials but need to switch over to root user to perform special functions

Step 7: How to directly acquire root access while login with local user credentials

#vi /etc/passwd

dcui:x:100:100:DCUI User:/:/sbin/nologin
vpxuser:x:500:100:VMware VirtualCenter administration account:/:/sbin/nologin
rajas:x:5001:100:ESXi User:/home/rajas:/bin/ash

change the last line as below
rajas:x:5001:100:ESXi User:/:/bin/ash

Step 8: Try login with rajas credentials and execute pwd command to see the path
 










Tuesday 1 May 2012

how to configure virtual switch using command line interface

Recently i added a DvSwitch and added 3 of my hosts to the dvswitch. But unfortunately i lost network connectivity to the ESX hosts.

Did following steps to revert back the changes

Both the physical nics vmnic0 and vmnic1 are mapped to dvswitch.

Step 1: Removed vmnic0 and vmnic1 from the dvswitch
 Syntax: esxcfg-vswitch -Q vmnic0 -V <port id> <portgroup name>

#esxcfg-vswitch -Q vmnic0 -V 216 "AMB 01"
#esxcfg-vswitch -Q vmnic1 -V 217 "AMB 01"

Vmkernel interface also mapped to dvswitch

Step 2:  Remove vmkernel interface from dvswitch

Syntax: # esxcfg-vmknic -d -s <DVswitchname> -v <virtual_port_ID>

#esxcfg-vmknic -d -s "AMB 01" -v 100

Step 3: Mapped vmnic0 to vswitch0

#esxcfg-vswitch -A vmnic0 vSwitch0
#esxcfg-vswitch -A vmnic1 vSwitch1

Step 4: Added vmkernel port to standard switch 


Syntax:#esxcfg-vmknic -a -i <IP Address> -n <netmask> <Portgrp name>


#esxcfg-vmknic -a -i 10.2.1.211 -n 255.255.255.0 "Management Network"


Step 5: How to remove vmkernel port from portgroup 


#esxcfg-vmknic -d "VM Network"



http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1000266

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008127