We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2d3599d + 377c032 commit 29f5adaCopy full SHA for 29f5ada
2 files changed
Cargo.toml
@@ -1,6 +1,6 @@
1
[package]
2
name = "krunkit"
3
-version = "0.1.1"
+version = "0.1.2"
4
authors = ["Tyler Fanelli <tfanelli@redhat.com>"]
5
edition = "2021"
6
description = "CLI tool to start VMs with libkrun"
src/context.rs
@@ -46,8 +46,12 @@ impl TryFrom<Args> for KrunContext {
46
let id = u32::try_from(id).unwrap();
47
48
// Set the krun VM's number of vCPUs and amount of memory allocated.
49
+ //
50
+ // libkrun has a max of 8 vCPUs allowed.
51
if args.cpus == 0 {
52
return Err(anyhow!("zero vcpus inputted (invalid)"));
53
+ } else if args.cpus > 8 {
54
+ return Err(anyhow!("too many vCPUs configured (max 8)"));
55
}
56
57
if args.memory == 0 {
0 commit comments