vMotion – frankdenneman.nl

Great post about designing your vMotion network.

vMotion – frankdenneman.nl.

Posted in Uncategorized | Leave a comment

The Architecture of VMware ESXi – ESXi_architecture.pdf

The Architecture of VMware ESXi – ESXi_architecture.pdf.

Posted in Uncategorized | Leave a comment

Custom vCenter Server Alarms and Actions

Good blog about “Custom vCenter Server Alarms and Actions”

vLore Blog

As part of many of my vSphere related professional services engagements, such jumpstarts, designs, upgrades and health-checks, I typically address the alarms provided by VMware vCenter Server.  Frequently, I recommend creating some custom alarms and configuring specific actions on some alarms to meet customer needs.  Although my recommendations are unique for each customer, they tend to have many similarities.  Here I am proving a sample of the recommendations that I provided to a customer in Los Angeles, whose major focus is to ensure high availability.  In this scenario, the customer does not use an SNMP management system, so we decided to use the option to send emails to the administration team,  instead of sending SNMP traps.  Also, in this scenario, the customer planned to configure Storage DRS in Manual mode, instead of Automatic mode.

vCenter Alarms and Email Notifications

Configure the Actions for the following pre-defined alarms to send email…

View original post 306 more words

Posted in Uncategorized | Leave a comment

vSphere Web Client Error

After performing a VMware vCenter Server Simple Install, which includes the vSphere Web Client, I was browsed to my vCenter and got the following error message:
Error Message Text:
In order for this direct link to work, you must first log in to the vSphere Web Client at least once from https://{webclient-host}:{webclient-https-port}.

While performing some Google searches – I tried again after 10-15 minutes and the issue was resolved:
vSphere Web Client
Posted in Uncategorized | Tagged , | Leave a comment

VMware ESXi Lab License Renewal

This blog is based on the following:
http://mikekurashima.blogspot.com/2013/02/vmware-lab-reset-trials-vcenter-esxi.html

1.  Establish SSH session to ESXi host

 login as: root
 Using keyboard-interactive authentication.
 Password:
 The time and date of this login have been sent to the system logs.
 VMware offers supported, powerful system administration tools. Please
 see www.vmware.com/go/sysadmintools for details.
 The ESXi Shell can be disabled by an administrative user. See the
 vSphere Security documentation for more information.
 ~ #

2. View license.cfg and vmware.lic files

~ # cd /etc/vmware/
/etc/vmware # ls -lh
total 1588
-r--r--r--    1 root     root        3.0K Sep 19 00:09 BootbankFunctions.sh
-rw-r--r--    1 root     root         282 Jan 22 11:05 config
-rw-r--r--    1 root     root       10.1K Jan 22 11:05 configrules
drwxr-xr-x    1 root     root         512 Jan 22 11:05 default.map.d
-r--r--r--    1 root     root        9.9K Sep 19 00:32 defaultconfigrules
drwxr-xr-x    1 root     root         512 Jan 22 11:05 driver.map.d
-rw-r--r--    1 root     root         512 Jan 22 11:26 dvsdata.db
-rw-------    1 root     root       24.0K Jan 22 11:06 esx.conf
drwxr-xr-x    1 root     root         512 Jan 22 11:05 firewall
-r--r--r--    1 root     root          59 Sep 19 00:32 ft-vmk-version
-r--r--r--    1 root     root          60 Sep 19 00:32 ft-vmx-version
drwxr-xr-x    1 root     root         512 Jan 22 11:06 hostd
drwxr-xr-x    1 root     root         512 Jan 22 11:05 icu
-rw-r--r-T    1 root     root          50 Sep 19 00:09 ima_plugin.conf
-rw-r--r--    1 root     root         311 Jan 22 11:26 license.cfg
-rw-r--r-T    1 root     root         440 Sep 19 00:09 localsas
-rw-r--r-T    1 root     root           0 Sep 19 00:09 lockdown
-rw-r--r-T    1 root     root          53 Sep 19 00:32 lockdown.conf
-rw-r--r--    1 root     root          51 Jan 22 11:05 locker.conf
drwxr-xr-x    1 root     root         512 Jan 22 11:05 microcode
-rw-r--r-T    1 root     root         817 Sep 19 00:09 passthru.map
-r--r--r--    1 root     root      885.3K Sep 19 00:43 pci.ids
drwxr-xr-x    1 root     root         512 Sep 19 00:09 pciid
drwxr-xr-x    1 root     root         512 Jan 22 11:05 rhttpproxy
drwxr-xr-x    1 root     root         512 Jan 22 11:05 secpolicy
drwxr-xr-x    1 root     root         512 Jan 22 11:05 service
-rw-r--r-T    1 root     root           0 Sep 19 00:09 settings
-rw-r--r-T    1 root     root           0 Sep 19 00:09 smart_plugin.conf
-rw-r--r--    1 root     root         278 Jan 22 11:05 snmp.xml
drwxr-xr-x    1 root     root         512 Jan 22 11:05 ssl
-rw-r--r-T    1 root     root         480 Sep 19 00:09 support
-rw-r--r-T    1 root     root          42 Sep 19 00:32 system-users.conf
-r--r--r--    1 root     root      514.2K Sep 19 00:09 usb.ids
-rw-r-----    1 root     root           0 Jan 22 11:05 usbarb.rules
drwxr-xr-x    1 root     root         512 Jan 22 11:05 vm-support
drwxr-xr-x    1 root     root         512 Jan 22 11:05 vmfs
drwxr-xr-x    1 root     root         512 Jan 22 11:05 vmkiscsid
-rw------T    1 root     root          30 Sep 19 00:09 vmware.lic
drwxr-xr-x    1 root     root         512 Jan 22 11:05 vmwauth
drwxr-xr-x    1 root     root         512 Jan 22 11:05 vpxa
drwxr-xr-x    1 root     root         512 Jan 22 11:05 vsan
drwxr-xr-x    1 root     root         512 Jan 22 11:05 weasel
-rw-rw-rwT    1 root     root           0 Sep 19 00:09 welcome

3.  Remove both files

~ # rm -r /etc/vmware/vmware.lic
~ # rm -r /etc/vmware/license.cfg

4.  Copy

cp /etc/vmware/.#license.cfg /etc/vmware/license.cfg

5.  Restart All Services

services.sh restart

MAGIC SAUCE FOLLOWS
Eval

Posted in Uncategorized | Tagged , | Leave a comment

Building a Nested ESXi Home Lab

SUMMARY
This document will summarize the process to build a “nested” ESXi lab environment.   
Anyone who knows me – knows I have to have a picture to understand this madness – and here it is:
 nested esxi lab

 
DOCUMENT LINKS
The is the best blog I found that provides a concise process for this build:
 
VMware Lab setup – A virtualized lab for testing HA and DRS
 
Nested Virtualization
 
Creating a Nested ESXi 5.x Environment
 

Whats in a VIB (vSphere Installation Bundle)?
http://blogs.vmware.com/vsphere/2011/09/whats-in-a-vib.html

Whats in a VIB (vSphere Installation Bundle)?
http://blogs.vmware.com/vsphere/2011/09/whats-in-a-vib.html

 
STEP 1 – CPU VHV Support
The first step is to ensure your CPU supports VHV ( Virtual Hardware Virtualization).  There are two different features that the CPU can possibly support and they are:
1. Intel VT-x or AMD-V 
2. Intel EPT or AMD RVI
Intel VT-x or AMD-V is required for running “Nested Virtualization” BUT only supports nested 32-bit VMs
Intel EPT or AMD RVI is required for running nested 64-bit VMs.
A quick way to verify whether your CPU supports both Intel-VT+EPT or AMD-V+RVI, you can paste the following into a browser: 
https://%5Byour-esxi-host-ip-address%5D/mob/?moid=ha-host&doPath=capability

You will need to login with your root credentials and then look for the “nestedHVSupported” property.  If it states false – but you have confirmed that your CPU at least supports Intel VT-x or AMD-V – then you will still be able to install nested ESXi BUT you will only be able to run only 32-bit VMs.

STEP 2 – Create Nested ESXi VM
Assuming you have already installed ESXi on your physical host, this step summarizes how to build your “nested” ESXi VM
1. Use the vSphere Client to connect to the physical ESXi host that you will use to run the nested host. Launch the “New VM” wizard and fill in the forms like this:

2. Choose Custom Configuration at the beginning, type a name for the machine (e.g. vESXi) and select a datastore for it.

3. Select Virtual Machine Version: 8

4. For the Guest Operating System choose Other, in the Version dropdown select Other (64-bit), then enter VMware ESXi 5.x in the input field:

5. For the CPUs select a configuration that results in at least 2 virtual cores (this can be either 1 socket and 2 cores per socket or 2 sockets and 1 core per socket).

