Wrzesień, 2012

...now browsing by month

 

„Did you know?” Saturday – DCUI via ssh

sobota, Wrzesień 29th, 2012

Did you know you can connect to DCUI (directly connected user interface) by ssh? Not all terminals support it but Putty will do.

Enable ssh, connect and login and then enter the command:

dcui

DCUI via ssh

DCUI via ssh

Free solutions from Veeam for your virtual environment

piątek, Wrzesień 28th, 2012

Veeam’s solutions don’t have to be presented. They also offer some really cool stuff that apart from being awesome has one more advantage – it’s free :-) So let’s see what we can get and how we can use it in the virtual environment.

FastFCP

It’s a tool to copy files between ESXis and Windows workstations or servers as well between ESXi machines and, as Veeam claims, it does it „6 times faster than WinSCP” by using a full network capacity. Now the tool is a part of Veeam Backup.

Veeam Backup Free Edition

It’ a set of tools that includes a new verion of FastSCP that provides support for both VMware and Hyper-V. What’s more? We get VeeamZIP, a tool to encapsulate all VM files without any disriuption to a one backup file. Then each full VM and its files can be restored to any host. It supports ESX and Hyper-V technologies. It removes zero-blocks and swap to save space. It can restore guest OS files too. How cool is that? And on the top of that – it’s free.

VeeamZIP has some drawbacks as it does not support scheduled or incremental backups. But it is perfect for ad-hoc full VM backups. A nice comparision of full and free versions can be found here. If you feel you’re ready for a paid version, all you need to do is to insert a license file, no reinstallation needed.

Veeam ONE Free Edition

A free version of Veeam’s management and reporting tool provides live monitoring and on demand reports for VMware and Hyper-V environments. The free version has some limits like some reports for only last 24 hours, limited number of VMs in reports or lack of customization but it is a great start to evaluate this solution.

Veeam Explorer for Microsoft Exchange

This one is really cool – now if you backup your Exchange virtual machines and you need to restore some emails, contacts, etc. you can do it directly from the backup. No need to restore the whole VM anymore or even mailbox stores! The software is still in beta and you can request one by registering on Veeam website and going here.

Veeam Stencils for Microsoft Visio

It provides a free collection of VMware and Hyper-V virtualization Visio stencils that include ESX/Hyper-V hosts, datacenters, LUNs, NICs and more. Here’s a nice example of a reports created using the stencils.

Upgrade to vSphere 5.1 – Part 3 – Prerequisites for upgrading with Update Manager 2/2

środa, Wrzesień 26th, 2012

This is part 3 of the series Upgrading to vSphere 5.1. Make sure to check out the other parts as well.

Part 1 – Upgrading a stand-alone host
Part 2 – Prerequisites for upgrading with Update Manager 1/2
Part 3 – Prerequisites for upgrading with Update Manager 2/2
Part 4 – Upgrading the hosts with Update Manager
Part 5 – Upgrading virtual machines
Part 6 – Upgrading datastores

VMware documentation on the upgrade can be found here.

To upgrade your hosts to version 5.1 with VMware Update Manage, the latter needs to be in version 5.1 as well. But here’s the catch: to update the Update Manager (how it sounds…) first you need to upgrade vCenter Server, otherwise this is what you get:

Upgrade vCenter Server first

At this moment however, if you try to upgrade vCenter, you get this message:

Another "no-no"

So let’s upgrade first Inventory Service. To do it, you need to have SSO installed but I have mercy and I have already dealt with that in part 2. To sum up, something that I called „upgrade to 5.1 monstrous chain of dependencies” looks like that:

ESX host <- Update Manager <- vCenter <- Inventory Service <- Single Sign-On

Let’s get this going.

Inventory Services installation

Inventory Services installation

Inventory Services installation

When upgrading vCenter Server make sure your database is backed up and safe – you can never know. The reset of the procedure is simple.

Now let’s upgrade Update Manager to 5.1 by starting the installation from menu.

vCenter Server upgrade

vCenter Server upgrade

vCenter Server upgrade

vCenter Server upgrade

vCenter Server upgrade

vCenter Server upgrade

vCenter Server upgrade

vCenter Server upgrade

Now upgrade Update Manager and in vSphere client download a new plug-in.

Downloading a new UM plug-in

