As vSphere 5.1 is just released, you can run into the problem that the default ISO from VMware doesn’t contain the right drivers for you hardware. During installation you don’t have the option to import a driver. And if no network card is detected, installation won’t continue. In order to fix this problem you have to create your own ISO file. This can be done with PowerCLI.
- Download the VMware-ESXi-5.1.0-xxxxxx-depot.zip (where xxxxxx is the build number) from the VMware website and your driver file (something like Vendor_drivername-version-offline_bundle-xxxxxxxx where xxxxxx is the buildnumber. In my case the file name is: BCM-NetXtremeII-1.0-offline_bundle-553511). Place these files in a directory on your harddrive. I placed the ESXi5.1 depot in c:vmwareesxi51 and the driver file in c:vmwarebcm-driver.
- Start PowerCLI and cd to c:vmware.
- Use the Add-ESXSoftwareDepotcommandlet to add both the ESXi offline bundle and async offline bundle as depots. For example:
Add-ESXSoftwareDepot ./bcm-driverBCM-NetXtremeII-1.0-offline_bundle-553511.zip
Output will be something like:
Depot Url
———
zip:C:vmwarebcm-driverBCM-NetXtremeII-1.0-offline_bundle-553511.zip?index… - Add the vSphere 5.1 software depot file with the command:
Add-ESXSoftwareDepot ./esxi51/VMware-ESXi-5.1.0-799733-depot.zipOutput will be something like:
Depot Url
———
zip:C:vmwareesxi51VMware-ESXi-5.1.0-799733-depot.zip?index.xml - Verify the available software packages with the command: Get-EsxSoftwarePackage
- Next step is to clone a existing image profile.With the command Get-EsxImageProfile you’ll get a list of the available profiles.
Output will be something like:
Name Vendor Last Modified Acceptance
————————– —— ————- —————
ESXi-5.1.0-799733-standard VMware mm/dd/yyyy PartnerSupported
ESXi-5.1.0-799733-no-tools VMware mm/dd/yyyy PartnerSupportedWhere going to clone the ESXi-5.0.0-456551-no-tools profile to a new profile called ESXi-WilmsenIT. This can be done with the command New-EsxImageProfile. For example:
New-EsxImageProfile -CloneProfile “ESXi-5.1.0-799733-no-tools” -name “ESXi-WilmsenIT” -Vendor “WilmsenIT”Output will be something like:
Name Vendor Last Modified Acceptance Level
—- —— ————- —————-
ESXi-WilmsenIT WilmsenIT 2-8-2012 3:0… PartnerSupported
- Now whe’re going to add the driver from step 4.Add-EsxSoftwarePackage -ImageProfile “ESXi-WilmsenIT“ -SoftwarePackage “net-bnx2x”The output appears similar to:Name Vendor Last Modified Acceptance Level
————— —— ————- —————-
ESXi-WilmsenIT WilmsenIT today PartnerSupported
- Last step is to export the imageprofile to a ISO file which you can burn. Use the command Export-EsxImageProfile for this:Export-EsxImageProfile -ImageProfile “ESXi-WilmsenIT” -ExportToISO -filepath C:ESXi-WilmsenIT.iso
Just a quick post how to mount a NFS share using the ESXi CLI.
You all probably know that when it comes to storage protocols, NFS is often used with NAS storage devices. You can mount a NFS share with the vSphere client. But when mouting a NFS share through the vSphere client fails, it’s handy to try it through the CLI. When mounting a NFS share through the CLI you get more info when the mount fails or successes.
So how can you mount a NFS share using the CLI?
Show all active mounts: esxcfg-nas -l
Delete a NFS share: esxcfg-nas -d [datastorename]
Add a NFS share: esxcfg-nas -a –host [nfsserver dns/ip] –share [share name] [datastorename] –readonly
The option –readonly is optional.
Before you mount a NFS share, make sure you know the full path of the share. It’s possible that you have provided a NFS share name like “VMDatastore1” but that the full export name is /nfs/VMDatastore1. This can be vendor specific.
Share names are case sensitive.
The last couple of weeks I’m developing a VMware SRM training. As with every training there are some labs. I order to make the classroom setup as easy as possible I wanted to run the whole setup in VMware Workstation. Because I’m a Mac user, I can’t run VMware Workstation but instead VMware Fusion. With you can see as VMware Workstation for the Mac.
In VMware Workstation its quit easy to create additional VMNETs so for different purposes. But with Fusion this ain’t as easy. This is one feature the Fusion team may spend some time on. Most of the people are using Fusion for running a Windows VM or for developing or testing software.
After some investigation I figured it out how to add additional VMNETs in Fusion. I don’t know if this is supported (probably not:)) so use it on your own risk.
- Stop VMware Fusion and all running VMs. You can check if Fusion is still active with the command:
ps aux | grep -i fusion
No process running, you’re fine! - Change your current directory to: /Library/Preferences/VMware Fusion
If you look at the files in this directory you will see the following:
drwxr-xr-x 7 root wheel 238B Jul 25 14:56 .
drwxr-xr-x 56 root wheel 1.9K Jul 25 11:57 ..
-rw-r–r– 1 root wheel 542B Apr 28 19:44 license-fusion-40-e1-201010
-rw-r–r– 1 root wheel 753B May 27 22:28 networking
-rw-r–r– 1 root wheel 753B Jul 25 14:34 networking.bak.0
drwxr-xr-x 4 root wheel 136B Jun 22 11:02 vmnet1
drwxr-xr-x 7 root wheel 238B Jun 22 11:02 vmnet8The directory vmnet1 is the host only network en the vnmnet8 is the NAT network. These networks come together in the file networking. - Decide if you want to add a host only network or a NAT network. In my case I want to add a host only network. Copy the complete directory to a new name for example vmnet2.cp -R vmnet1 vmnet2
- Change to the directory you just copied. Here you will see a file called dhcpd.conf. Open this file with your favorite text editor (you may have to sudo). The file will look like:# Configuration file for ISC 2.0 vmnet-dhcpd operating on vmnet1.
#
# This file was automatically generated by the VMware configuration program.
# See Instructions below if you want to modify it.
#
# We set domain-name-servers to make some DHCP clients happy
# (dhclient as configured in SuSE, TurboLinux, etc.).
# We also supply a domain name to make pump (Red Hat 6.x) happy.
####### VMNET DHCP Configuration. Start of “DO NOT MODIFY SECTION” #####
# Modification Instructions: This section of the configuration file contains
# information generated by the configuration program. Do not modify this
# section.
# You are free to modify everything else. Also, this section must start
# on a new line
# This file will get backed up with a different name in the same directory
# if this section is edited and you try to configure DHCP again.# Written at: 07/25/2012 14:34:41
allow unknown-clients;
default-lease-time 1800; # default is 30 minutes
max-lease-time 7200; # default is 2 hourssubnet 192.168.83.0 netmask 255.255.255.0 {
range 192.168.83.128 192.168.83.254;
option broadcast-address 192.168.83.255;
option domain-name-servers 192.168.83.1;
option domain-name localdomain;
default-lease-time 1800; # default is 30 minutes
max-lease-time 7200; # default is 2 hours
}
host vmnet1 {
hardware ethernet 00:50:56:C0:00:01;
fixed-address 192.168.83.1;
option domain-name-servers 0.0.0.0;
option domain-name “”;
}
####### VMNET DHCP Configuration. End of “DO NOT MODIFY SECTION” #######Change the following:
– Subnet to the new subnet.
– Hardware ethernet to a unique adress
– Vmnet1 to the net vmnet name. - Now go one directory back where the network file resides. Open this file with your favorite text editor. The file will look like:
VERSION=1,0
answer VNET_1_DHCP yes
answer VNET_1_DHCP_CFG_HASH FAD9FD383AD4CA5074505331257174984EBF838E
answer VNET_1_HOSTONLY_NETMASK 255.255.255.0
answer VNET_1_HOSTONLY_SUBNET 192.168.83.0
answer VNET_1_VIRTUAL_ADAPTER yes
answer VNET_8_DHCP yes
answer VNET_8_DHCP_CFG_HASH 115BED11ABCF3A0C655AC31262F68AB82B9016BB
answer VNET_8_HOSTONLY_NETMASK 255.255.255.0
answer VNET_8_HOSTONLY_SUBNET 172.16.117.0
answer VNET_8_NAT yes
answer VNET_8_VIRTUAL_ADAPTER yesCopy the section of VNET1 or VNET8 to a new section without the VNET_1_DCHP_HASH line. This line will be auto-genereated the next time Fusion will start. Change VNET_1 to the new VNET_ name and alter the option to the new network settings. If you don’t want to use DHCP set VNET_x_DHCP to no. Save the file. - Start Fusion and check with the ifconfig command that the new VMNET is listed.
Now that the new VMNET is created you want a VM to connected to this network. This also has be done through the CLI because the Fusion interface isn’t aware of other VMNETs.
- Go to the homedirectory of the VM you want to alter. Default in Fusion on Mac is ~/Documents/Virtual Machines.localized/
- Open the .vmx file with you favorite text editor.
- Look for the line with:
ethernet0.conntectionType = “Hostonly”
- Change this line into:
ethernet0.conntectionType = “Custom”
- Below the previous line add the following:
ethernet0.vnet = “vmnetX”
- Change vmnetX to the new vmnet name.
Now you can start your VM and test the new network settings.
You probably noticed this but VMware released vCenter server 5.0 Update 1a.
I hear you think: “what’s the fuss about?”. Two things:
- The vCenter appliance replaced the IBM DB2 database with Postgress which reduces the virtual hardware footprint. Personally I think this is a great move!
- Several fixes for SvMotion / vDS / HA. This is a perment fix. The procedure is well described over here.
I’m not going to copy the release notes over here. You can read them for your self:).
I know most of you (like myself) have SSH enabled. I use ssh for esxtop. I know that the vMa or vCLI is the way to go with esxtop (of in that case resxtop) but running esxtop on the ESXi server itself is a lot easier, just because you don’t have to provide credentials every time. I know you can use a session file, but I find this a lot easier.
When ssh is enabled you’ll get a warning in vCenter that ssh is enabled. On the summary page a warning is displayed:
ESXi shell for the host has been enabled SSH for the host has been enabled
Of course you can discar this warning the exclamation mark on the server icon is not nice. It indicates that there is a configuration issue. Maybe this is a configuration mark:) Of course enabling ssh for ESXi is a potential security risk and you only want to enable ssh by default if you often make use of it.
If you want to disable the warning and the exclamation mark do the following:
- Select the ESXi host in the Inventory tab.
- Click the Configuration tab.
- Under Software, click Advanced Settings.
- Click UserVars.
- Change the value of UserVars.SuppressShellWarning to 1.
- Click OK.