Commit 79ffca08 authored by Ahmad Siavashi's avatar Ahmad Siavashi

GpuHost revised

parent 68322299
...@@ -76,6 +76,15 @@ public class GpuHost extends Host { ...@@ -76,6 +76,15 @@ public class GpuHost extends Host {
} }
// Checking GPU resources of the host // Checking GPU resources of the host
Vgpu vgpu = ((GpuVm) vm).getVgpu(); Vgpu vgpu = ((GpuVm) vm).getVgpu();
// if the VM has no vGPU -> return true.
if (vgpu == null) {
return true;
}
// if the VM has a vGPU and the host has no local video card -> return false.
else if(getVideoCardAllocationPolicy() == null) {
return false;
}
// if the VM has a vGPU and the host has video card(s) -> check compatibility.
return getVideoCardAllocationPolicy().isSuitable(vgpu); return getVideoCardAllocationPolicy().isSuitable(vgpu);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment