Archive
Linux Kernel 3.7 and VMware Tools issue
I got aware of this issue last week after installing a Fedora 18 virtual machine on Fusion 5. The installation of the Tools went as expected but when the install process launched the vmware-tools-config,pl script I got the typical error of not being able to find the Linux Kernel headers.
Searching for a valid kernel header path... The path "" is not a valid path to the 3.7.2-204.fc18.x86_64 kernel headers. Would you like to change it? [yes]
I installed the kernel headers and devel packages with yum.
[root@fed18 ~]# yum install kernel-headers kernel-devel
Fired up again the configuration script and got the same error. The problem is that snce kernel 3.7 all the kernel header files have been relocated to a new path and because of that the script is not able to find them. To solve it just create a symlink of the version.h file from the new location to the old one.
[root@fed18 src]# ln -s /usr/src/kernels/3.7.2-204.fc18.x86_64/include/generated/uapi/linux/version.h /lib/modules/3.7.2-204.fc18.x86_64/build/include/linux/
With the problem fixed I launched the config script again and the tools finally got configured without problems.
[root@fed18 ~]# vmware-config-tools.pl Initializing... Making sure services for VMware Tools are stopped. Stopping Thinprint services in the virtual machine: Stopping Virtual Printing daemon: done Stopping vmware-tools (via systemctl): [ OK ] The VMware FileSystem Sync Driver (vmsync) allows external third-party backup software that is integrated with vSphere to create backups of the virtual machine. Do you wish to enable this feature? [no] Before you can compile modules, you need to have the following installed... make gcc kernel headers of the running kernel Searching for GCC... Detected GCC binary at "/bin/gcc". The path "/bin/gcc" appears to be a valid path to the gcc binary. Would you like to change it? [no] Searching for a valid kernel header path... Detected the kernel headers at "/lib/modules/3.7.2-204.fc18.x86_64/build/include". The path "/lib/modules/3.7.2-204.fc18.x86_64/build/include" appears to be a valid path to the 3.7.2-204.fc18.x86_64 kernel headers. Would you like to change it? [no]
Juanma.
How to install the vCloud Adapter in vC Ops 5.6
Installing the vCloud adapter, or any vC Ops adapter, is a relatively easy task as we will explain in this post.
Firstly you need to download the adapter from ftp.integrien.com. Choose the .PAK file.
Once it is downloaded log into vC Ops Admin UI (/admin”>https://<vcops-ui-vm>/admin). From the Update tab browse for the downloaded file and click Update.
It will ask for confirmation and the will present you the EULA. Accept it and click OK.
Will ask for confirmation again. During the updating process you will be automatically logged out from the Administration Portal, will be unable to log back in until the update is done.
The update process can take a few minutes so grab a coffee and wait until it’s done.
Once the vCloud Adapter installation is done proceed to vC Ops Custom UI (/custom”>https://<vcops-ui-vm>/custom). From the Admin menu go to Support.
In the support screen open the Info tab, look for the Adapters Info pane and click the Describe gear button.
When the describe process is finished refresh the page to check for the adapter presence. Match the adapter version with the build number of the downloaded package.
At this point the adapter is installed, now we are going to configure it to collect from our vCloud instance.
From the Environment menu select Configuration –> Adapter Instances. Select the vC Ops Server collector and the vCloud adapter from the drop down menus. Click on Add New Adapter Instance.
Fill out he fields from the pop-up window. For the IP/Hostname field the public address of the vCloud can be used if a REST API base URL has been assigned.
Remember to set the Auto Discovery option to true unless you want to force the discovery manually.
At this point there will be no credential available from the drop down menu. Click Add to create it.
Click OK and the vCloud Adapter should be configured and collecting. To test it go to Environment –> Environment Overview. In the left pane look for vCloud related Resource Kind, select anyone and look for new resources with a vCloud Data Source in the right pane.
Following this procedure any vCenter Operations Manager relationship adapter can be installed and almost configure, have in mind that of course there will be differences in the credentials and the adapter specifics.
Juanma.
VMworld 2012 – Day -1
This year I finally manage to go to VMworld. It’s been held in the beautiful Barcelona, just a few hundred kilometers from Madrid, and now that the event is gone, the dust has settled and everybody is back at home I decided to share my experiences from the conference in a few blog posts. Also don’t expect technical posts but personal ones :-)
My personal VMworld really started on Sunday morning when after a short flight from Madrid I headed to the conference venue.
There I found three of my colleagues from VMware Spain preparing to work as Lab Staff for the next four days. I took the below picture while we were waiting out of the HOL room, from left to right Jesus Huerta, Marti Perarnau and Carlos Sen.
During the afternoon the HOL Staff and other VMware employees willing to do to labs were allowed to do so. I jumped in and choose the Application Director 5.0 lab, I’ve been trying to find some free time to taste App Director and finally I could.
I was impressed with the product. All the creation process was very straightforward and in the end I had an application with a vFabric Web Server at the frontend, vFabric tc Server as the middleware layer and vFabric vPostgres as the backend. Finally the lab allow me to scale out the app in order to attend a fictitious higher demand. Like I said very easy.
After my satisfactory lab experience I moved to the Solutions Exchange area where all the booths were being built. The transformation process is really amazing. One day there is nothing and a couple of days later… Voila!
Before continuing with the story I have to say that during all day I was tweeting like crazy trying to get in touch with Amy Lewis (@CommsNinja) and Josh Atwell (@Josh_Atwell), both from Cisco, and after a couple of funny moments with Amy showing my Twitter avatar to other VMware staff at the labs we were capable to meet and start the preparations for the evening.
Also thanks to Amy and after walking a bit through the Solutions Exchange area I was able to find my dear friend Fred Nix (@NixFred) from EMC.
We’ve been trying to meet in real life for almost two years without any luck so for me this was a very special moment. The above picture is from Tuesday when the VMworld was “on fire” but I believe it illustrates how funny and awesome is this dude :D
vRockStar Party
Amy, Josh and myself left the conference in the great company of Patrick Carmichael (@VMCarmichael), like yours truly from VMware, and headed to the vRockStar Party. This awesome party was organized by Patrick Redknap (@PatrickRedknap), Marco Broeken (@MBroeken) and sponsored by PHD Virtual, NimbleStorage, the DutchVMUG and ITQ, the company my friend Arjan Timmerman (@Arjantim) works for, and of course he was at the Hard Rock too.
We arrived at Plaza Catalunya by bus and from there we felt brave enough to walk a couple of klicks to the Barcelona Hard Rock Café, where the vRockStar Party was going to be celebrated. After a very long and funny walk with me trying to help Josh to improve his Spanish, and Josh and me complaining about Patrick navigation skills, we arrived at Hard Rock Café. We meet there the one and only J Mezt (@drjmetz) and the party begun…
Lots of beer, geek talk and great friends. You can’t ask more from a party.
Juanma.
VMworld 2012 Europe… I’ll be there
Yes, this year I manage to get myself to the European edition of VMworld. I’m really excited about it, and the best is that I’ll be lucky enough to have spare time during the event to attend some of the most interesting sessions, meet other vExperts, hang in the solutions exchange with the partners, engage with some customers and of course go to the parties during the night (see you in the Veeam one ;-)
So if you are coming to Spain for the most awesome tech event the year don’t forget to ping me by Twitter or Google Plus :-)
See you in Barcelona my dear readers and friends :D
Juanma.
Power and maintenance operations in ESXi 5.1 with esxcli
ESXi 5.1 comes with many improvements and one of them is new namespaces and commands in esxcli.
Those new commands enable a system administrator to perform a shutdown, a reboot or a maintenance operation in a host.
Under the system namespace the new commands are the equivalents of the classic vicfg/esxcfg-hostops which until now was the only way to perform such kind of operations with vCLI and are also accesible locally on ESXi Shell.
Maintenance mode operations
Getting the basic usage of the command is as simple as always. You can perform two operations.
- Get the state of the host
- Put the the host in or out of Maintenance Mode
~ # esxcli system maintenanceMode
Usage: esxcli system maintenanceMode {cmd} [cmd options]
Available Commands:
get Get the maintenance mode state of the system.
set Enable or disable the maintenance mode of the system.
~ #
- Get the state of the host
~ # esxcli system maintenanceMode get Disabled ~ #
- Put the host in Maintenance Mode
~ # esxcli system maintenanceMode set -e true -t 0 ~ # ~ # esxcli system maintenanceMode get Enabled ~ #
Power operations
With the shutdown command the host can be either rebooted or shutdown. If the ESXi server is not in Maintenance Mode mode the operation will not be allowed.
~ # esxcli system shutdown
Usage: esxcli system shutdown {cmd} [cmd options]
Available Commands:
poweroff Power off the system. The host must be in maintenance mode.
reboot Reboot the system. The host must be in maintenance mode.
~ #
For both task the delay and reason parameter must be provided.
~ # esxcli system shutdown poweroff Error: Missing required parameter -r|--reason Usage: esxcli system shutdown poweroff [cmd options] Description: poweroff Power off the system. The host must be in maintenance mode. Cmd options: -d|--delay=<long> Delay interval in seconds -r|--reason=<str> Reason for performing the operation (required) ~ #
- Power off the host
~ # esxcli system shutdown poweroff --delay=10 --reason=”Hardware maintenance”
- Reboot the host
~ # esxcli system shutdown reboot -d 10 –r “Patches applied”
Juanma.
VCSA 5.1– Deployment and upgrade
In the last post we discussed about the new features and changes that comes with version 5.1 of the VMware vCenter Server Appliance. In this new one I will explain how to deploy it and perform an upgrade.
VCSA Deployment
The deployment of the VCSA 5.1 is very similar to the previous version. Use the vSphere Client to deploy a new OVF template and browse to the VCSA OVA package, follow the instructions until you get to the Networking Properties screen.
Here you can pre-set the networking configuration values of the appliance.
If you are going to do a fresh VCSA or vSphere installation enter the appropriate values on each field. If you want to perform an upgrade instead leave them blank to get the info by DHCP or put a temporal IP address if there is no DCHP server in place. You don’t need to put here the final values since during the upgrading process all the network settings will be migrated.
Let the deployment process finish and power on the vCenter appliance. During the boot process you can see how the network configuration is applied to the VM.
And finally you will reach the familiar blue screen.
That’s it, now proceed to the WebUI to complete VCSA setup. In your first log into the vCenter a wizard will appear.
After accepting the EULA you will presented with four options:
- Configure with default settings
- Upgrade from a previous version, which also gives you the option to use the default Single Sign On configuration.
- Upload configuration file. Very useful in case your vCenter Server virtual machine gets corrupted or you messed it up, if have a saved copy of the most recent configuration file you can deploy a new appliance and quickly restore its settings by uploading it.
- Set custom configuration <- I used this option for my homelab testing.
In the next screen you choose which database you want to use, the vPostgres embedded or an Oracle external.
Now we must choose the options for the Single Sign On server. vCenter 5.1 comes with a new component known as the Single Sign On server, or SSO.
SSO allows an administrator to login through the vSphere Web Client or the API and perform operations across all components of the vCloud Suite without having to log into them separately. It integrates with multiple identity sources like Windows Active Directory, NIS and OpenLDAP. The SSO is a requirement for the Inventory Service, vCenter Server and the Web Client.
In the Windows based vCenter installer SSO comes as a separate component that can be installed in the same VM as the vCenter or in a different one as a stand-alone server, in High Availability mode or even in a multisite environment.
The VCSA comes with the SSO embedded however it is prepared to use an external SSO server too. If choose the external SSO deployment mode all the appropriate information must be provided in this screen. Again as with the vCenter itself the database type must be set.
Finally set the Active Directory configuration accordingly to your environment, review the configuration and click Start to begin.
At the end if everything goes fine you will see a screen with a confirmation, click close and will see al the vCenter services up and ready in the main screen of the WebUI.
The deployment and basic setup of the VCSA is done, at this point all other components and settings can be setup from here.
VCSA Upgrade
The upgrade of the vCenter Server Appliance will allow to update to a different OS version and migrate to a different database.
If you are upgrading from 5.0 to 5.1 and using the embedded database, it will be migrated from IBM DB2 to VMware vPostgres. The configuration state will be preserved and the schema will be upgraded in order to be compatible with 5.1. VCSA 5.0 Update 1 already comes with vPostgres instead of DB2.
The major upgrade is supported from 5.0 and updates to 5.1.
The upgrading process is relatively simple:
- Deploy VCSA 5.1.
- Set the 5.0 appliance as source and 5.1 as destination.
- Establish a connection between both VCSAs.
- Import network configuration of existing VCSA.
- Prior to the upgrading the VCVA 5.1 must have a valid network connection and vCenter Server service must be stopped and un-configured.
Deploy the appliance as shown above, log into the WebUI and in the wizard accept the EULA in the first screen and select Upgrade from previous version in the second, let Use default SSO configuration as it comes by default.
The next screen that will be displayed is the Local and Remote Appliance keys.
Here we have put the current VCSA 5.0 key. To do so go to the Upgrade tab in VCSA 5.0 web interface. In the Prepare section select source and click Set role.
Go back to the VCSA 5.1 and copy the Local appliance key. On the 5.0 appliance click on Establish Trust and paste the copied key in the Remote key appliance key field. Click on Import remote key and wait for the import to complete.
In the VCSA 5.0 copy the Local appliance key. Go to 5.1 vCenter, paste that key on the Remote appliance key field of the setup wizard screen and click Next. The Pre-Upgrade Checker screen will show up.
After this a check will be run against the ESX/ESXi managed by the old VCSA and it will generate a report.
And the final screen will appear asking for confirmation. Click on the confirmation checkbox and in Start.
During the upgrade VCSA 5.1 will shutdown the 5.0 virtual appliance and assumes its network identity.
When the process is done a final screen will appear.
If you want to check if the process is done log into the VCSA through SSH and list the vmware services, vmware-sso just to name one will show up on the list.
Also you can access the vSphere Web Client and will see the new 5.1 client.
Juanma.
VCSA 5.1– A quick look
Yesterday was a very exciting day, VMware finally announced the new vCloud Suite 5.1. With new products and features announced, each one of them as great as ever.
But yours truly decided that instead of presenting you a generic “What’s new” post it was more interesting, at least for me and hope also to you, to focus in one of my favorite pieces of vSphere, the vCenter Server Virtual Appliance and in a couple of articles describe what new features are coming and how to perform an upgrade from 5.0 to 5.1.
What’s new in the VCSA 5.1
With this new release of the vCenter Server VA a few new features have been added, most of them related to the WebUI and to the new features and services that have been released globally for the vCenter 5.1, Windows and Linux based versions.
These new enhancements can be seen in the Summary section of the vCenter Server Tab as shown in the screenshot below.
From here all the vCenter Service can be started and stopped. The Services Tab no longer exists and it’s now a section of the vCenter Server Tab.
In the Storage Usage are you can check the disk usage of the different components of the VCSA.
There is also a Utilities are where you can:
- Generate a support bundle in case of an incidence with the vCenter Server.
- Download the configuration file of the VCSA and then open it in your favorite text editor.
- Launch again the Setup Wizard to configure the VCSA from scratch or make modifications to some of he initial settings.
- Upload the Windows Sysprep files to the vCenter VA.
- For this last option the procedure is quite simple. Click the
Upload
- button.
A new windows will open, select the operating system and browse for the location of the files.
The files will be uploaded to /etc/vmware-vpx/sysprep/<OS>.
Additionally in the vCenter Server Tab two new sections have been added.
The Service section where the VCSA administrator can setup:
- ESXi Dump Collector repository size
- vSphere Auto Deploy repository size
- Inventory size
The SSO section. Here you can configure all the settings related to the newly introduced Single Sign On server.
In the next post we will discuss about VCSA 5.1 initial deployment and how to upgrade from 5.0 and 5.1.
Juanma.
Change ESXi 5 iSCSI iqn with esxcli
After my previous post about getting the iqn of an ESXi using esxcli Andy Banta (@andybanta) commented on Twitter that you can also change the iqn of the host with esxcli.
As he said it would be tremendously useful if you need to physically replace the server and don’t want to modify all your storage infrastructure, it’s easier to just modify the iqn of the new server and set it to the old name.
The task is as easier as the one described in last post. Using esxcli command with the iscsi namespace you can change the name and the alias of the adapter.
As a precaution first retrieve the current iqn to check that it’s the correct server.
To change the name you have to provide the adapter and the new name.
Hope you find this useful, any comments and suggestions are welcome as always.
Juanma.
How to get iSCSI iqn using esxcli in ESXi 5
Back in 2010 I wrote a post about how to get the iSCSI iqn of an ESXi 4.x server using vSphere CLI from the vMA or any other system with the vCLI installed on it.
The method described in that article is still valid for ESXi 5.0 since the old vicfg and esxcfg commands are still available, however with 5.0 version you can get a similar result using the new esxcli namespaces, following is how to do it.
First task is to get a list of the iSCSI HBAs in order to know the name of the software iSCSI initiator.
Next we get the info of the adapter.
Look at the Name field to get the iqn and we are done.
Juanma.
A bit of troubleshooting of the vCenter Server Appliance
If your vCSA is configured to use the embedded DB2 database and if it’s not properly shutdown, next you power it on may be you should not be able to power on a VM like in the screenshot below…
…or the vSphere Client will not show some of information about the host or the VMs.
We all have seen those kind of errors in our homelabs from time to time. In the Windows-based vCenter it was relatively easy to solve, close the client, log into the vCenter, restart the vCenter Server service and in the next login into the vSphere Client everything will go as expected.
However how can we resolve this issue in the vCenter Linux appliance? Can’t be easier.
There are two ways to restart the vCenter services in the vCSA:
- From he WebUI administration interface
- From the command line
For the first method log into the WebUI of the vCSA by accessing https://<vCSA_URL>:5480 with your favorite web browser.
In the vCenter Server screen in the Status tab there stop and start the vCenter Server service from the Action buttons.
The second method is faster and easier, and to be sincere it feels more natural for me and probably for the other Unix Geek/Sysadmins out there.
The vCenter service in the Linux appliance is vmware-vpxd so with a simple service vmware-vpxd restart we’ll be on business again. Check the screenshot below.
Finally as seen in the screen capture you can check the status of the service.
More on troubleshooting the vCSA in a future post.
Juanma.

