|
Jul 09
|
In the coming release of the Reflex VMC , we will introduce our Virtualization Query Language (VQL) into the product. VQL is a domain-specific language that correlates different types of information together into a single query specification using a combined natural and structured grammar. The language has been brewing behind closed doors for well over a year and we’ve put in a lot of capabilities within that time frame. We built VQL for many reasons including:
- Scale, more scale, and mega scale
- Easy search
- Visually constrain graphical topology relationships in large environments
- Act as an encoding for declarative business logic
- Make it much easier to extract contextual information
- Integrate seamlessly with the Powershell object pipeline as well as other scripting languages like Python
- Act as a rule language for our VMsafe powered vTrust features
- Make it very easy to extract data out of our system programmatically
Some people have asked why we made VQL a query language and did not include the ability to take actions. The reason we made this choice is because there are some fantastic languages our there already that are very good at making procedural function calls. VMware has done a great job of providing the vSphere PowerCLI (Go Carter!) which is heavily used by Windows Administrators and Python is heavily used by many developers and Unix system administrators. Instead of writing scripts to poll for information and take action when something occurs, we wanted to make it very easy to specify “If something complicated happens, go take an intelligent action”.
To help things make more sense, let’s take the language out for a spin.
In the following example, I type the string ‘software.name contains “SQL Server”’ and I get all of the SQL Server software assets within the virtual environment:
Now that we’ve got that simple example, let’s get our query specification a little tighter. Let’s see what virtual machines were running a specific version of SQL Server:
And one of the most powerful capabilities of VQL is the correlation of different data types into a single query specification. The following Query shows all Linux virtual machines that were running on hosts with a Host Memory alarm and also had a VM Memory alarm of their own 20 minutes ago.
This one is more complex so here is what was typed:
vm.os_name contains “Linux” in alarm.name = “Host Memory Usage” project host at 20 minutes ago | project vm at 20 minutes ago in alarm.name = “Virtual Machine Memory Usage” project vm at 20 minutes ago
Note: When working with time it is important to scope each portion of the query to the correct time frame.
And here is a list of virtual machines that do not have .Net Framework 3.5 SP1 installed that are connected to a network called “VM Network”
As we add more and more data types the utility of the language will continue to grow. Here are all of the current data types that are supported in the 2.0 release. You can click the blue question mark in the client to see more information.
We will add more blog posts describing VQL objects, properties, relationships and grammar in more detail.




