Wait before setting affinity, retry if fail.
This commit is contained in:
parent
0b7e24c081
commit
196508071d
1 changed files with 7 additions and 4 deletions
11
qemu-vm
11
qemu-vm
|
@ -104,10 +104,13 @@ while [[ "$qemu_pid" = '' ]]; do
|
||||||
qemu_pid="$(pidof qemu-system-$(uname -m) || true)"
|
qemu_pid="$(pidof qemu-system-$(uname -m) || true)"
|
||||||
sleep .1
|
sleep .1
|
||||||
done
|
done
|
||||||
$SUDO qemu-affinity \
|
while :; do
|
||||||
-k $(qemu-vm-cpus decompress_seq "$(qemu-vm-cpus compute_vm $NUM_PROCESSORS)") \
|
sleep .1
|
||||||
-i *:$(qemu-vm-cpus compute_vm $NUM_PROCESSORS) \
|
$SUDO qemu-affinity \
|
||||||
-- $qemu_pid
|
-k $(qemu-vm-cpus decompress_seq "$(qemu-vm-cpus compute_vm $NUM_PROCESSORS)") \
|
||||||
|
-i *:$(qemu-vm-cpus compute_vm $NUM_PROCESSORS) \
|
||||||
|
-- $qemu_pid && break
|
||||||
|
done
|
||||||
|
|
||||||
echo 'Startup complete'
|
echo 'Startup complete'
|
||||||
tail --pid="$qemu_pid" -f /dev/null
|
tail --pid="$qemu_pid" -f /dev/null
|
||||||
|
|
Loading…
Add table
Reference in a new issue