Showing posts with label vSphere. Show all posts
Showing posts with label vSphere. Show all posts

Wednesday, December 7, 2011

VMXNET 3: Supported Guest Operating Systems

VMXNET 3 is the newest NIC driver for VMs (requries VM HW v7). It should be chosen as default for all supported guest operating systems. Windows Server 2000, however, is not supported. Here's link to VMware KB with more info. Remember, that when you delete the old NIC and add a new one, then all IP info is wiped and should be reconfigured (mostly relevant for static IPs).




Sunday, July 17, 2011

Changing IP and VLAN on host - no VM downtime

It is possible to change the service console (COS) IP and VLAN id for hosts in a cluster without having VM downtime (see this post for changing hostname). The trick is to change the COS IP first on all hosts and then wait with the changing of the vMotion IP until all COS IP's have been changed. This way, you will be able to put the hosts into maintenance mode one by one and vMotion will still work with the old IP even though COS IP's will differ in range and VLAN id.

NB. It may be neccesary to disable HA for the cluster before you begin as the HA agent will not be able to configure on the hosts when IP's don't match for all hosts.

  1. Enter maintenance mode
  2. Update the DNS entry on the DNS server
  3. Log on to the vCenter server and flush the DNS: ipconfig /flushdns
  4. Go to ILO, DRAC or something similar for the host (you will loose remote network connection when changing the IP) and change the IP (use this KB article for inspiration): [root@server root]# esxcfg-vswif -i a.b.c.d -n w.x.y.z vswif0 , where a.b.c.d is the IP address and w.x.y.z is the subnet mask.
  5. Change the VLAN id (in this case VLAN 12): esxcfg-vswitch -v 12 -p 'Service Console' vSwitch0
  6. Change gateway: nano /etc/sysconfig/network
  7. Change DNS servers: nano /etc/resolv.conf
  8. Restart network: service network restart
  9. Ensure that gateway can be pinged
  10. Update the NTP server from the vSphere client if needed.
  11. Continue the process with next host in the cluster
When all COS IP's have been changed, go to the vSphere client and change all vMotion IP addresses and VLAN id's. This will not require any downtime. And then test that vMotion works.
Done.


Changing hostname from the service console

The easiest way to change the hostname is via the vSphere client (see this post for changing IP address and VLAN IP). If, however, this is not an option for some reason, the hostname can be changed from the service console the following way:

This KB article actually explains most of the proces which includes:

-----------------

1. Open the /etc/hosts file with a text editor and modify it so that it reflects the correct hostname.

2. To change the default gateway address and the hostname, edit the /etc/sysconfig/network file and change the GATEWAY and HOSTNAME parameters to the proper values.

3. For the changes to take place, reboot the host or restart the network service with the command:

[root@server root]# service network restart
Note: This command breaks any current network connections to the Service Console, but virtual machines continue to have network connection.

------------------------------

I have experienced that after a reboot, the changes are reset and the hostname is changed back to the original one. To avoid this, there is one more step to be performed (before reboot):

Change the /adv/Misc/HostName parameter in /etc/vmware/esx.conf file (see screendump)


Tuesday, June 28, 2011

Error during upgrade: The system call API checksum doesn’t match

Today, I got an error during upgrade from vSphere 4.0 to 4.1 stating something like:

The system call API checksum doesn’t match

There was a lot of similar lines filling the console. I was a bit worried that the upgrade had gone wrong even though I had done three similar upgrades before this one with no errors - and that I would have to reinstall in stead.

Luckily, I found this error description in the 4.1 release notes stating that a reboot will fix the issue. So I waited for a while to be sure that the upgrade finished, rebooted, and everything looks fine:

Link to release notes:

