Skip to content

Commit

Permalink
cmd/run: parametize kernel boot dev
Browse files Browse the repository at this point in the history
Allow the kernel root boot device to be parametized.

Signed-off-by: Klaus Jensen <[email protected]>
  • Loading branch information
birkelund committed May 14, 2024
1 parent ab9c8a2 commit 5b6b708
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/run
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ _run() {
QEMU_PARAMS+=("-pidfile" "${VMROOT}/run/${VMNAME}/pidfile")

if [[ -v kernel_dir ]]; then
local cmdline="root=/dev/vdb1 console=${GUEST_KERNEL_CONSOLE}"
local cmdline="root=${GUEST_KERNEL_BOOTDEV} console=${GUEST_KERNEL_CONSOLE}"

# custom kernel
QEMU_PARAMS+=("-kernel" "${kernel_dir}/${GUEST_KERNEL_IMAGE}")
Expand Down
1 change: 1 addition & 0 deletions examples/vm/common.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
QEMU_SYSTEM_BINARY="/usr/local/bin/qemu-system-x86_64"
QEMU_IMG="/usr/local/bin/qemu-img"
GUEST_KERNEL_APPEND_EXTRA="audit=0"
GUEST_KERNEL_BOOTDEV="/dev/vda1"

# nvme-specific local parameters
default_nvme_ns_extra="logical_block_size=4096,physical_block_size=4096"

0 comments on commit 5b6b708

Please sign in to comment.