Pull-Request has been closed by till
Hi, Thank you for the PR. I think the more easy solution is better: Always use:
qemu-kvm -vnc :0,to=10
It will bee very simple diff:
diff --git a/inventory/standard-inventory-qcow2 b/inventory/standard-inventory-qcow2 index 43af9a5..fc53728 100755 --- a/inventory/standard-inventory-qcow2 +++ b/inventory/standard-inventory-qcow2 @@ -133,7 +133,7 @@ def start_qemu(image, cloudinit, log, portrange=(2222, 5555)): "-net", "nic,model=virtio", "-net", "user,hostfwd=tcp:127.0.0.3:{0}-:22".format(port), "-device", "virtio-rng-pci", "-rtc", "base=utc", "-device", "isa-serial,chardev=pts2", "-chardev", "file,id=pts2,path=" + log, - "-display", "none", "-vnc", ":1"], stdout=open(log, 'a'), stderr=subprocess.STDOUT), port + "-display", "none", "-vnc", ":1,to=20"], stdout=open(log, 'a'), stderr=subprocess.STDOUT), port def inv_host(image):
https://qemu.weilnetz.de/doc/qemu-doc.html
to=L With this option, QEMU will try next available VNC displays, until the number L, if the origianlly defined "-vnc display" is not available, e.g. port 5900+display is already used by another application. By default, to=0.