assert groups.size() == 1 : "Should only have 1 group but found " + groups.size();
GPUGroup gpuGroup = groups.iterator().next();
Set<VGPUType> vgpuTypes = gpuGroup.getEnabledVGPUTypes(conn);
Iterator<VGPUType> iter = vgpuTypes.iterator();
VGPUType vgpuType = null;
while (iter.hasNext()) {
VGPUType entry = iter.next();
if (entry.getModelName(conn).equals(gpuDevice.getVgpuType())) {
vgpuType = entry;
}
}
String device = "0"; // Only allow device = "0" for now, as XenServer supports just a single vGPU per VM.
Map<String, String> other_config = new HashMap<String, String>();