"ESX service console displays error messages when upgrading from ESX 4.0 or ESX 4.1 to ESX 4.1 Update 1
When you upgrade from ESX 4.0 or ESX 4.1 release to ESX 4.1 Update 1, the service console might display error messages similar to the following:
On the ESX 4.0 host: Error during version check: The system call API checksum doesn’t match"
On the ESX 4.1 host: Vmkctl & VMkernel Mismatch,Signature mismatch between Vmkctl & Vmkernel

You can ignore the messages.

Workaround: Reboot the ESX 4.1 Update 1 host. "

Tuesday, June 21, 2011

Used network ports between ESX, vCenter, and the vSphere client

In a single customer setup, the network traffic and ports used in the virtual infrastructure are typically not a focus area because most components can be placed on the same networks. However, in a multiple customer environment we're experiencing that the network guys are asking a lot of questions as they want to lock down and secure the networks (which makes sense..).

Anyway, I just wanted to gather some of the info that I use regularly.

  • A link to my previous post with a network diagram
  • Link to VMware KB article about used ports for a vSphere environment and related components
  • vMotion between networks requires TCP port 8000
  • If searching and sorting VMs in the vSphere client is slow, then ensure that port 8443 TCP is opened between the vSphere client and the ESX hosts
  • If hardware status tab is not available, then ensure that port 8443 TCP is opened between the vSphere client and the vCenter server
  • In vCenter 5.x, if searching and sorting VMs in the vSphere client is slow then port 10443 TCP has to be opened between the vSphere client/client PC and the vCenter server (also, opening this port is required for viewing VM inventory across linked mode vCenter servers - for v5.1)
  • If you can't get a remote console on the VMs (you get a black screen and a yellow bar in the top stating some sort of MKS error) ensure that port 903 (and 902) TCP is allowed from the vSphere client and to the ESX hosts
  • If an ESX host keeps disconnecting in vCenter, ensure that port 902 UDP is allowed from the ESX host to the vCenter
Required ports between ESX and vCenter:

Source
Destination
Direction
Protocol
Port
Purpose
vCenter
ESX
In/out
TCP
902
VMware console
vCenter
ESX
In/out
TCP
903
VMware console
vCenter
ESX
In/out
TCP
443
HTTPS
vCenter
ESX
In/out
TCP
22
SSH
vCenter
ESX
In/out
TCP
80
HTTP
vCenter
ESX
In/out
TCP
161
SNMP
vCenter
ESX
In/out
TCP
5989
CIM
ESX
vCenter
out
UDP
902
Heartbeart



Tuesday, May 10, 2011

vSphere Network Ports Diagram

Here's a great network diagram showing used ports in a vSphere environment made by Dudley Smith. Go here for current version as of 2011.05.10. I had to look for it a bit so thought I'd post the link.


And also, there's the vSphere vReference which is quite handy

Tuesday, February 8, 2011

ESX 4.1 install error on BL460c G7 - NIC driver fails to load

The HP BL460c G7 is on the VMware HCL list for ESX 4.1. However, when trying to install ESX 4.1 there's an error during install - it fails to load drivers for the network adapter ("No network adapters were detected"). It doesn't help to update all firmware to latest version (even though this should be done in any case...) (Update 2011.02.18: This problem persists on ESX 4.1 U1)

This is a known error and there's a fix for it. However, it seems strange that the G7 blade has made it to the HCL list...

The problem is that the Integrated NC553i Dual Port FlexFabric 10Gb NIC driver is not included in VMware's installation ISO for ESX 4.1. There are two ways to solve the issue. One is to load a custom set of drivers for the NIC and the other is to use an HP VMware install image. If you're using ESXi or scripted installation of ESX classic, then you have to use the HP image.
(Update 2011.07.19: Custom HBA driver should also be loaded during installation - simply load both ISOs)

Custom NIC driver from VMware can be downloaded here.
Custom HBA driver from VMware can be downloaded here.

(Update 2011.02.18: Apparently, the NIC drivers are updated quite frequently at the moment. Go to this main link and then 'plus out' Driver CDs to find the most recent one.)