Go to the Update Manager tab and from the admin view select ESXi images tab. Upload iso with ESXi 5.1.

Uploading ESXi 5.1 iso image

Uploading ESXi 5.1 iso image

Upload completed

Upload completed

Create a new baseline with a newly uploaded image.

Creating new baseline Host Upgrade

ISO from the inventory for the baseline

ISO from the inventory for the baseline

Put your host in the maintenance mode and scan it.

Scan completed - host non compliant with 5.1 baseline

Scan completed - host non compliant with 5.1 baseline

When done, click on Remediate.

Choosing baseline for remediation

Choosing baseline for remediation

Redy for upgrade

Redy for upgrade

Grab a cup of coffee / tee / a glass of beer and wait when your server is being upgraded.

Host upgrade completed

Host upgrade completed

The host is in the new version.

The host is reporting version 5.1

The host is reporting version 5.1

Upgrade to vSphere 5.1 – Part 2 – Prerequisites for upgrading with Update Manager 1/2

poniedziałek, Wrzesień 24th, 2012

This is part 2 of the series Upgrading to vSphere 5.1. Make sure to check out the other parts as well.

Part 1 – Upgrading a stand-alone host
Part 2 – Prerequisites for upgrading with Update Manager 1/2
Part 3 – Prerequisites for upgrading with Update Manager 2/2
Part 4 – Upgrading the hosts with Update Manager
Part 5 – Upgrading virtual machines
Part 6 – Upgrading datastores

VMware documentation on the upgrade can be found here.

Available with vSphere 5.1 VMware Single Sign-On which enables you to use multiple system repositories to authenticate when connecting to vCenter 5.1.

In vCenter 5.0 and earlier versions one could use Active Directory or local account to connect to vCenter Server. Single Sign-On adds to this list OpenLDAP as an Identity Source as well as system users (internal SSO users).

To install vSphere 5.1 Inventory Service or new Web Client, you need to install SSO firts. The process is quite straightforward.

Creating a primary node for new SSO deployment

Choosing one node or multinode SSO

Choosing database for your SSO

Setting port to be used by SSO server

Waiting for the installation to finish

The default administrator login which is created with SSO installation is admin@system-domain on vCenter Server installed on Windows Server or root@system-domain on vCenter Applicance. Don’t worry if you lock out the admin account (like it happened to me :-) as it unlocks automatically after 15 min.

To manage SSO login with Web Client: open the browser and go to https://<your_server>:9443/vsphere-client/ You will need Flash Player installed (version 11 I think, did not work with 10). Web Client allows better integration with vCenter Orchestrator. Some features are also available when using Web Client only (new vMotion is an example).

If you want to add a new administration (the only one till now is admin authenticated internally by SSO server) click on Administration and under Sign On and Discovery click on Configuration. Make sure that under Identity Sources your server is listed. If not – add it.

SSO administration allows adding new users/ groups with a proper access level

If you want to add a new identity source, click on a green plus...

... and configure a new identity source

You added an identity source (your local server in this case but it might have been OpenLDAP or AD as well). Now let’s add one of principals provided by this identity source as an administrator. Under Access click on SSO Users and Groups. Go to Groups tab and select __Administrators__. Click on Add principals. Add your account. Now you can use it top login to vCenter Web Client.

Here are currently added accounts

A green plus adds a new principal to your admins

When you install and configure SSO you can go ahead with upgrade to vSphere 5.1.

VMware resources on Single sign-On:

Introduction video

Understanding and troubleshooting vCenter Single Sign-On users, groups, and login qualifications

Troubleshooting VMware Single Sign-On configuration and installation issues in a Windows server

vCenter Single Sign On affects vSphere 5.1 installation – find out how

And last but not least this VMware blog entry lists all VMware KBs on SSO troubleshooting.

Technorati claim code

sobota, Wrzesień 22nd, 2012

Q9CC4NTFFB3E

Awesome vSphere, VMware and virtualization blogs

piątek, Wrzesień 21st, 2012

These are the virtualization-related blogs I have subscribed in my RSS reader. All of them are awesome and I strongly advise to subscribe to them.

VMware vSphere Blog
http://feeds.feedburner.com/vmware/vsphereblog

Yellow Bricks
http://www.yellow-bricks.com/feed/

