Merge pull request #5769 from jongwu/check_host_arm

kata-ctl: add host check for aarch64
This commit is contained in:
Zhongtao Hu 2022-12-06 14:05:52 +08:00 committed by GitHub
commit c12bb5008d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,8 +8,18 @@ pub use arch_specific::*;
mod arch_specific {
use anyhow::Result;
use std::path::Path;
const KVM_DEV: &str = "/dev/kvm";
pub fn check() -> Result<()> {
unimplemented!("Check not implemented in aarch64")
println!("INFO: check: aarch64");
if Path::new(KVM_DEV).exists() {
println!("Kata Containers can run on this host\n");
} else {
eprintln!("WARNING: Kata Containers can't run on this host as lack of virtulization support\n");
}
Ok(())
}
}