Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable the creation of VMIs that are incompatible with live migration #3944

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -925,7 +925,23 @@ func ValidateVirtualMachineInstanceSpec(field *k8sfield.Path, spec *v1.VirtualMa
Field: field.Child("evictionStrategy").String(),
})
}

} else if *spec.EvictionStrategy == v1.EvictionStrategyLiveMigrate {
for _, iface := range spec.Domain.Devices.Interfaces {
if iface.SRIOV != nil {
causes = append(causes, metav1.StatusCause{
Type: metav1.CauseTypeFieldValueInvalid,
Message: "SRIOV interfaces are incompatible with the LiveMigrate eviction strategy",
Field: field.Child("evictionStrategy").String(),
})
}
}
if spec.Domain.Devices.GPUs != nil && len(spec.Domain.Devices.GPUs) > 0 {
causes = append(causes, metav1.StatusCause{
Type: metav1.CauseTypeFieldValueInvalid,
Message: "GPU passthrough is incompatible with the LiveMigrate eviction strategy",
Field: field.Child("evictionStrategy").String(),
})
}
}

if spec.Domain.Devices.GPUs != nil && !config.GPUPassthroughEnabled() {
Expand Down