boche.net – VMware vEvangelist
http://feeds.feedburner.com/Bochenet-VmwareVirtualizationEvangelist

Eric Sloof – NTPRO.NL
http://feeds.feedburner.com/Ntpronl

frankdenneman.nl
http://feeds.feedburner.com/frankdenneman/ZjZC

CormacHogan.com
http://cormachogan.com/feed/

Gabes Virtual World
http://feeds.feedburner.com/GabesVirtualWorld

Professional VMware
http://feeds.feedburner.com/ProfessionalVmware

To prepare to my VCAP-DCA exam I use the following sources:
http://www.vexperienced.co.uk/vcap5-dca/
http://paulgrevink.wordpress.com/the-vcap5-dca-diaries/
http://thefoglite.com/category/vcap5-dca/

Make sure to check them out too!

Missing vmdk header (descriptor) file? Fear not!

poniedziałek, Wrzesień 17th, 2012

If you wake up one day and find your VM’s files missing (due to host having been shut down ungracefull e.g.) not all is lost. You will probably  need to recreate vmx configuration file (easy peasy, just create a new VM with your old VM’s specifications) but also .vmdk virtual disk file might be missing.

Ok, a few words of theory. Your virtual disk is composed of two files: VM-flat.vmdk (extent file) and VM.vmdk (descriptor, we will try to recover this one as it may be missing). If your -flat.vmdk is lost, well, not much can be done as it is the file that contains the disk’s data. You did backup your VMs, didn’t you?

However, if it is the header / descriptor file that is missing, it can be fixed quite quickly. In this tutorial we assume that both your vmx and .vmdk are lost.

VM's sitting there

VM's sitting there

Everything's there

Everything's there

But hey! something's missing

But hey! something's missing

 

1. Create a new virtual machine. We will call it VM_recovered. Specify the settings as for your original VM. Do not add the disk yet. Login via ssh / local console or browse the datastore and confirm that a new .vmx file is there. Copy it to the folder where your original VM is changing the vmx’s name to your original machine’s name.

Don't add any disk now

Don't add any disk now

New temporary VM is ready

New temporary VM is ready

And its files

And its files

So we copy vmx

So we copy vmx

2. Check the size of your original vdisk extent file with the following command:

ls -al | grep flat

Note down the extent's size

Note down the extent's size


3. In your original VM’s directory create a new vdisk with the exact size of your old one. It can be thin-provisionved as the data part we will delete anyway soon.

vmkfstools -c xxxxx -d thin -a lsilogic temporary_disk.vmdk

where you replace xxxxx with disk’s size obtained in point 2.

Create a new, temporary virtual disk

Create a new, temporary virtual disk

 

4. Remove extent file of the newly created temporary disk:

rm ./temporary_disk-flat.vmdk

 

5. Change the name of the new .vmdk file:

mv ./temporary_disk.vmdk ./VM.vmdk

Change the name of the header to match your VM

Change the name of the header to match your VM

You’ve just re-created your VM virtual disk’s header. Now let’s finish its customization.

 

6. Use your favorite editor to edit the descriptor file. You can use nano (ESX only) or vi to do it directly on your host or download the file to your workstation, edit it and upload it again (here are instructions for both vi and nano). Find the line starting with RW and change the name of the extent file (1) from temporary_disk-flat.vmdk to VM-flat.vmdk (the name that maches the existing extent file you found in point 2, Workstation 1-flat.vmdlk in my example). You may also remove the thin provisioning configuration (2). Save the file.

Editing the vmx file

Editing the vmx file

 

7. Edit your VM settings and add an existing disk. Point to the VMFS datastore where you have got your VM. After the change is commited run the VM.

Your VM is back alive

Your VM is back alive

Upgrade to vSphere 5.1 – Part 1 – Upgrading a stand-alone host

piątek, Wrzesień 14th, 2012

This is Part 1 of the series Upgrading to vSphere 5.1. Make sure to check out the other parts as well.

Part 1 – Upgrading a stand-alone host
Part 2 – Prerequisites for upgrading with Update Manager 1/2
Part 3 – Prerequisites for upgrading with Update Manager 2/2
Part 4 – Upgrading the hosts with Update Manager
Part 5 – Upgrading virtual machines
Part 6 – Upgrading datastores

VMware documentation on the upgrade can be found here.

