Commit ec91c05d authored by Guido Trotter's avatar Guido Trotter
Browse files

KVM: don't boot from cdrom with no cdrom

Reviewed-by: iustinp
parent 66d5dbef
......@@ -739,6 +739,9 @@ class KVMHypervisor(hv_base.BaseHypervisor):
if boot_order not in ('cdrom', 'disk'):
raise errors.HypervisorError("The boot order must be 'cdrom' or 'disk'")
if boot_order == 'cdrom' and not iso_path:
raise errors.HypervisorError("Cannot boot from cdrom without an ISO path")
def ValidateParameters(self, hvparams):
"""Check the given parameters for validity.
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