mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-11-04 19:11:11 +00:00
tdx: Permit starting Cloud Hypervisor without --kernel
This is not required if TDX is present. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
62abc117ab
commit
57c8c250fd
@ -430,7 +430,7 @@ fn start_vmm(cmd_arguments: ArgMatches, api_socket_path: &str) -> Result<(), Err
|
||||
|
||||
// Can't test for "vm-config" group as some have default values. The kernel
|
||||
// is the only required option for booting the VM.
|
||||
if cmd_arguments.is_present("kernel") {
|
||||
if cmd_arguments.is_present("kernel") || cmd_arguments.is_present("tdx") {
|
||||
let vm_params = config::VmParams::from_arg_matches(&cmd_arguments);
|
||||
let vm_config = config::VmConfig::parse(vm_params).map_err(Error::ParsingConfig)?;
|
||||
|
||||
|
@ -1531,6 +1531,7 @@ pub struct VmConfig {
|
||||
|
||||
impl VmConfig {
|
||||
pub fn validate(&self) -> ValidationResult<()> {
|
||||
#[cfg(not(feature = "tdx"))]
|
||||
self.kernel.as_ref().ok_or(ValidationError::KernelMissing)?;
|
||||
|
||||
if self.console.mode == ConsoleOutputMode::Tty && self.serial.mode == ConsoleOutputMode::Tty
|
||||
|
Loading…
Reference in New Issue
Block a user