Data agility with vRealize Automation

Publié le 17 Mai 2021

Hi all,

Here is a quick blog article showing off a new capability of vRA regarding disk management.

This capability has pretty much been under the radar for most people while it offers great value. This blog aim to correct this. đŸ˜Ž

What is the value here?

A number of users are interested to manipulate the data of their application in an autonomous way from the compute that run the application. One may have a VM with disks (hosting datasets) attached to it and may not want to delete the VM with all his disks for example.

The lifecycle of a virtual machine can be pretty different from the lifecycle of datasets.

For example, a developer could create a virtual machine with a database full of data, then decide that he does not need the VM anymore but want to keep his dataset for later usage.

Another example: this same developer has attached his existing dataset to a new VM and want to modify the data. He also want to be able to restore his original dataset. So, basically, he is going to use snapshots to have this capability. Snapshots can be used for decade at the VM level but what if this developer has several disks on this VM and only want to snapshot 1 disk? Well, thanks to this new capability, he can now do single disk snapshot!

So basically, we are saying that this capability provide much more agility at the disk level compared to what was previously possible. 

Great stuff, right?

Now, let's go deeper and see how this whole thing work.

It all started with a new vSphere feature named First Class Disk (FCD). It was introduced in 2018 and it is well described in this blog post from the famous Cormac Hogan. Then vRealize Automation "surfaced it" several months ago and the extend of the possible scenarios are well explained in this documentation.

One thing to note here: this feature is available only through vRA APIs at the moment. Not great from a user experience perspective but not a problem from a CI/CD perspective.

As stated in the documentation, the possible operations are:

  • Create, list, and delete a first class disk.
  • Resize a first class disk.
  • Attach and detach a first class disk.
  • Create and manage first class disk snapshots.
  • Convert an existing standard disk to first class disk

OK, great, what does it looks like and how do I test it?

Here's a quick tour:

  • In vRealize Automation (on prem or SaaS), deploy 2 VMs, then deploy 1 disk.

 

 

Data agility with vRealize Automation

Deploying VMs should be pretty straightforward but what about deploying a single disk?

It's actually even easier than a VM. Here is an infra as code example that you can copy paste in your vRA Cloud Template designer and customize for your need:

 


formatVersion: 1
inputs: {}
resources:
  Cloud_vSphere_Disk_1:
    type: Cloud.vSphere.Disk
    properties:
      capacityGb: 1
      constraints:
        - tag: 'location:ladefense'


    

The only thing you may want to change is the constraint tag, we'll get to that later on.

So, in my setup, I have my 2 VMs and my First Class Disk.

  • Now, to attach it to VM 1, then detach it and attach it to VM 2, you just need to enter few curl commands which are listed here.

While using API can be tedious for some, the good news is that all the operations appear in portal with the status

Data agility with vRealize Automation
Data agility with vRealize Automation

One last thing to make it all work in your environment: you need to setup a storage profile with FCD as disk type and the capability tags that you will use to consume this storage profile

Data agility with vRealize Automation