GoodBrew's Posts

We ended up automating an API call to the vCenter Server's RESTful API server to get the datastore policy ID. We used this endpoint:     GET <vcenter-server>/vcenter/datastore/<datastore-moid>... See more...
We ended up automating an API call to the vCenter Server's RESTful API server to get the datastore policy ID. We used this endpoint:     GET <vcenter-server>/vcenter/datastore/<datastore-moid>/default-policy Once we had the policy ID, we constructed a VirtualMachineConfigSpec object like this to pass to reconfigure_vm task: # make the nvdimm_backing object # We had to pass an empty string as a fileName value for some reason... nvdimm_backing = VirtualNVDIMMBackingInfo(fileName = "") # make the nvdimm device object nvdimm_dev = VirtualNVDIMM(capacityInMB = <some_size>, backing=nvdimm_backing, controllerKey=<your-nvdimm-controller>) # some other values we needed to fill out op = VirtualDeviceConfigSpecOperation("add") fileOp = VirtualDeviceConfigSpecFileOperation("create") nvdimm_profile = new VirtualMachineDefinedProfileSpec(profileId = <the policy ID you got from the vcenter>)  # this is where we insert the policy ID # combine it all together for the VirtualDeviceConfigSpec: vnvdimm_spec = VirtualDeviceConfigSpec(profile=[ nvdimm_profile ], device=nvdimm_dev , fileOperation=fileOp, operation=fileOp) # then roll that into the VirtualMachineConfigSpec and reconfigure the VM config_spec = VirtualMachineConfigSpec([deviceChange = vnvdimm_spec] )
Hi everyone! I am trying to provision a virtual NVDIMM device using the Perl SDK. Specifically how the default storage policy for the PMEM datastore backing the device is determined / used. I a... See more...
Hi everyone! I am trying to provision a virtual NVDIMM device using the Perl SDK. Specifically how the default storage policy for the PMEM datastore backing the device is determined / used. I actually have been able to provision the virtual NVDIMM using a storage policy ID I  have determined with a REST call against the vSphere RESTful API service. But that requires a vCenter server and I was hoping to run this script against standalone hosts as well. I was hoping some folks here might have some examples of provisioning a virtual NVDIMM device using the Perl SDK Thanks!