Fix mounting CDs in qemurc.
This commit is contained in:
parent
3918775c1d
commit
8888838457
@ -293,7 +293,6 @@ function start_body {
|
|||||||
local zfs_path="${ZFS_ROOT}/${name}"
|
local zfs_path="${ZFS_ROOT}/${name}"
|
||||||
local mount_path="${MOUNT_ROOT}/${name}"
|
local mount_path="${MOUNT_ROOT}/${name}"
|
||||||
local run_path="/run/qemurc/${name}"
|
local run_path="/run/qemurc/${name}"
|
||||||
local mount_cd="$CD"
|
|
||||||
local swtpm_sock="${run_path}/swtpm.sock"
|
local swtpm_sock="${run_path}/swtpm.sock"
|
||||||
local swtpm_path="${MOUNT_ROOT}/${name}/swtpm"
|
local swtpm_path="${MOUNT_ROOT}/${name}/swtpm"
|
||||||
|
|
||||||
@ -303,6 +302,8 @@ function start_body {
|
|||||||
source "${mount_path}/settings"
|
source "${mount_path}/settings"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local mount_cd="$CD"
|
||||||
|
|
||||||
local additional_args=()
|
local additional_args=()
|
||||||
|
|
||||||
if [ -n "$BIND9P" ]; then
|
if [ -n "$BIND9P" ]; then
|
||||||
@ -310,7 +311,9 @@ function start_body {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$mount_cd" ]; then
|
if [ -n "$mount_cd" ]; then
|
||||||
additional_args+=(-cdrom "$mount_cd")
|
additional_args+=(-drive "file=${mount_cd},media=cdrom,id=drive-cd1,readonly=on,if=none"
|
||||||
|
-device "ahci,id=achi0"
|
||||||
|
-device "ide-cd,bus=achi0.0,drive=drive-cd1,id=cd1,bootindex=1")
|
||||||
fi
|
fi
|
||||||
if [ "$VNC_ENABLE" = "YES" ]; then
|
if [ "$VNC_ENABLE" = "YES" ]; then
|
||||||
additional_args+=(-vnc "${VNC_LISTEN},power-control=on")
|
additional_args+=(-vnc "${VNC_LISTEN},power-control=on")
|
||||||
@ -357,7 +360,6 @@ function start_body {
|
|||||||
-drive "if=none,file=/dev/zvol/${zfs_path}/disk0,format=raw,id=hd0"
|
-drive "if=none,file=/dev/zvol/${zfs_path}/disk0,format=raw,id=hd0"
|
||||||
-device 'nvme,serial=deadbeef,drive=hd0'
|
-device 'nvme,serial=deadbeef,drive=hd0'
|
||||||
-nic 'user,hostfwd=tcp::60022-:22'
|
-nic 'user,hostfwd=tcp::60022-:22'
|
||||||
-boot order=d
|
|
||||||
"${additional_args[@]}"
|
"${additional_args[@]}"
|
||||||
)
|
)
|
||||||
set +e
|
set +e
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user