Bug 1164966
| Summary: | Guest could still start up while set vnc port=0 or 65536 with the qemu-kvm packet | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | zhenfeng wang <zhwang> |
| Component: | libvirt | Assignee: | Pavel Hrdina <phrdina> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.1 | CC: | dyuan, jdenemar, mzhan, rbalakri |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-1.2.16-1.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-11-19 05:56:03 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
There are two bugs here. One of them is in libvirt, which shouldn't even try to start QEMU with incorrect port numbers and another one is in qemu-kvm. Upstream commit:
commit afaffeb873c69912ba6443e5638abd057f00f1cc
Author: Pavel Hrdina <phrdina>
Date: Tue May 12 18:18:14 2015 +0200
qemu: vnc: error out for invalid port number
In the XML we have the vnc port number, but QEMU takes on command line
a vnc screen number, it's port-5900. We should fail with error message
that only ports in range [5900,65535] are valid.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1164966
Signed-off-by: Pavel Hrdina <phrdina>
v1.2.15-71-gafaffeb
I can produce this with build libvirt-1.2.8-6.el7.x86_64 qemu-kvm-1.5.3-79.el7.x86_64 verify this bug with build libvirt-1.2.17-2.el7.x86_64 qemu-kvm-1.5.3-98.el7.x86_64 1. edit guest with XML vnc port='65536' ... <graphics type='vnc' port='65536' autoport='no'/> ... # virsh edit vm1 error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng Extra element devices in interleave Element domain failed to validate content Failed. Try again? [y,n,i,f,?]: Domain vm1 XML configuration edited. 2. choose i to ignore this validate error and start guest with vpnc port='65536' # virsh start vm1 error: Failed to start domain vm1 error: unsupported configuration: vnc port must be in range [5900,65535] 3. edit guest with XML vnc port='0' # virsh edit vm1 ... <graphics type='vnc' port='0' autoport='no'/> ... # virsh start vm1 error: Failed to start domain vm1 error: unsupported configuration: vnc port must be in range [5900,65535] move to verified Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2202.html |
Description of problem: Guest could still start up while set vnc port=0 or 65536 with the qemu-kvm packet. BTW, it could get the expect result with the qemu-kvm-rhev packet Version-Release number of selected component (if applicable): libvirt-1.2.8-6.el7.x86_64 qemu-kvm-1.5.3-79.el7.x86_64 kernel-3.10.0-203.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.Set vnc port=0 in guest's xml #virsh dumpxml rhel7 -- <graphics type='vnc' port='0' autoport='no'/> 2.start the guest, the guest could start successfully with vnc port=0 # virsh start rhel7 Domain rhel7 started #virsh dumpxml rhel7 -- <graphics type='vnc' autoport='no' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> 3.Set the vnc port=65536, then start the guest, the guest could start successfully with vnc port=65536 #virsh dumpxml rhel7 -- <graphics type='vnc' port='65536' autoport='no'/> # virsh start rhel7 Domain rhel7 started <graphics type='vnc' port='65536' autoport='no' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> 4.Install the qemu-kvm-rhev packet in the host 5.set the vnc port=65536 in guest'xml then start the guest the guest will fail to start and get the expect error # virsh start virt-tests-vm1 error: Failed to start domain virt-tests-vm1 error: internal error: process exited while connecting to monitor: 2014-11-13T12:35:11.561842Z qemu-kvm: Failed to start VNC server on `127.0.0.1:59636': port 59636 out of range 6.set the vnc port=0 in guest'xml , then start the guest the guest will fail to start and get the expect error # virsh start virt-tests-vm1 error: Failed to start domain virt-tests-vm1 error: internal error: process exited while connecting to monitor: 2014-11-13T12:35:34.145725Z qemu-kvm: Failed to start VNC server on `127.0.0.1:-5900': can't convert to a number: -5900 7.The spice could get the expect result with both qemu-kvm and qemu-kvm-rhev packet Actual results: ]Guest could still start up while set vnc port=0 or 65536 with the qemu-kvm packet Expected results: should fail to start the guest and get the expect error