mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
kata-ctl: add host check for aarch64
For now, we can check if host support running kata by check if "/dev/kvm" exist on aarch64. Fixes: #5768 Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
This commit is contained in:
parent
df3d9878d5
commit
a5e4cad4b6
@ -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(())
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user