HP image for ESX(i) can be downloaded from here.

The custom driver, when downloaded, is in an ISO format. To load it during installation, do the following:

  • Upload the ISO file to where you have the ESX installation image
  • On the Custom Drivers page in the wizard, choose Yes and click on Add. It will tell you to load the driver CD (see picture below)
  • Unmount the ESX installation CD and mount the driver ISO in stead. This can be done without interrupting the installation. You will be prompted to verify the custom driver package, click OK (see picture below)
  • That's it. at a later stage in the wizard, you will be prompted to reinsert the installation ISO. Do that when prompted.


Thursday, July 8, 2010

Disaster recovery: Procedure in case of site failure


Here's a short example of a procedure for recovering a VMware cluster from a site failure. The example scenario consists of two ESX4 hosts on replicated storage divided on seperate locations. There's no automatic failover for storage between sites, manual breaking of the mirror is required.

1.

Log into vCenter and verify whether or not storage is available for the cluster. If storage is unavailable, create an incident ticket for the storage group with priority urgent and with a request to:

“Manually break the mirror for the “"Customer X" replicated storage group” used by ESXA and ESXB”

The ticket should be followed by a phone call to the storage day/night duty to notify of the situation.

2.

When mirror has been broken, rescan remaining hosts in the cluster. This rescan can possibly time out. If this happens, reboot the hosts.

After the rescan/reboot all shared LUNs will be missing on the hosts. These should be added/mounted manually from the console (step 3) (in ESX4u1 there's a bug in the add "storage" wizzard, so it doesn't work from the vSphere client, see this post for more info)

3.

Putty to each of the hosts and run the following commands:

#esxcfg-volume –l

This will list available volumes. For each volume, run the following command:

#esxcfg-volume –M label or UUID>

For example:

#esxcfg-volume –M PSAM_REPL_001

See screendump below for further exemplification:



4.

From the vSphere client, for each of the available hosts go to Configuration -> Storage and click “Refresh”. Verify that all LUNs appear as before the site failure

5.

Power on all VMs

6.

Done. In this situation, storage will run from the secondary site. The storage group will be able to reverse the replication seamlessly at a later stage when failed site is operational again. This does not require involvement from the VMware group.

Thursday, January 14, 2010

Finally the VCP4 certification Welcome Kit arrived

Today, the official VCP4 certification arrived in the mail. Six months(!) did it take for VMware to send the papers. There's no visible sign on the certification to indicate that it was taken as part of the beta exam - except for the date in the lower left corner (July, 16th 2009) indicating that it was achieved before the official release in August 2009.

As a bonus, a free license for Workstation 7 was included in the package which is pretty cool.




Friday, October 2, 2009

VTSP 4 certified

Today, I passed the VTSP 4 (VMware Technical Sales Professional) certification. Apparently, for your company to keep VMware Enterprise Partner status, a minimum of 2 x VCP's, 2 x VSP's, and 2 x VTSP's are required. We have the first two accreditations well covered but needed the VTSP's - so I had to take one for the team together with a couple of the other guys ;-)

The achieve this certification, you need to pass six online tests which you can take at your own pace. These are available through Partner Central. There are self study guides with each test. We received a nice and sweet offer from our distributor to get a two day training session so we got it handled quick and easy...

Saturday, September 5, 2009

I passed the VCP 4 beta exam!

Hurrah! This Monday I received an email notification from VMware stating that I have passed the VCP4 beta exam on vSphere 4 that I took on July, 16th. For that I got a fancy little VCP button to wear at VMworld ;-) The email notification only mentioned that I passed and then a formal score report will be sent next week...

Tuesday, August 11, 2009

Access rights and permissions in vSphere

In more than one instance, I have experienced a situation where we had issues with managing permissions in both vCenter (vSphere 4) and VirtualCenter (VI3). The issue is that a user loses access rights when a group to which the user belongs is added with less permissions.

