Find HBA WWN in ESXi 4.0 and ESXi 4.1

How to find HBA WWN in ESXi 4.0 and ESX 4.1

Access ESXi Local Tech Support

Since ESXi 4.0 didn’t come with the “Local Tech Support” Option, you have to log  into the console and then press ALT+F1 then type “unsupported”. You will see it being typed but if you type it correctly and press ENTER, you will access the hidden “Local Tech Support” screen. Enter the root password.

ESXi 4.0

 

 

 

Continue reading

ESXi

Revert Snapshot on ESXi 4.1 using command line in vMA

If you lose connection to the vCenter host, dont have the vSphere client installed or simply want to use the vSphere Management Assistant (vMA) to revert a snapshot on ESX/ESXi 4.1 using command line, this is how you do it:

Revert Snapshot using vMA

Requirments: Install and configure VMware vMA

1- SSH into vMA then connect to ESXi Server hosting vCenter Server using vifp command

2- vmware-cmd -l (to list VMs and the full path of the vmx config file)

3- vmware-cmd /vmfs/volumes/datastore_name/VM/VM.vmx hassnapshot
result -> hassnapshot () = 0 or 1 (1 is yes and 0 is no)

4- vmware-cmd /vmfs/volumes/datastore_name/VM/VM.vmx revertsnapshot
result -> revertsnapshot () = 0 or 1

5- vmware-cmd /vmfs/volumes/datastore_name/VM/VM.vmx start
result -> start() = 1 (Optional Step to start VM depending in what state the VM was when snapshot was taken)

NOTE: Please note that the limitation of the vmware-cmd revertsnapshot is that it will only revert to the last snapshot taken.

ESXi, Snapshot, vMA, vMotion

Install and configure the VMware vMA

Install and configure the VMware vMA for ESX / ESXi 4.1

- Download it from the VMware site

http://www.vmware.com/support/developer/vima/

- Extract the vMA zipped file
- In vCenter Click file, Deploy the OVF Template
- Browse to File, click next
- Check the details of the OVS Template, click next
- Accept the End User Agreement, click next
- Give it a name, default is vSphere Management Assistant (vMA), click next
- Select the disk format, Thick is good unless you are running out of space, click next
- Select the network (vlan), click next
- Review the details and click finish

Configure the vMA

- Power on the vMA
- Open the vMA console and configure the IP address, subnet, Gateway, DNS, hostname and you’re done.

Use the vMA

- Connect it to via SSH using vi-admin as a username since root is disabled by default.
Type:
vifp addserver ESXHOST (to add server as a vMA target)
vifp listservers (Verify that the target server has been added)
vipftarget -s ESXHOST (Set the target as the default for the current session)
vicfg-nics -l (simply a test command to see if the connection is working)

Dont forget to download the vSphere Management Assistant Guide from the VMware site

ESXi, hypervisor, vMA

difference between vicfg and esxcfg in ESXi using vMA

