Attaching Virtual Persistent Memory To Guests

The virtual persistent memory (vPMEM) feature in Private Cloud Director enables administrators to configure vPMEMs for virtual machines using physical persistent memory (PMEM) that can provide virtual devices.

Note that the vPMEM feature is not enabled by default in your Private Cloud Director. Contact your Private Cloud Director support liaison if you would like this feature enabled.

Pre-requisites

  • Persistent Memory Hardware

  • Following modules loaded at the linux kernel level for hypervisor hosts:

    dax_pmem, nd_pmem, device_dax, nd_btt

Configure PMEM Namespaces

Your first step is to configure your PMEM namespaces as vPMEM backends using the ndctl utility.

$ sudo ndctl create-namespace -s 30G -m devdax -M mem -n ns3
{
  "dev":"namespace1.0",
  "mode":"devdax",
  "map":"mem",
  "size":"30.00 GiB (32.21 GB)",
  "uuid":"937e9269-512b-4f65-9ac6-b74b61075c11",
  "raw_uuid":"17760832-a062-4aef-9d3b-95ea32038066",
  "daxregion":{
    "id":1,
    "size":"30.00 GiB (32.21 GB)",
    "align":2097152,
    "devices":[
    {
      "chardev":"dax1.0",
      "size":"30.00 GiB (32.21 GB)"
    }
    ]
  },
  "name":"ns3",
  "numa_node":1
}

Now you can list the available PMEM namespaces on the host:

Configure Memory Resource Classes

Now that you have the namespaces created, the next step is to specify which PMEM namespaces should be available to virtual machines. You can do this by defining one or more PMEM resource classes in the compute service advance configuration as specified here.

Make sure to restart the compute service on each host after doing the above configuration.

Configure a flavor

Now that you have the required PMEM namespaces and classes configured, you can specify a comma-separated list of the $LABELs that correspond to the resource classes you defined in the step above, to the flavor’s hw:pmem property. Multiple instances of the same label are permitted.

Based on the above examples, a pcdctl server create request with my_flavor_large will spawn a new virtual machine with two vPMEMs. One, corresponding to the LARGE label, will be ns3; the other, corresponding to the 6G label, will be arbitrarily chosen from ns0, ns1, or ns2.

Last updated

Was this helpful?