All posts by brunofernandez

Backing up VMs from a standalone ESXi for FREE

People often ask me how they should backup their VMs from an standalone free ESXi server before maintenance of hardware or when they want to upgrade their ESXi to a newer version.

Well, for this I will list here some possibilities to backup your VM  once or scheduled and for free:

ONCE:

Export to OVA: The easiest way is to use the vSphere Client and export the VM to OVA. The exported VM can then be saved on your client workstation where the vSphere Client is running. In the vSphere documentation you can read how to do it:

https://pubs.vmware.com/vsphere-55/index.jsp?topic=%2Fcom.vmware.vsphere.vm_admin.doc%2FGUID-B05A4E9F-DD21-4397-95A1-00125AFDA9C8.html

Veeam Backup free Edition: Veeam Backup free Edition is probably the most powerful solution to backup your VMs for free.  In adtition of backing up VMs, you can also migrate the VMs between multiple ESXi server, work with tapes and other nice features. Please visit the Veeam site to get more information:

http://www.veeam.com/

Trilead VM Explorer: from the Internet i’ve found this tool that some people can recommend. I have never installed neither tried it. Have a try and give me some feedback. I would appreciate it.

https://www.trilead.com/

SCHEDULED:

ghettoVCB: ghettoVCB is a shell script which uses the API from VMWare to backup the VMs. It is not that easy to configure but when you have it configured once, it’s cool to work with it. The BIG advantage on this tool is, that you can schedule the script with an cronjob. So you have periodically backups of your system without having to interact. You will find more information on the VMWare community site:

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

 

 

I will update this post when I’ve found more tools to backup VMs for free…

Network Port Diagram for vSphere 6.0

VMWare finally released a “BIG PICTURE” network port diagram at their knowledge base site:

kb.vmware.com/kb/2131180

This is really a MUST HAVE if you are working in environments with security firewalls between the systems. So go and take it.

In older releases we had to work with this shitty table:

kb.vmware.com/kb/1012382

Thanks to VMWare and have fun with the diagram.

 

VPXA.wordpress.com goes VPXA.info

I finally migrated my blog from the public wordpress server to a private one.

One of the reasons for the migration was the possibilty to customize the website directly by editing the files. The second reason for the migration was the lower price for hosting than for the premium or business wordpress.com plans. They are to expensive for the features you recieve.

Thanks to wpbeginner.com for creating this useful post explaining how to migrate wordpress.com to wordpress.org. With this tutorial  it is really foolproofed and you can simply migrate it.

After the migration I added the Jetpack for WordPress and added a new design. I hope you like the new design.

In the next few days I will update the blog with new features and content. So please stay tuned!

Please use from now on the  new URL: http://vpxa.info

The old site will be deleted in the next few days

Install ESXi 6.0 on a DL380 G5 – yes it works

For a VMWare Horizon View POC in our environment we recieved an old HP DL380 G5 with nice specs: 2 phy. Quad-CPUs, 32GB RAM, RAID-Controller with write Cache, and quite everything redundant.

As SSDs are getting more and more beneficial, we bought 4 Kingston 300v SSD with 480GB of space and installed them in the OEM cases of the HP disks. Yes, this works!

For our tests this hardware is more than enough.

First of all I googled around to see if there was already someone who tried to install ESXi 6.0 on an old DL380 G5 as it isn’t a supported hardware. I’ve found this article from a guy that was having problems with the HP custom iso installing it on a G5 server:

http://htluo.blogspot.ch/2015/05/esxi-60-on-hp-dl380-g5.html

So I decided to have a try with the original ISO. After booting the Image I received an error message saying that I’m using unsupported hardware. Thank’s for the information but I know this already 😉 You can accept the information an run-through.

After the installation completed, I connected to the ESXi server with the VIClient. Everything looked well with the exception of the hardware. There was no hardware listed.

This is because the HP drivers are not integrated into the image. So I downloaded the needed VIBs from the HP VIB repository and installed them (the text in the brackets is not part of the command). For those who don’t know what a VIB is, have a look on this article:

Before I could install the VIBs I had to put the ESX server in maintenance mode:

If you receive a message like this, this is because there are VMs running on the system:

So I had to check what VMs are running on the system and stop them. You can do this with the VI Client or with the shell:

Now that we have the world id of the VM (similar to the PID), we can stop the VMs with those commands:

Retry now to run the enter maintenance mode command and check the state with this command:

The output should look similar to this:

As you can see, the ESX server is now in maintenance mode. So i could begin with the installation of the VIBs. For this I used the esxcli “software vib install”. It is important that you write the full path to the VIB file. Otherwise the command ends with an error:

The output should look similar to this:

As you can see in the message, the system requires a reboot after the installation. So we can now reboot the system with the reboot command.

After the reboot we can connect us with the VIClient to the esx server and now we should see all the hardware and sensors installed on the system:

ESX Hardware

So then, I wish you happy virtualizing with your new ESXi server and do not forget to configure the rest such as ntp, ssh, portgroups, vm settings and so on.

P.S. this server is running now about 4 weeks without any problems or PSOD

Getting all Snapshots with Powershell

Every vSphere Admin knows, that if you give someone in your organization the rights to take snapshots, you will lose the control of them.

Often they forget to delete the snapshot after their maintenance. So the snapshots gets bigger and bigger. The results are full datastores, big snapshots that can’t be no-more deleted and in the worst case you will have corrupted VM.

To counter against those problems, I’ve wrote a Powershell script that gets all snapshots in your environment and sends you an email with the name, size, time and the description of the snapshots.

You just have to edit the global variables with yours and then schedule the script.

After this, you can control your snapshots much more better.

Feel free to use, edit and share it:

Check Lockdown Mode Powershell Script

For security reasons one of my customer has Lockdown mode activated on all them ESXi server. Unfortunately, with vSphere 5.5 at least, there is no way to configure the lockdown mode on the host profile. So you have to do it manually on each ESXi server that you add to the vCenter.

Then when an administrator want’s to manage something with SSH or vSphere Client directly to the ESXi host, they have first to disable the Lockdown mode. Often they forget to enable the Lockdown mode again.

For this reason I created this script whitch is scheduled on the vCenter Server with the Windows Task Scheduler. It checks every ESXi host if it has the Lockdown Mode enabled and when not, it enables it.

As an “nice to have”, it sends after every schedule an email with the hosts that were configured. If no ESXi server was configured, it sends an email saying everything is ok.

You just have to edit the 6 first variables with your system informations and it works.

Please be aware that I haven’t implemented any error handling in the script. It’s just an quick and dirty script for my own.

Feel free to use it and share it

Why is the network loadbalancing policy so important?

Last week I returned from my vacation and had allready a lot of tasks waiting for me.

One of them was to add some new ESXi-server to a persistent cluster.

No problem, I thought. This will be a quick task after my vacation.

After looking on the persistent esxi hosts, i’ve seen that they use LACP/etherchannel as network configuration, a lot of VLAN tags and so on.

With this information I went to our network provider and gave him the needed information.

After a hour I recieved an email with the confirmation that  the network was ready.

So I installed the ESXi server, added two vmnics and changed the load balancing policy to “routed based on IP hash” what mean’s that with this configuration you can use LACP. (see KB2006129)

vswitch

Now I began to test the network by removing one vmnic and trying to ping the VMs on the ESXi server.

Every time I removed one vmnic, I loosed the connection to the VMs on the ESXi server. So i tried all possible configurations on the ESXi server but I never had a successful fail over on the network.

cmd

After trying everything on my site I was quite sure that the network guys did not configure the switchs as I’ve told them.

So I went there and we looked at the configuration. They did forgot to activate LACP/etherchannel on the ports. They had no port-channel configured. This was also the reason why I loosed each time the connection to the VMs when I removed one vmnic.

After they changed the configuration I tested it again and I neither loosed one ping when the network had to make a switch over.  This is how it is proposed to run!

