mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 13:30:02 +08:00
feat: Console mode
* feat: Console mode * fix: Increase timeout
This commit is contained in:
parent
f32d8cbefc
commit
6218333fec
@ -17,6 +17,11 @@ cd /run
|
|||||||
|
|
||||||
trap - ERR
|
trap - ERR
|
||||||
|
|
||||||
|
if [[ "${CONSOLE}" == [Yy]* ]]; then
|
||||||
|
exec qemu-system-x86_64 -pidfile "${QEMU_PID}" ${ARGS:+ $ARGS}
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
set -m
|
set -m
|
||||||
(
|
(
|
||||||
[[ "${DEBUG}" == [Yy1]* ]] && info "$VERS" && set -x
|
[[ "${DEBUG}" == [Yy1]* ]] && info "$VERS" && set -x
|
||||||
|
@ -12,6 +12,7 @@ trap 'error "Status $? while: ${BASH_COMMAND} (line $LINENO/$BASH_LINENO)"' ERR
|
|||||||
|
|
||||||
: ${GPU:='N'} # Enable GPU passthrough
|
: ${GPU:='N'} # Enable GPU passthrough
|
||||||
: ${DEBUG:='N'} # Enable debugging mode
|
: ${DEBUG:='N'} # Enable debugging mode
|
||||||
|
: ${CONSOLE:='N'} # Start in console mode
|
||||||
: ${ALLOCATE:='Y'} # Preallocate diskspace
|
: ${ALLOCATE:='Y'} # Preallocate diskspace
|
||||||
: ${ARGUMENTS:=''} # Extra QEMU parameters
|
: ${ARGUMENTS:=''} # Extra QEMU parameters
|
||||||
: ${CPU_CORES:='1'} # Amount of CPU cores
|
: ${CPU_CORES:='1'} # Amount of CPU cores
|
||||||
|
@ -48,7 +48,7 @@ sleep 0.2
|
|||||||
while ! nc -z -w1 127.0.0.1 2210 > /dev/null 2>&1; do
|
while ! nc -z -w1 127.0.0.1 2210 > /dev/null 2>&1; do
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
cnt=$((cnt + 1))
|
cnt=$((cnt + 1))
|
||||||
(( cnt > 20 )) && error "Failed to connect to qemu-host.." && exit 58
|
(( cnt > 50 )) && error "Failed to connect to qemu-host.." && exit 58
|
||||||
done
|
done
|
||||||
|
|
||||||
cnt=0
|
cnt=0
|
||||||
@ -56,7 +56,7 @@ cnt=0
|
|||||||
while ! nc -z -w1 127.0.0.1 12345 > /dev/null 2>&1; do
|
while ! nc -z -w1 127.0.0.1 12345 > /dev/null 2>&1; do
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
cnt=$((cnt + 1))
|
cnt=$((cnt + 1))
|
||||||
(( cnt > 20 )) && error "Failed to connect to qemu-host.." && exit 59
|
(( cnt > 50 )) && error "Failed to connect to qemu-host.." && exit 59
|
||||||
done
|
done
|
||||||
|
|
||||||
# Configure serial ports
|
# Configure serial ports
|
||||||
|
Loading…
x
Reference in New Issue
Block a user