7. Memory: ESXi 5.5 requires a minimum of 4 GB. With ESXi 5.0 and 5.1 the minimum was 2 GB.

8. Network: ESXi will work fine with just 1 NIC, but there are certain scenarios where you get warnings about missing redundancy. So, use 2 NICs.

9. Pick the default SCSI Controller LSI Logic Parallel.

10. Choose to create a new virtual disk with a size of at least 910 MB. This is the minimum size that ESXi requires. Choose any provisioning method.

After the VM has been created edit its General Options and change the Other (64-bit) to VMware ESXi 5.x in the Guest Operating System version dropdown. This is not possible in the New VM wizard, but now after the VM has been created (because running ESXi in ESXi is officially unsupported).

STEP 3 – Upgrading Virtual Hardware to Version 9 and Enabling VHV On All Nested vHosts
If your physical host runs ESXi 5.1 or 5.5 then you should upgrade the VM to version 9, because there were substantial improvements for running nested ESXi in this version.
You can just use the vSphere Client to upgrade the virtual hardware of the VM to version 9 (just select Upgrade Virtual Hardware from its context menu).

If your physical host runs ESXi 5.5 then upgrading the VM via the vSphere client will result in hardware version 10, and you will ONLY be able to use the Web client and no longer be able to use the vSphere client! 

Therefore, do not upgrade to the VM via the vSphere client.  Use the following method to upgrade to v 9.  
 
Open an ESXi shell on your physical host and run the following commands

vim-cmd vmsvc/getallvms

This will list all VMs that are registered on the host. Find the nested ESXi VM that you just created and note its vmid. Then run

vim-cmd vmsvc/upgrade vmid vmx-09

This will upgrade the VM with the id vmid to hardware version 9.