While I was troubleshooting my problem I’ve found some interesting posts from other guys and from VMWare which I would like to share with you. They helped me to find out my problem.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2006129

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004088

and here my favorite one (only in German available):

http://www.admin-magazin.de/Das-Heft/2010/05/Redundante-Netzanbindung-mit-VMware-ESX

Hope this can help someone 🙂

RV Tools – the quickest way to get all information from you vSphere environment

RV Tools is one of my favorite 3rd party tools for vSphere. If you are not familiar with PowerCLI this is a “MUST HAVE” for you. With this tool, you can get quite all the information you need from your VMWare environment. You can check all information from your VMs, ESX(i), vCenters, Clusters, vSwitchs and so on.

Here a short extract from their website with a print screen:

RVTools is a windows .NET 2.0 application which uses the VI SDK to display information about your virtual machines and ESX hosts. Interacting with VirtualCenter 2.5, ESX Server 3.5, ESX Server 3i, VirtualCenter 4.x, ESX Server 4.x, VirtualCenter 5.0, VirtualCenter Appliance, ESX Server 5.0, VirtualCenter 5.1, ESX Server 5.1, VirtualCenter 5.5, ESX Server 5.5. RVTools is able to list information about VMs, CPU, Memory, Disks, Partitions, Network, Floppy drives, CD drives, Snapshots, VMware tools, Resource pools, Clusters, ESX hosts, HBAs, Nics, Switches, Ports, Distributed Switches, Distributed Ports, Service consoles, VM Kernels, Datastores, Multipath info and health checks. With RVTools you can disconnect the cd-rom or floppy drives from the virtual machines and RVTools is able to update the VMware Tools installed inside each virtual machine to the latest version.

rvtools

Normally I use the tool to make Excel extracts from the VMs to know which VM tools are outdated. An other nice feature that I use is the vDatastore tab. There I have a nice overview of all datastores to check free space, quantity of VMs and so on.

However, my favorite tab is the vHealth tab. There you can find a lot information about misconfigurations ore threshold values that have passed over. Here some possible error messages from a customer’s environment(the VM/ESX/Datastore names were cutted out):vhealth_errors

Please feel free to visit the developer’s page, register and download the tool for free:

http://www.robware.net/

There are a lot of nice features and information to use with this tool. Go ahead, install it and try it!

If you like this tool as much as I do, you can also donate some money via paypal!

Snapshots with quiescing fails directly after starting the snapshot

A new customer who I’m working for, has Avamar from EMC as their backup solution for VMware and all other products.

By chechking the activities of the backups, I’ve seen that both Exchange Server VM backups fails every night.

After having a look at the Avamar logs, i found an error indicating some problems with quiescing:

avamlog3

avvcbimage Error <17775>: Snapshot ‘Avamar-1430951406e32d32fac65d442458b882c72e09fdd7bd3b0a79’ creation for VM <PATH_TO_VM> task creation encountered a quiesce problem (Log #2

So first of all I tried to make a manual snapshot with the quiesce flag from the vCenter:

snapshot

Directly after the snapshot started, it failed again with the following message:

snapshot2

An error occurred while quiescing the virtual machine. See the virtual machine’s event log for Details.

For me this was now clear that this had to be a vmware related problem. As the error message recommended, I checked the event log of the virtual machine witch is normally located in the VM Folder on the datastore. Scrolling around on the log, I’ve found e interesting error message:

avamlog

ToolsBackup: not enough empty nodes (needed 8, found 7)

For some reason the VM is saying that the SCSI Controller has no more empty nodes. By searching in the vmware knowledge base, I have found a KB article where this Problem was explained: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1037071

When you use quiescing for snapshooting a VM, you can’t add more than 8 disks to a SCSI controller. Normally you can add up to 16 disk to one controller.

It seems like when you snapshot the disks with quiesce option, vSphere adds an additional disk for each disk that is attached. This must be the reason.

So the only way to resolve this problem, was to add an additional SCSI Controller and attached 4 of the disks to the second controller. After this, the VM was snapshoted without any issues:

snapshot3