IP addresses are important resources and must be carefully managed to avoid duplicated IP issues, which are sometimes very hard to troubleshoot. I still remember that it took a few of us couple of days to root cause a failing new feature, which worked sometimes and did not other times. Because it’s a new feature, we mostly thought it was somehow our bug in code. It turned out not, but caused by the vCenter we were testing actually used a duplicated IP address.
On November 15, VMware offically announced the long-waited vSphere 6.5, which is a big release after 6.0 release early last year. Along with this vSphere release were a few other products like VMware vSAN 6.5, VMware vRealize Log Insight 4 and VMware vRealize Operations 6.4. According to the blog announcement, the vSphere 6.5 offers these high level features and benefits:
After more than 4 months of hard work, we are proud to announce the second major release of the product. On the high level, there are 3 major features besides many smaller improvements over the first release based on the customers’ feedback.
1. VM Actions and Group Actions
VMware published a blog “Goodbye vSphere Client for Windows (C#) – Hello HTML5” with two announcements: 1. There won’t be the traditional C# based vSphere Client for the next version of vSphere (no one knows the version yet but it’s safe to call it the next version.). 2. The vSphere HTML5 Web Client Fling will be supported soon (no exact timetable is given). My guess is that it will make into next release of vSphere if not earlier.
Although I don’t think vSphere Web Client is a good choice as main GUI for vSphere administration, it has done one thing right and well – it has a unique URL for almost everything you can browse the vSphere Web Client. The benefit is that you can bookmark a URL and open to the page without many clicks.
I just got into a very interesting problem recently – the vim-cmd does not work as expected when used for renaming a datastore in vSphere.
What is the problem exactly?
The following command, for example, should change the name of a datastore from datastore1 (which is the default datastore name) to doublecloudDS.
# vim-cmd hostsvc/datastore/rename datastore1 doubecloudDS
After the command is executed, there is no error message reported. But the datastore name remains the same as shown in either the vSphere Client or using the following command:
If you have read my previous article on the vim-cmd, you may have realized how handy it is, especially when it comes to manage virtual machines. There is however a pretty challenging problem to use it – for most commands for a virtual machine, it requires vmid which is an integer that uniquely identifies the virtual machine in the context of an ESXi server. It’s like primary key in SQL database to locate a record (virtual machine instance) in a table (virtual machine type). For people who are familiar with vSphere APIs, the vmid is the same as the value of ManagedObjectReference value of a virtual machine in ESXi. Because most administrators who use commands are not necessarily familiar with vSphere API, it doesn’t help much.
vSphere Client and vSphere Web Client allow administrators to download system logs from different ESXi hosts with choices of predefined groups of information like System, Storage, Network, UserWorld, etc. Under each group, there could be multiple types. For example, under the UserWorld, there are HostAgent and ProcessInformation.
As I introduced in the article on vim-cmd commands, you can use a very simple command as follows to create a new virtual machine. Alternatively, you can ignore the path after the datastore and provide only datastore name (The [ and ] are still needed).
# vim-cmd vmsvc/createdummyvm testVM “[datastore1] testVM/testVM.vmx"
Other than the name and configuration file path in data store, there is no additional information provided such as the size of the disk, memory capacity, etc. Normally, you have to go through a wizard of several pages to create a new virtual machine.
While preparing for my home lab, I have created several virtual machine templates. Here are a few tips I found useful to smoothen the process and make your virtual machine templates easy to be deployed than otherwise.
Install VMware Tools
As you may have known, VMware Tools brings many features to the table, for example,
Significantly faster graphics performance and Windows Aero on operating systems that support Aero Copying and pasting text, graphics, and files between the virtual machine and the host or client desktop Improved mouse performance Synchronization of the clock in the virtual machine with the clock on the host or client desktop Scripting that helps automate guest operating system operations
Wait, it does not even mention APIs. For Guest APIs in vSphere 5.0 and later to work, you must have VMware Tools installed in your virtual machines.
Command lines are very important for system administrors when it comes to automation. Although GUIs are more likely (not always as I’ve seen too many bad ones) to be more intuitive and easier to get started with, sooner or later administrators will use command lines more for better productivity. Check out DoubleCloud ICE if you want the best of both GUI and command lines.
While building my home lab, I found a bit trouble setting up the jumbo frame of MTU 9000 which is supposedly faster than normal frame of MTU 1500. To set it up, I changed the MTU on both ESXi and the Synology DS1513+. The steps involved are pretty simple and straight-forward.
Libvirt is an open source project for managing almost all hypervisors and containers. It’s implemented in C and can be exposed through different language bindings.
There are both server (a.k.a daemon or agent) and client. If you are familiar with VMware vSphere (I assume you are if you read my blog), the server is very much like the hostd running on the ESXi side. The client is like the VI Java API that can be used for remote management.
SNMP trap provides a very useful way to monitor vSphere. You can use either GUI or vSphere API to configure up to 4 trap receivers. With that I can use alarm to monitor events or state changes.
If you use vSphere API to add SNMP receivers, you will need the OptionManager managed object. The related options you want to set are: snmp.receiver.1.name, snmp.receiver.1.port, snmp.receiver.1.community, snmp.receiver.1.enabled. There are 3 more sets with similar names but different numbers (2, 3, 4).
After playing with the vCenter appliance simulator feature documented by William, I got into a show stopper that vCenter service (VPXD) could not be started. I don’t think it’s related to the simulator feature at all. My guess is that it’s caused by a sudden power off of the virtual machine but didn’t try to reproduce the problem that way – I care more to fix it than anything else.
While reading articles about Microsoft Hyper-V, I found that Hyper-V seemed to have different states for virtual machines from VMware vSphere. The virtual machine in Hyper-V is represented by the Msvm_ComputerSystem class. If you are familiar with VMware vSphere, you know the equivalent in vSphere is VirtualMachine. At first sight, the Hyper-V APIs may not look straight-forward. The Hyper-V APIs is actually based on Windows Management Instrumentation (WMI), which is essentially CIM from DMTF.
I just took three day Cisco Nexus 1000V training before Christmas. It’s a pretty good experience to play with the commands in the VSM appliance although I am still not quite familiar with these commands yet. Nevertheless, I managed to run through all the 9 labs thanks to the online lab that I could access even after class. To help myself to remember what I did, I listed a few commands that often needed in managing Nexus 1000V.
In my previous article, I introduced the Remote Desktop Connection Manager. It’s highly recommended to use it over the virtual machine console which all goes through the ESXi management IP therefore is not good for performance especially when there are many concurrent connections to virtual machines running on a same physical host.
Even if you are convinced on connecting to virtual machines directly, you will find it’s not convenient to add many virtual machines to the Remote Desktop Connection Manager. That is why I decided to write a small tool to automate it.
One of the key new features in vSphere 5.1 is the Single Sign On. Because it’s new and also complicated, I’ve heard it’s not easy to get it right the first time. Experts recommend that you should play with it in a test or staging environment before upgrading your production environment.