The upgrade should be done according to VMware Migration Path in four steps:

  • vCenter Server
  • Hosts
  • Virtual Machines (VMtools and Hardware version)
  • VMFS datastores

 

This part shows how to upgrade a standalone host with ESXi installation iso.

  • Download the iso from vmware.com, burn it and insert to the server.
  • Shut down all your VMs and boot the server from the CD.
Booting to ESXi 5.1 installation / upgrade CD

Booting to ESXi 5.1 installation / upgrade CD

 

  • After the files are loaded, the installer will find VMFS partition. Press Enter to continue.
VMFS partition is found

VMFS partition is found

 

  • You will be presented with 3 options. Choose „Upgrade ESXi, preserver VMFS datastore”. Press Enter and F11 to confirm.
Choosing an upgrade or a fresh installation

Choosing an upgrade or a fresh installation

Confirm the upgrade

Confirm the upgrade

 

  • Have a cup of tea / coffee while the server is being upgraded.
  • When finished, you will get a confirmation message. Press Enter to reboot.
Upgrade is completed

Upgrade is completed

 

  • Enjoy upgraded ESXi server. Start you virtual machines and verify if everything’s fine.
ESXi reports version 5.1

ESXi reports version 5.1

 

This procedure can also be used when upgrading vCenter-managed hosts but we will do it with Update Manager in Part 4.

„Error 15: Could not find file” on ESX after patching have failed

środa, Wrzesień 12th, 2012

I enountered a situation when a update / patch application to a ESX host failed and after the reboot the host did not boot. When I connected to the console I found the following error:

Error 15: Could not find file

A quick Google search and voila! – this VMware KB seems to talk about my issue! But hold on a second, they ask to „Select Service Console Only mode (ESX 3.5) or Troubleshooting mode (ESX 4.x) on the Grub menu.” Here’s the problem – I cannot boot to the Service Console either for the same reason.

Everything I could do was edit GRUB configuration and I found out that one line in the entry for the Service Console (well, in fact for ESX and ESX debug mode too) pointed to:

kernel --no-mem-option /vmlinuz-2.4.21-57.ELvmnix

So was this file missing? Earlier I applied the same patch(es) to another host so I connected to it and had a look on the bootloader config file (/boot/grup/grup.conf). Here I found that this line was quite different:

kernel --no-mem-option /vmlinuz-2.4.21-58.ELvmnix

I went back to my unbootable server and edited Service Console entry in GRUB – where you’re presented with GRUB boot menu, select Service Console and press ‘e’, then go down to the proper line and select ‘e’ again. Make desired modifications, in my case was simply to change ‘vmlinuz-2.4.21-57.ELvmnix’ to ‘vmlinuz-2.4.21-58.ELvmnix’. Press enter to acknowledge changes and press ‘b’ to boot with your settings.

The server booted to the service console and I followed the instructions from the KB:

esxcfg-boot -p
esxcfg-boot -b
esxcfg-boot -r

I rebooted the server and booted to ESX with no problem. The server will be reinstalled anyway as I do not trust it but this whole operation gave me time and if you have one host only, it can save you.

VMware vSphere 5.0 AutoExpand: static binding with no limits

poniedziałek, Wrzesień 10th, 2012

AutoExpand is a nice solution featured on virtual distributed switch. It allows to automatically increase the number of available ports on a portgroup when their current number becomes too close to the limit. Unfortunately this feature is disabled by default in vSphere 5.0. This KB on port binding tells also how to enable AutoExpand. The method provided in the article is however a bit cumbersome and requires manual modifications via VMware SDK so you will probably find this script very handy as it will do all the job for you.

AutoExpand is enabled per vdportgroup. Once you confirm it is enabled on the vdportgroup you want to use it on go and check how many ports are available. I set the limit to 2 and then I connected another VM NIC to the portgroup. The whole procedure is below:

Use the script to enable AutoExpand and to confirm it is enabled on a desired portgroup

AutoExpand

No ports available on the vdportgroup...

AutoExpand

We are trying to connect another NIC

AutoExpand

...and the numbers increase.

 

And this is what could have happend if not for AutoExpand:

A nasty but meaningful error

 

In vSphere 5.1 AutoExpand feature will be enabled by default. I don’t know there will be enable/disable check in GUI.