An example could be that a given user, 'UserA', has administrator rights at the top level (Hosts and Clusters) and then at a lower level (let's say at Datacenter level), a given security group, Group1, in which UserA exists is given, let's say, 'Virtual Machine User' rights. This will decrease the permissions for UserA on that datacenter to only Virtual Machine User in stead of Administrator - he cuts the tree under himself, so to speak.

The consequence can be that in stead of risking this scenario of suddenly losing access rights when groups are added, then security groups are not used at all, only single users are added. This is not a problem when only a few users needs acces to the vCenter or VirtualCenter. However, if many users need access, e.g. 20-40 employees, it gets rather complex to manage.

To be absolutely sure how these permissions work, I have done a bit of testing on both vCenter and VirtualCenter.

Test cases

First of all, permissions seem to work identically in both versions, that is VI3 (VirtualCenter) and vSphere (vCenter). Furthermore, when permissions are changed in vCenter, then they are applied more or less instantaneously. So if you change or configure permissions for a user that has the vSphere client open, then the changes will appear to the user at the same time while he has the vSphere client (or VI Client) open (this makes it nice and easy for testing purposes, by the way...)

If the administrator role is assigned to UserA at the Hosts and Clusters level, and then he is assigned less permissions at a lower level (e.g. at a given Cluster), then the less permisssions on that lower level will win.

It works the same way the other way around, if UserA has 'Read only' on Host and Clusters and Administrator rights at a given Datacenter, then UserA will have full rights on that Datacenter and read only on the rest of the virtual environment.

If UserA has Administrator rights at the Hosts and Clusters level and at the same time a group to which UserA belongs is added with Read only to the same level - the interesting question is which of the two different permision levels will UserA be granted, Administrator (as a single user) or Read only (as he belongs to the group)?
The answer is that the highest defined permissions defined at a given level for a user will win. In the case UserA will have administrator rights at hosts and clusters level.

Administrators group

Another thing to be aware of is that Windows Administrators on the vCenter server are automatically added as administrators in vCenter. If you do not intend to give all of your Windows admins full acces to your VMware environment, then remove the 'Administrators' group from vCenter (in stead, you can add the local administrator user a an administrator in vCenter, so you have the possibility to log in with a local account should AD fail..)

Security groups or Distribution lists

Only security groups defined in Active Directory (AD) can be used as groups in vCenter. Distribution lists won't work.

Recommendations for managing users

In regards to the use of groups for managing users in vCenter, I recommend that groups are used at the hosts and clusters level (of course, this can vary greatly depending on your setup). For example, you could have three groups:

  • VMware admins (Administrator)
  • VM admins (Deploy/destroy rights, change VM specs, etc.)
  • Windows admins (console access to the VMs, similar to ILO access on physical servers)

Even though a VMware admin belongs to several groups, as long as these are defined at the same level, then he/she will retain administrator rights.

By using security groups, then the VMware admins won't have to manage user administration on the VMware environment. When a user is added to a given group in AD (this should be handled by your user administration department or system), then he automatically gets access to vCenter.

For more info, see Basic System Administration guide pp. 213-230 on VMware.com.

Thursday, July 23, 2009

Links to VMware documentation

I always seem to forget where VMware has placed their documentation and in which docs to look for what documentation (maybe it's just me). So here's a few links:

vSphere main documentation:

vSphere Upgrade guide:

VI3 documentation:

Hardware Compability List (HCL):

VI3 and vSphere patch download:

Supported guest OS'es


Thursday, July 16, 2009

VCP4 Beta exam

Today, I took the VCP4 Beta exam. And last chance to take is tomorrow. I was lucky to get an invitation, as I fulfilled the two prerequisites: 1. to be a VCP and 2. to have participated in the vSphere 4 beta program. However, I had my doubts about taking the exam as it was announced rather suddenly and it gave me less than two weeks to study for it. But I thought, what the heck, let's study hard for two weeks and then see what happens...

The exam was quite tough, there were more questions than there will be in the final test. Because I'm a non-native English speaker, I got an extra 30 minutes. But still, 270 minutes is not much for 270 questions! That's one question per minute for 4½ hours straight and no breaks... The exam is covered by the NDA so I can't go into details, but I'm glad I reviewed the configuration maximums and then I should have spent more time on resource management (resource pools), iSCSI, paravirtualization, NPIV, and storage.

For study material, I've used:

And now, we just have to wait 6-8 weeks to get the results...

Saturday, June 6, 2009

Howto: 101 Scripting ESX server installation on vSphere 4

I have been wanting to look into scripted ESX installations for a while now but haven't gotten around to it untill now. At first glance it looks a bit complicated - there a several much used deployment tools around (e.g. EDA and UDA), people are posting bunches of deployment scripts etc. I wanted to know the absolute basics - what is the simplest way to script an ESX installation?

First off, I recommend that you download the ESX and vCenter Server Installation Guide and read pp. 43-58 on scripting installations. This documentation helped me to get started more than posts on the web.
On ESX 4, there are two built-in scripts that you can run when you boot the installation CD: 'ESX scripted install to first disk' and 'ESX scripted install to first disk (overwrite VMFS)'. But that's a little boring as these scripts can't be modified.


In stead, we can let ESX server generate a script for us based on your own installation. I like this way as it simplifies things compared to the very comprehensives scripts out there - and it fits to your environment. Better to have a simple script that works than to have a do-it-all script that doesn't. You can always expand it later.

When you install ESX 4 in the default graphical mode, then a Kicstart script (ks.cfg) with your specific settings is generated and placed in the /root/ folder of your ESX installation. Make a copy of this file, as this is the one we will be using as our base script.

This script is to be copied to the root of the installation ISO. To do that, you need an ISO modifying tool like MagicISO (you need to pay 29$ to make ISO's larger than 300 MB). Open the ESX 4 installation ISO in MagicISO and copy the ks.cfg file into the root of the ISO.

Now, boot your server with the ESX ISO. When the first installation screen shows as below, then hit F2 to get 'other options'. Then shift down to the 'ESX scripted install using USB ks.cfg'. We will not be installing from USB, we will just use the command as a template and modify it to get the ks.cfg script from the CD in stead.

Modify the boot options command like this:

Boot options initrd=initrd.img vmkopts=debugLogToSerial:1 mem=512M ks=cdrom:/ks.cfg quiet

That's it. This will do a basic scripted installation of the ESX 4 server...


Mini troubleshooting: I tried to reinstall the ESX server that I had already installed, which means that there is already a VMFS partitioned disk on the server. So the clearpart command needed the --overwritevmfs flag to work. Furthermore, in the partitioning section I had to comment out some lines and in stead uncomment the 'part' commands with the --firstdisk flags.

I have pasted the basic script below for reference.

----------------sample ks.cfg----------------------
# Don't edit script in notepad or Word. Use Notepad++ or like app

accepteula

keyboard dk

auth --enablemd5 --enableshadow

#I have added the '--overwritevmfs' flag which is
#necessary when reinstalling an existing ESX

clearpart --overwritevmfs --firstdisk

install cdrom

#The encrypted password is taken from the original
#graphical install

rootpw --iscrypted $1$k364YM8i$CyveR0PWuw294uX8HLzcE0

timezone --utc 'Europe/Stockholm'

network --addvmportgroup=true --device=vmnic0 --bootproto=dhcp

part '/boot' --fstype=ext3 --size=1100 --onfirstdisk
part 'none' --fstype=vmkcore --size=110 --onfirstdisk
part 'Storage1' --fstype=vmfs3 --size=8604 --grow --onfirstdisk

virtualdisk 'esxconsole' --size=7604 --onvmfs='Storage1'

part 'swap' --fstype=swap --size=600 --onvirtualdisk='esxconsole'
part '/var/log' --fstype=ext3 --size=2000 --onvirtualdisk='esxconsole'
part '/' --fstype=ext3 --size=5000 --grow --onvirtualdisk='esxconsole'

%post --interpreter=bash

----------------sample ks.cfg EOF----------------------

Tuesday, June 2, 2009

New memory hot add feature in vSphere 4

In the new vSphere, there is a new feature - hot add memory and CPU. This is very cool as downtime can be avoided which is, at least in my company, very helphul during daily operations. To enable these features, do the following:
  1. Make sure the virtual machine hardware is upgraded to version 7 (right click the VM, choose 'Upgrade Virtual hardware', see below).
  2. Go to edit settings for the VM, then the options tab -> Memory/CPU hotplug and enable the two features (see below).
This is all very fine. However, for the features to work, you need a compatible VM OS. And Win2k3 Standard isn't supported. For Windows, it is primarily Enterprise Edition and Datacenter Edition that will work for win2k3. For Win2k8 at least hot add memory will work for all editions 32-bit and 64-bit. See the VMware Compability Guide or for compatible guest operating systems.

Update 2013.07.23: The CPU hot add will auto register the new CPUs in the guest OS for win2k8 R2 Datacenter and Enterprise edition (at least in vSphere 5), see compability chart here. Not for Standard edition. See demonstration here.



Saturday, May 30, 2009

Top VMware blogs and sites - in short

If you're new to VMware it can be a little overwhelming to figure out what and where to get info to get started. The web is full of excellent blogs and sites with VMware stuff, not to mention the VMware communities. I've come across numerous sites that list top blogs and sites and they are very rich on info but maybe it's a little too much if you're just starting out. So in stead of going full throttle, I will list just a few of the most popular blogs and sites. If you follow these, then you'll get a good picture on what's going on. I recommend using an RSS reader like Netvibes for keeping the overview. Here's the sites I recommend:

Blogs

http://www.yellow-bricks.com/ - Duncan Depping, VMware Employee. One of the most popular VMware blogs.

http://www.ntpro.nl/blog/ - Eric Sloof, has his own consulting firm. Dutch guy. The Netherlands is probably one of the most advanced European countries in regards to VMware.

http://vmetc.com/ - Go ugly green with Rich Brambley

http://virtualgeek.typepad.com/virtual_geek/ - EMC guy. Writes some very technical an in depth posts

Communities

VMware Communities - an account in the communities is a must. People here are very fast to respond and very helpful. Try google before you post, though...

Sites

vSphere Land - this site has two very cool subsites. vLuanchpad is a comprehensive list of top blogs and sites. Use this if you want to get further inspiration. And then the Top 10 lists where I especially like the one with Tools.

Sunday, May 24, 2009

Visio stencils for VMware - icons and diagrams

Update 2023.06.16: It's been a while since this page has been updated. But there still seems to be interest in Visio Stencils. The latest relevant links I have found are: This first link to virtualg.uk and a secondary one that links to Github, link here. The Github link has installation instructions in the Readme file as well.

--------

When making visio diagrams of virtual infrastructures, there are plenty of icons for depicting the IT infrastructure. But when it comes to VMware and virtualization specific icons, then Visio is all out. Earlier on, one could go to the VMware VIOPS page to download the official VMware stencils. Today, it seems, that VMware is releasing only the icons in Powerpoint format. These (ppt icons) can be downloaded here.

Maish Saidel-Keesing over at Technodrone has taken it upon him to convert these icons and diagrams into a set of Visio stencils which will give you all you need for making boss friendly diagrams (latest update 2012.06.11). These stencils are compatible with Visio 2010.

The VMware Visio stencils can be downloaded here.

A new set of VMware View stencils has been release on 2012.09.17 by Joshua Townsend at vmtoday.com