feat: add --kernel flag for QEMU system emulation mode
Add --kernel <PATH> option to boot extracted rootfs in a QEMU virtual machine instead of namespace/chroot mode. The rootfs is converted to an ext4 disk image using mke2fs and booted with the provided kernel.
This commit is contained in:
@@ -33,6 +33,14 @@ pub struct Args {
|
||||
#[arg(short = 'v', long)]
|
||||
pub verbose: bool,
|
||||
|
||||
/// Boot with QEMU system emulation using specified kernel (extracts rootfs as disk image)
|
||||
#[arg(long, value_name = "KERNEL_PATH")]
|
||||
pub kernel: Option<PathBuf>,
|
||||
|
||||
/// Memory size for QEMU VM (only used with --kernel, e.g., 512M, 2G)
|
||||
#[arg(short = 'm', long, default_value = "2G", value_name = "SIZE")]
|
||||
pub memory: String,
|
||||
|
||||
/// Command to run inside the chroot (default: interactive shell)
|
||||
#[arg(
|
||||
trailing_var_arg = true,
|
||||
|
||||
Reference in New Issue
Block a user