I stated using the VMware vSphere Management Assistant (vMA) and I’m extremely satisfied with all it has to offer and by how easily it was installed and configured. I was able to connect to my ESXi 4.1 hosts and execute commands that I`m used to using in ESX 4.1 service console. The question that I has was what is the difference between the esxcfg and vicfg command? The answer was none. All the esxcfg command and simply using symbolic links that point to the vicfg commands.

Connecting to vMA using SSH

Welcome to vMA
run ‘vma-help’ or see http://www.vmware.com/go/vma for more details.

[vi-admin@vma ~]$ cd /usr/bin/
[vi-admin@vma bin]$ ls -l *cfg-*
lrwxrwxrwx 1 root root    14 Jun 18  2010 esxcfg-advcfg -> ./vicfg-advcfg
lrwxrwxrwx 1 root root    18 Jun 18  2010 esxcfg-authconfig -> ./vicfg-authconfig
lrwxrwxrwx 1 root root    17 Jun 18  2010 esxcfg-cfgbackup -> ./vicfg-cfgbackup
lrwxrwxrwx 1 root root    11 Jun 18  2010 esxcfg-dns -> ./vicfg-dns
lrwxrwxrwx 1 root root    16 Jun 18  2010 esxcfg-dumppart -> ./vicfg-dumppart
lrwxrwxrwx 1 root root    15 Jun 18  2010 esxcfg-hostops -> ./vicfg-hostops
lrwxrwxrwx 1 root root    13 Jun 18  2010 esxcfg-ipsec -> ./vicfg-ipsec
lrwxrwxrwx 1 root root    13 Jun 18  2010 esxcfg-iscsi -> ./vicfg-iscsi
lrwxrwxrwx 1 root root    14 Jun 18  2010 esxcfg-module -> ./vicfg-module
lrwxrwxrwx 1 root root    13 Jun 18  2010 esxcfg-mpath -> ./vicfg-mpath
lrwxrwxrwx 1 root root    15 Jun 18  2010 esxcfg-mpath35 -> ./vicfg-mpath35
lrwxrwxrwx 1 root root    11 Jun 18  2010 esxcfg-nas -> ./vicfg-nas
lrwxrwxrwx 1 root root    12 Jun 18  2010 esxcfg-nics -> ./vicfg-nics
lrwxrwxrwx 1 root root    11 Jun 18  2010 esxcfg-ntp -> ./vicfg-ntp
lrwxrwxrwx 1 root root    14 Jun 18  2010 esxcfg-rescan -> ./vicfg-rescan
lrwxrwxrwx 1 root root    13 Jun 18  2010 esxcfg-route -> ./vicfg-route
lrwxrwxrwx 1 root root    16 Jun 18  2010 esxcfg-scsidevs -> ./vicfg-scsidevs
lrwxrwxrwx 1 root root    12 Jun 18  2010 esxcfg-snmp -> ./vicfg-snmp
lrwxrwxrwx 1 root root    14 Jun 18  2010 esxcfg-syslog -> ./vicfg-syslog
lrwxrwxrwx 1 root root    12 Jun 18  2010 esxcfg-user -> ./vicfg-user
lrwxrwxrwx 1 root root    14 Jun 18  2010 esxcfg-vmknic -> ./vicfg-vmknic
lrwxrwxrwx 1 root root    14 Jun 18  2010 esxcfg-volume -> ./vicfg-volume
lrwxrwxrwx 1 root root    15 Jun 18  2010 esxcfg-vswitch -> ./vicfg-vswitch
-r-xr-xr-x 1 root root  9630 Apr 28  2010 vicfg-advcfg
-r-xr-xr-x 1 root root 11643 Apr 28  2010 vicfg-authconfig
-r-xr-xr-x 1 root root  8872 Apr 28  2010 vicfg-cfgbackup
-r-xr-xr-x 1 root root  9144 Apr 28  2010 vicfg-dns
-r-xr-xr-x 1 root root 12578 Apr 28  2010 vicfg-dumppart
-r-xr-xr-x 1 root root 15986 Apr 28  2010 vicfg-hostops
-r-xr-xr-x 1 root root 26563 Apr 28  2010 vicfg-ipsec
-r-xr-xr-x 1 root root 71379 Apr 28  2010 vicfg-iscsi
-r-xr-xr-x 1 root root  6870 Apr 28  2010 vicfg-module
-r-xr-xr-x 1 root root 19620 Apr 28  2010 vicfg-mpath
-r-xr-xr-x 1 root root 17869 Apr 28  2010 vicfg-mpath35
-r-xr-xr-x 1 root root  8312 Apr 28  2010 vicfg-nas
-r-xr-xr-x 1 root root  9362 Apr 28  2010 vicfg-nics
-r-xr-xr-x 1 root root  7143 Apr 28  2010 vicfg-ntp
-r-xr-xr-x 1 root root  2872 Apr 28  2010 vicfg-rescan
-r-xr-xr-x 1 root root 13367 Apr 28  2010 vicfg-route
-r-xr-xr-x 1 root root 21634 Apr 28  2010 vicfg-scsidevs
-r-xr-xr-x 1 root root  9960 Apr 28  2010 vicfg-snmp
-r-xr-xr-x 1 root root  4798 Apr 28  2010 vicfg-syslog
-r-xr-xr-x 1 root root 36129 Apr 28  2010 vicfg-user
-r-xr-xr-x 1 root root 26297 Apr 28  2010 vicfg-vmknic
-r-xr-xr-x 1 root root 10763 Apr 28  2010 vicfg-volume
-r-xr-xr-x 1 root root 35757 Apr 28  2010 vicfg-vswitch
[vi-admin@vma bin]$

ESXi, hypervisor

VM uses 005056 or 000C29 mac address on VMware ESX

Virtual Machine uses 005056 or 000C29 mac address on VMware ESX

Something I have been noticing when doing an inventory of my virtual machine mac address is that some of them start with 00:50:56 and others start with 00:0C:29.

The explantion for this is very simple. When a VM is created in vCenter on an ESX host, it is automatically assigned a mac address that start with 00:50:56. If the VM was created on the ESX host directly, meaning that you used the VMware vSphere client and pointed it to the host when connecting, it will automatically be assigned the 00:0C:29 mac address.

 

Networking, vCenter, Virtual Machine, vSphere

dvSwitch configuration using command line

Configuring dvSwitch from the command line in ESX/ESXi 4.x

If you’re trying to migrate your Service Console interface from one dvSwitch to another (Including the Cisco Nexus 1000v) and you lose access to the ESX/ESXi host from vCenter, you can always reconfigure using command line. But before you attempt to fix it, check in vCenter what port on the dvSwitch the Service Console was using because the port has the correct VLAN info. If you try to move the Service Console to any random port, it will not work since different ports are assigned to different dvportgroups which means different VLANs. Continue reading

Networking

Removing orphaned Nexus DVS from vCenter

Delete an orphaned Nexus DVS from vCenter

A Nexus 1000v dvSwitch pushed, configured and removed from vCenter by the network team. If the Network team deletes the VSM first without removing the DVS using commands from within the VSM, you will end up with an orphaned DVS and you cant delete it from vCenter client. One way to deleted it is to deleted the rows and tables in the vCenter database but this should be the last case resort as you can corrupt the DB. Luckily there is a cleaner way to delete orphaned Nexus DVS from vCenter.

1- Delete Cisco Nexus 1000v plugin from vCenter to have a clean install. (Check my other post to find out how) Continue reading

Networking, vCenter, vSphere

How to Remove cisco nexus 1000v plugin from vCenter

Uninstall the Cisco Nexus 1000v plugin from vCenter

The Cisco Nexus 1000V switch takes advantage of the VMware vSphere vNetwork Distributed Switch framework to offer tightly integrated network services as part of both a server virtualization strategy and a broader data center virtualization strategy. In addition, the switch provides operations and management consistency with existing Cisco Nexus and Cisco Catalyst switches. Continue reading

Networking

dvsData Folder on Datastore in vSphere 4.x

Is it safe to delete the .dvsData on a Datastore?

The folder is called dvsData for a reason. If you’re using a dvSwitch in your virtual infrastructure and you create a virtual machine (VM) that used that dvSwitch, the ESX server hosting that VM will create a . dvsData folder on the datastore. Continue reading

Storage

Activate root SSH access in ESX 3.x and 4.x

Activate root SSH access in ESX 3.x and 4.x

In ESX 3.x and 4.x, SSH is blocked by default for the root user so you need to activate the root login on the console of the ESX server.

Note that instead of activating ssh for the root, which is not really recommended you can connect to your ESX server with a normal account (which you added during the installation process) and use a linux command su – (switch user) to became a root. However, if you just testing stuff and want to log in directly as root, here is how to do it.

  1. login as a root at the console of your ESX 4 Server (or Remote access card such as iLo or DRAC)
    ESX ssh_config file
  2. Type cd /etc/ssh/ to go into the ssh then type ls –l to list files
  3. Open nano (or any other editor) type: nano sshd_config Continue reading
Uncategorized