The second thing to do is enabling VHV (Virtual Hardware-Assisted Virtualization). Since ESXi 5.1 this must be done on a per-VM basis by adding a new configuration option to a VM’s vmx file (see this post by William Lam for details). You cannot do this through the vSphere Client, so stay at the command line and …

  • change to the directory of the VM with something like
    cd /vmfs/volumes/datastore/vESXi
    (Replace datastore with the name of the datastore that you created the VM on and vESXi with the name that you chose for the VM)
  • Append the line vhv.enable = “TRUE” to the VM’s vmx file by running
    echo vhv.enable =  “TRUE”>>  vESXi.vmx
    (Replace vESXi with the real name of the VM again. If you are comfortable with vi – the mother of all Unix editors – then you can of course also just edit the vmx-file with that😉
  • Then reload the changed configuration. You need the vmid for this again (see above):
    vim-cmd vmsvc/reload vmid
STEP 4 – Install/Update ESXi on Nested vHosts
 You install ESXi on the nested host just like you would do this on a physical machine. Connect the installation ISO to the VM, power it on and walk through the installation screens. A video guide of an interactive installation is available in the VMware KB article Methods of installing ESXi.

If you have DHCP available on your network then I recommend keeping the host’s IP configuration at DHCP. Otherwise you need to configure valid static IP settings for the VMkernel interface.

Perform these additional steps:

  • Log in to a shell on your nested host (not on your physical one!)
  • Open its firewall for outgoing http-requests:
      esxcli network firewall ruleset set -e true -r httpClient


  • Find out what ESXi 5.5 image profiles (= patch levels) are available in the VMware Online Depot:
    esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-5.5

    (Please note: This is one command-line!)
    You can also grep for ESXi-5.0 or ESXi-5.1 if you do not want to install ESXi 5.5.

  • At the time of this post the most recent ones are shown here:
~ # esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-5.5.0-201410
ESXi-5.5.0-20141004001-no-tools   VMware, Inc.  PartnerSupported
ESXi-5.5.0-20141001001s-standard  VMware, Inc.  PartnerSupported
ESXi-5.5.0-20141004001-standard   VMware, Inc.  PartnerSupported
ESXi-5.5.0-20141001001s-no-tools  VMware, Inc.  PartnerSupported
So you can now update to ESXi-5.5.0-20141004001-standard by running
esxcli software profile install -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.5.0-20141004001-standard
(Please note: Again this is one command line!)
  • Reboot again to complete the installation.
STEP 5 –  Configure the Nested ESXi Virtual Host


Now use the vSphere Client to configure your nested host to suit your needs. Here is a non-exclusive list of things to consider:

  • Hostname and DNS settings (you may skip this if you can use DHCP and DNS reverse lookups, especially if you want to clone this host later. See comment in 7.)
  • Virtual switch(es): If your nested host has two NICs then you will want to add the second one to the virtual switch that was automatically created during installation.
  • NTP servers: If you do not have any on your own network then use publicly available ones like these from pool.ntp.org.
  • Datastores: add local disks, NFS datastores, iSCSI targets via the iSCSI software adapter
  • Optional: Syslogging to a datastore path or syslog server and/or persistent scratch
STEP 6 –  Prepare For Cloning and Export OVA (OVF Tempate)


If you had vCenter available then you could easily convert or clone the VM to a template and use that template to provision as many nested ESXi hosts as you need. 

With a standalone host you have another option to achieve basically the same: Export the VM to an OVA file. You can then create new nested ESXi hosts by importing this OVA file again and again.

You should properly prepare the nested host before you clone it! It’s William Lam again who wrote an excellent article about how to do this

Here is a short summary:

  • Log in to a shell on your nested host
  • Run the following command:
      esxcli system settings advanced set -o /Net/FollowHardwareMac -i 1

    (Guess what? This is one command line again!)
    This will let ESXi change the VMkernel interface’s MAC address whenever its first NIC’s MAC address changes. If you do not do this then you will end up in all cloned hosts using the same MAC address (and that would be really bad!).

  • Now remove the line starting with /system/uuid from the configuration file /etc/vmware/esx.conf:
    sed -i "//system/uuid/d" /etc/vmware/esx.conf

    (You could of course also just use vi instead to edit the file and remove the line).

  • To make the last change persistent run
      /sbin/auto-backup.sh

Then shut down the nested host (on the command line you can just use poweroff for this).

From the vSphere Client (connected to your physical host) you can now export your nested ESXi host to an OVA file.

STEP 7 Provision New Nested Virtual Hosts From the OVA

By deploying the OVF template (importing the OVA file) you can now create as many new nested ESXi hosts as you want. They will all inherit the configuration of the template host, but you can of course reconfigure each to meet your specific testing needs. The only things that must be configured per host is the hostname and – if you are not using DHCP – the IP address configuration.

 
DOCUMENT LINKS
The is the best blog I found that provides a concise process for this build:
 
VMware Lab setup – A virtualized lab for testing HA and DRS
 
Nested Virtualization
 
Creating a Nested ESXi 5.x Environment
 

Whats in a VIB (vSphere Installation Bundle)?
http://blogs.vmware.com/vsphere/2011/09/whats-in-a-vib.html

Whats in a VIB (vSphere Installation Bundle)?
http://blogs.vmware.com/vsphere/2011/09/whats-in-a-vib.html

 
STEP 1 – CPU VHV Support
The first step is to ensure your CPU supports VHV ( Virtual Hardware Virtualization).  There are two different features that the CPU can possibly support and they are:
1. Intel VT-x or AMD-V 
2. Intel EPT or AMD RVI
Intel VT-x or AMD-V is required for running “Nested Virtualization” BUT only supports nested 32-bit VMs
Intel EPT or AMD RVI is required for running nested 64-bit VMs.
 
A quick way to verify whether your CPU supports both Intel-VT+EPT or AMD-V+RVI, you can paste the following into a browser: 
https://%5Byour-esxi-host-ip-address%5D/mob/?moid=ha-host&doPath=capability

You will need to login with your root credentials and then look for the “nestedHVSupported” property.  If it states false – but you have confirmed that your CPU at least supports Intel VT-x or AMD-V – then you will still be able to install nested ESXi BUT you will only be able to run only 32-bit VMs.

 
STEP 2 – Create Nested ESXi VM
Assuming you have already installed ESXi on your physical host, this step summarizes how to build your “nested” ESXi VM

1. Use the vSphere Client to connect to the physical ESXi host that you will use to run the nested host. Launch the “New VM” wizard and fill in the forms like this:

2. Choose Custom Configuration at the beginning, type a name for the machine (e.g. vESXi) and select a datastore for it.

3. Select Virtual Machine Version: 8

4. For the Guest Operating System choose Other, in the Version dropdown select Other (64-bit), then enter VMware ESXi 5.x in the input field:

5. For the CPUs select a configuration that results in at least 2 virtual cores (this can be either 1 socket and 2 cores per socket or 2 sockets and 1 core per socket).

7. Memory: ESXi 5.5 requires a minimum of 4 GB. With ESXi 5.0 and 5.1 the minimum was 2 GB.

8. Network: ESXi will work fine with just 1 NIC, but there are certain scenarios where you get warnings about missing redundancy. So, use 2 NICs.

9. Pick the default SCSI Controller LSI Logic Parallel.

10. Choose to create a new virtual disk with a size of at least 910 MB. This is the minimum size that ESXi requires. Choose any provisioning method.

After the VM has been created edit its General Options and change the Other (64-bit) to VMware ESXi 5.x in the Guest Operating System version dropdown. This is not possible in the New VM wizard, but now after the VM has been created (because running ESXi in ESXi is officially unsupported).

STEP 3 – Upgrading Virtual Hardware to Version 9 and Enabling VHV On All Nested vHosts
If your physical host runs ESXi 5.1 or 5.5 then you should upgrade the VM to version 9, because there were substantial improvements for running nested ESXi in this version.

You can just use the vSphere Client to upgrade the virtual hardware of the VM to version 9 (just select Upgrade Virtual Hardware from its context menu).If your physical host runs ESXi 5.5 then upgrading the VM via the vSphere client will result in hardware version 10, and you will ONLY be able to use the Web client and no longer be able to use the vSphere client!

Therefore, do not upgrade to the VM via the vSphere client.  Use the following method to upgrade to v 9.  
 
Open an ESXi shell on your physical host and run the following commands

vim-cmd vmsvc/getallvmsThis will list all VMs that are registered on the host. Find the nested ESXi VM that you just created and note its vmid. Then run

vim-cmd vmsvc/upgrade vmid vmx-09

This will upgrade the VM with the id vmid to hardware version 9.

The second thing to do is enabling VHV (Virtual Hardware-Assisted Virtualization). Since ESXi 5.1 this must be done on a per-VM basis by adding a new configuration option to a VM’s vmx file (see this post by William Lam for details). You cannot do this through the vSphere Client, so stay at the command line and …

  • change to the directory of the VM with something like

    cd /vmfs/volumes/datastore/vESXi

    (Replace datastore with the name of the datastore that you created the VM on and vESXi with the name that you chose for the VM)

  • Append the line vhv.enable = “TRUE” to the VM’s vmx file by running

    echo vhv.enable =  “TRUE”>>  vESXi.vmx

    (Replace vESXi with the real name of the VM again. If you are comfortable with vi – the mother of all Unix editors – then you can of course also just edit the vmx-file with that😉

  • Then reload the changed configuration. You need the vmid for this again (see above):

    vim-cmd vmsvc/reload vmid

STEP 4 – Install/Update ESXi on Nested vHosts

 You install ESXi on the nested host just like you would do this on a physical machine. Connect the installation ISO to the VM, power it on and walk through the installation screens. A video guide of an interactive installation is available in the VMware KB article Methods of installing ESXi.

If you have DHCP available on your network then I recommend keeping the host’s IP configuration at DHCP. Otherwise you need to configure valid static IP settings for the VMkernel interface.

Perform these additional steps:

  • Log in to a shell on your nested host (not on your physical one!)
  • Open its firewall for outgoing http-requests:
      esxcli network firewall ruleset set -e true -r httpClient

     

  • Find out what ESXi 5.5 image profiles (= patch levels) are available in the VMware Online Depot:
    esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-5.5

    (Please note: This is one command-line!)

    You can also grep for ESXi-5.0 or ESXi-5.1 if you do not want to install ESXi 5.5.

  • At the time of this post the most recent ones are shown here:
~ # esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-5.5.0-201410
ESXi-5.5.0-20141004001-no-tools   VMware, Inc.  PartnerSupported
ESXi-5.5.0-20141001001s-standard  VMware, Inc.  PartnerSupported
ESXi-5.5.0-20141004001-standard   VMware, Inc.  PartnerSupported
ESXi-5.5.0-20141001001s-no-tools  VMware, Inc.  PartnerSupported
 
So you can now update to ESXi-5.5.0-20141004001-standard by running
esxcli software profile install -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.5.0-20141004001-standard
(Please note: Again this is one command line!)
  • Reboot again to complete the installation.
STEP 5 –  Configure the Nested ESXi Virtual Host


Now use the vSphere Client to configure your nested host to suit your needs. Here is a non-exclusive list of things to consider:

  • Hostname and DNS settings (you may skip this if you can use DHCP and DNS reverse lookups, especially if you want to clone this host later. See comment in 7.)
  • Virtual switch(es): If your nested host has two NICs then you will want to add the second one to the virtual switch that was automatically created during installation.
  • NTP servers: If you do not have any on your own network then use publicly available ones like these from pool.ntp.org.
  • Datastores: add local disks, NFS datastores, iSCSI targets via the iSCSI software adapter
  • Optional: Syslogging to a datastore path or syslog server and/or persistent scratch
STEP 6 –  Prepare For Cloning and Export OVA (OVF Tempate)


If you had vCenter available then you could easily convert or clone the VM to a template and use that template to provision as many nested ESXi hosts as you need. 

With a standalone host you have another option to achieve basically the same: Export the VM to an OVA file. You can then create new nested ESXi hosts by importing this OVA file again and again.

You should properly prepare the nested host before you clone it! It’s William Lam again who wrote an excellent article about how to do this

Here is a short summary:

  • Log in to a shell on your nested host
  • Run the following command:
      esxcli system settings advanced set -o /Net/FollowHardwareMac -i 1

    (Guess what? This is one command line again!)

    This will let ESXi change the VMkernel interface’s MAC address whenever its first NIC’s MAC address changes. If you do not do this then you will end up in all cloned hosts using the same MAC address (and that would be really bad!).

  • Now remove the line starting with /system/uuid from the configuration file /etc/vmware/esx.conf:
    sed -i "//system/uuid/d" /etc/vmware/esx.conf

    (You could of course also just use vi instead to edit the file and remove the line).

  • To make the last change persistent run
      /sbin/auto-backup.sh

Then shut down the nested host (on the command line you can just use poweroff for this).

From the vSphere Client (connected to your physical host) you can now export your nested ESXi host to an OVA file.

STEP 7 Provision New Nested Virtual Hosts From the OVA

By deploying the OVF template (importing the OVA file) you can now create as many new nested ESXi hosts as you want. They will all inherit the configuration of the template host, but you can of course reconfigure each to meet your specific testing needs. The only things that must be configured per host is the hostname and – if you are not using DHCP – the IP address configuration.

SUMMARY

This document will summarize the process to build a “nested” ESXi lab environment.

Anyone who knows me – knows I have to have a picture to understand this madness – and here it is:

DOCUMENT LINKS

The is the best blog I found that provides a concise process for this build:

http://www.v-front.de/2014/01/how-to-provision-nested-esxi-hosts-on.html

VMware Lab setup – A virtualized lab for testing HA and DRS

https://www.simple-talk.com/sysadmin/virtualization/vmware-lab-setup—a-virtualized-lab-for-testing-ha-and-drs/

Nested Virtualization

http://www.virtuallyghetto.com/nested-virtualization

Creating a Nested ESXi 5.x Environment

http://tsmith.co/2011/creating-a-nested-esxi-5-environment/

Running Nested VMs

https://communities.vmware.com/docs/DOC-8970

VMware Toosls For Nested ESXi https://labs.vmware.com/flings/vmware-tools-for-nested-esxi

VMware Tools For Nested ESXi

http://vmwaremine.com/2014/04/17/vmware-tools-nested-esxi/#sthash.nd5lYY1X.dpbs

Whats in a VIB (vSphere Installation Bundle)?

http://blogs.vmware.com/vsphere/2011/09/whats-in-a-vib.html

Whats in a VIB (vSphere Installation Bundle)?

http://blogs.vmware.com/vsphere/2011/09/whats-in-a-vib.html

How to Download Individual VIBs From The VMware Online Depot

http://www.v-front.de/2014/06/how-to-download-individual-vibs-from.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+VmwareFrontExperience+%28VMware+Front+Experience%29

STEP 1 – CPU VHV Support

The first step is to ensure your CPU supports VHV ( Virtual Hardware Virtualization).  There are two different features that the CPU can possibly support and they are:

1. Intel VT-x or AMD-V

2. Intel EPT or AMD RVI

Intel VT-x or AMD-V is required for running “Nested Virtualization” BUT only supports nested 32-bit VMs

Intel EPT or AMD RVI is required for running nested 64-bit VMs.

A quick way to verify whether your CPU supports both Intel-VT+EPT or AMD-V+RVI, you can paste the following into a browser:

https://%5Byour-esxi-host-ip-address%5D/mob/?moid=ha-host&doPath=capability

You will need to login with your root credentials and then look for the ” nestedHVSupported ” property.  If it states false – but you have confirmed that your CPU at least supports Intel VT-x or AMD-V – then you will still be able to install nested ESXi BUT you will only be able to run only 32-bit VMs.

STEP 2 –  Create Nested ESXi VM

Assuming you have already installed ESXi on your physical host, this step summarizes how to build your “nested” ESXi VM

1. Use the vSphere Client to connect to the physical ESXi host that you will use to run the nested host. Launch the “New VM” wizard and fill in the forms like this:

2. Choose Custom Configuration at the beginning, type a name for the machine (e.g. vESXi) and select a datastore for it.

3. Select Virtual Machine Version: 8

4. For the Guest Operating System choose Other, in the Version dropdown select Other (64-bit), then enter VMware ESXi 5.x in the input field:

5. For the CPUs select a configuration that results in at least 2 virtual cores (this can be either 1 socket and 2 cores per socket or 2 sockets and 1 core per socket).

7. Memory: ESXi 5.5 requires a minimum of 4 GB. With ESXi 5.0 and 5.1 the minimum was 2 GB.

8. Network: ESXi will work fine with just 1 NIC, but there are certain scenarios where you get warnings about missing redundancy. So, use 2 NICs.

9. Pick the default SCSI Controller LSI Logic Parallel.

10. Choose to create a new virtual disk with a size of at least 910 MB. This is the minimum size that ESXi requires. Choose any provisioning method.

After the VM has been created edit its General Options and change the Other (64-bit) to VMware ESXi 5.x in the Guest Operating System version dropdown. This is not possible in the New VM wizard, but now after the VM has been created (because running ESXi in ESXi is officially unsupported).

STEP 3 –  Upgrading Virtual Hardware to Version 9 and Enabling VHV On All Nested vHosts

If your physical host runs ESXi 5.1 or 5.5 then you should upgrade the VM to version 9, because there were substantial improvements for running nested ESXi in this version.

You can just use the vSphere Client to upgrade the virtual hardware of the VM to version 9 (just select  Upgrade Virtual Hardware  from its context menu).

If your physical host runs ESXi 5.5 then upgrading the VM via the vSphere client will result in hardware version 10, and you will ONLY be able to use the Web client and no longer be able to use the vSphere client!

Therefore, do not upgrade to the VM via the vSphere client.  Use the following method to upgrade to v 9.

Open an ESXi shell on your physical host and run the following commands

vim-cmd vmsvc/getallvms

This will list all VMs that are registered on the host. Find the nested ESXi VM that you just created and note its  vmid . Then run

vim-cmd vmsvc/upgrade  vmid  vmx-09

This will upgrade the VM with the id  vmid  to hardware version 9.

The second thing to do is enabling VHV (Virtual Hardware-Assisted Virtualization). Since ESXi 5.1 this must be done on a per-VM basis by adding a new configuration option to a VM’s vmx file (see  this post by William Lam  for details). You cannot do this through the vSphere Client, so stay at the command line and …

change to the directory of the VM with something like

cd /vmfs/volumes/ datastore / vESXi

(Replace  datastore  with the name of the datastore that you created the VM on and  vESXi  with the name that you chose for the VM) Append the line  vhv.enable = “TRUE”  to the VM’s vmx file by running

echo vhv.enable =  “TRUE”>>   vESXi .vmx

(Replace  vESXi  with the real name of the VM again. If you are comfortable with  vi  – the mother of all Unix editors – then you can of course also just edit the vmx-file with that😉 Then reload the changed configuration. You need the  vmid  for this again (see above):

vim-cmd vmsvc/reload  vmid

STEP 4 – Install/Update ESXi on Nested vHosts

You install ESXi on the nested host just like you would do this on a physical machine. Connect the installation ISO to the VM, power it on and walk through the installation screens. A video guide of an interactive installation is available in the VMware KB article  Methods of installing ESXi .

If you have DHCP available on your network then I recommend keeping the host’s IP configuration at DHCP. Otherwise you need to configure valid static IP settings for the VMkernel interface.

Perform these additional steps:

Log in to a shell on your nested host (not on your physical one!) Open its firewall for outgoing http-requests:

esxcli network firewall ruleset   set   -e   true   -r httpClient

Find out what ESXi 5.5 image profiles (= patch levels) are available in the VMware Online Depot: esxcli software sources profile list -d  https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml  |   grep   ESXi-5.5

(Please note: This is  one  command-line!)

You can also  grep  for  ESXi-5.0  or  ESXi-5.1  if you do not want to install ESXi 5.5. At the time of this post the most recent ones are shown here:

~ # esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-5.5.0-201410

ESXi-5.5.0-20141004001-no-tools   VMware, Inc.  PartnerSupported

ESXi-5.5.0-20141001001s-standard  VMware, Inc.  PartnerSupported

ESXi-5.5.0-20141004001-standard   VMware, Inc.  PartnerSupported

ESXi-5.5.0-20141001001s-no-tools  VMware, Inc.  PartnerSupported

So you can now update to  ESXi-5.5.0-20141004001-standard  by running

esxcli software profile   install   -d  https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml  -p  ESXi-5.5.0-20141004001-standard

(Please note: Again this is   one   command line!) Reboot and log in again to the nested host. Now install the VMware Tools for Nested ESXi by running Install directly from VMware.com (requires internet access from ESXi host):

esxcli software vib install -v http://download3.vmware.com/software/vmw-tools/esxi_tools_for_guests/esx-tools-for-esxi-9.7.1-0.0.00000.i386.vib -f

To uninstall the VIB:

esxcli software vib remove -n esx-tools-for-esxi

Reboot again to complete the installation. STEP 5 –    Configure the Nested ESXi Virtual Host

Now use the vSphere Client to configure your nested host to suit your needs. Here is a non-exclusive list of things to consider:

Hostname and DNS settings (you may skip this if you can use DHCP and DNS reverse lookups, especially if you want to clone this host later. See comment in 7.) Virtual switch(es): If your nested host has two NICs then you will want to add the second one to the virtual switch that was automatically created during installation. NTP servers: If you do not have any on your own network then use publicly available ones like these from  pool.ntp.org . Datastores: add local disks, NFS datastores, iSCSI targets via the iSCSI software adapter Optional: Syslogging to a datastore path or syslog server and/or persistent scratch

STEP 6 –    Prepare For Cloning and Export OVA (OVF Tempate)

If you had vCenter available then you could easily convert or clone the VM to a template and use that template to provision as many nested ESXi hosts as you need.

With a standalone host you have another option to achieve basically the same: Export the VM to an OVA file. You can then create new nested ESXi hosts by importing this OVA file again and again.

You should properly prepare the nested host before you clone it! It’s William Lam again who wrote   an excellent article about how to do this .

Here is a short summary:

Log in to a shell on your nested host Run the following command:

esxcli system settings advanced   set   -o /Net/FollowHardwareMac -i 1

(Guess what? This is  one  command line again!)

This will let ESXi change the VMkernel interface’s MAC address whenever its first NIC’s MAC address changes. If you do not do this then you will end up in all cloned hosts using the same MAC address (and that would be really bad!). Now remove the line starting with  /system/uuid  from the configuration file  /etc/vmware/esx.conf :

sed   -i   “//system/uuid/d”   /etc/vmware/esx.conf

(You could of course also just use  vi  instead to edit the file and remove the line). To make the last change persistent run

/sbin/auto-backup.sh

Then shut down the nested host (on the command line you can just use  poweroff   for this).

From the vSphere Client (connected to your physical host) you can now export your nested ESXi host to an OVA file.

STEP   7   Provision New Nested Virtual Hosts From the OVA

By deploying the OVF template (importing the OVA file) you can now create as many new nested ESXi hosts as you want. They will all inherit the configuration of the template host, but you can of course reconfigure each to meet your specific testing needs. The only things that   must   be configured per host is the hostname and – if you are not using DHCP – the IP address configuration.

Posted in Uncategorized | Tagged , ,

EMC VNXe Configuration Using Unisphere CLI (Part 1)

VNXe UEM CLI

David Ring

This is the first in a series of blog posts on configuring VNXe using the command line. All the configurations here will be performed using “uemcli” which can be downloaded here . If you prefer to use the GUI interface then Henri has a very good series of blog posts here. The following scripts defined here are very useful if like me you need to configure VNXe systems on a weekly basis. VNXe is the base storage for the Vblock VB100 series and also used as the shared storage for management hosts in the VB300 and VB700 series.

The configuration steps outlined in Part 1 will be the following:
• Accept License Agreement
• Change Admin Password
• Create a New User
• Change the Service Password
• Commit IO Modules
• Perform a Healthcheck
• Code Upgrade
• Create a Storage Pool
• Add Hot Spare
• DNS…

View original post 607 more words

Posted in Uncategorized | Leave a comment