Revert "spice port selected from range so more than one vm can be run"
Similar patch already submitted which was done better.:
This commit is contained in:
parent
c63a17e93e
commit
592058372a
17
quickemu
17
quickemu
@ -104,19 +104,6 @@ function get_port() {
|
||||
done
|
||||
}
|
||||
|
||||
function get_spice_port() {
|
||||
local PORT_START=5930
|
||||
local PORT_RANGE=9
|
||||
while true; do
|
||||
local CANDIDATE=$[${PORT_START} + (${RANDOM} % ${PORT_RANGE})]
|
||||
(echo "" >/dev/tcp/127.0.0.1/${CANDIDATE}) >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "${CANDIDATE}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
enable_usb_passthrough() {
|
||||
local DEVICE=""
|
||||
local USB_BUS=""
|
||||
@ -460,7 +447,7 @@ function vm_boot() {
|
||||
-rtc base=localtime,clock=host \
|
||||
-object rng-random,id=rng0,filename=/dev/urandom \
|
||||
-device virtio-rng-pci,rng=rng0 \
|
||||
-spice port=${SPICE_PORT},disable-ticketing \
|
||||
-spice port=5930,disable-ticketing \
|
||||
-device virtio-serial-pci \
|
||||
-device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \
|
||||
-chardev spicevmc,id=spicechannel0,name=vdagent \
|
||||
@ -485,7 +472,7 @@ function vm_boot() {
|
||||
-rtc base=localtime,clock=host \
|
||||
-object rng-random,id=rng0,filename=/dev/urandom \
|
||||
-device virtio-rng-pci,rng=rng0 \
|
||||
-spice port=${SPICE_PORT},disable-ticketing \
|
||||
-spice port=5930,disable-ticketing \
|
||||
-device virtio-serial-pci \
|
||||
-device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \
|
||||
-chardev spicevmc,id=spicechannel0,name=vdagent \
|
||||
|
Loading…
Reference in New Issue
Block a user