1 Reply Latest reply on Oct 2, 2019 7:31 AM by cjoshi

    How to ensure the pass through vGPU being added to a VM is a __shared__ (not dedicated) vGPU pass through device

    cjoshi Novice



      I am adding a nvidia grid vGPU to a VM using the following code:

      ---- cut ----


      var vGPUProfile = 'grid_m10-1b';

      var deviceConfigSpec = new VcVirtualDeviceConfigSpec();

      deviceConfigSpec.operation = VcVirtualDeviceConfigSpecOperation.add;

      deviceConfigSpec.device = new VcVirtualPCIPassthrough;

      deviceConfigSpec.device.deviceInfo = new VcDescription;

      deviceConfigSpec.device.deviceInfo.summary = '';

      deviceConfigSpec.device.deviceInfo.label = 'New PCI device';

      deviceConfigSpec.device.backing = new VcVirtualPCIPassthroughVmiopBackingInfo;

      deviceConfigSpec.device.backing.vgpu = vGPUProfile;


      var deviceConfigSpecs = new Array();

      deviceConfigSpecs[0] = deviceConfigSpec;


      var configSpec = new VcVirtualMachineConfigSpec();

      configSpec.changeVersion = vm.config.changeVersion;

      configSpec.memoryReservationLockedToMax = true;

      configSpec.deviceChange = deviceConfigSpecs;


      task = vm.reconfigVM_Task(configSpec);


      ---- cut ----


      In vRA the above workflow is triggered via EBS, the VM gets configured with the vGPU profiles. But fails to power-on with an error "exceeds max number of vGPU instances allowed".  I believe the error message is misleading and the VM is failing to get powered on because the vGPU is getting added in a dedicated mode instead of shared mode.


      Question is how do I ensure the vGPU being added is forced to be as a Shared-vGPU device? Or am I missing something?



      Regards Shekhar