* [PATCH] virt: Add the parameter --vnclisten to the virt-install command @ 2011-12-30 5:26 tangchen 2011-12-30 10:36 ` [Autotest] " Lucas Meneghel Rodrigues 0 siblings, 1 reply; 4+ messages in thread From: tangchen @ 2011-12-30 5:26 UTC (permalink / raw) To: Lucas Meneghel Rodrigues; +Cc: autotest, kvm Hi, My colleague happened to find that when installing a Guest, we cannot access to it by VNC because of the missing parameter "--vnclisten=0.0.0.0" in virt-install. Here is the patch, please comment! :) Signed-off-by: Gu Yanhua <guyanhua-fnst@cn.fujitsu.com> --- client/virt/libvirt_vm.py | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/client/virt/libvirt_vm.py b/client/virt/libvirt_vm.py index 65db338..4684aeb 100644 --- a/client/virt/libvirt_vm.py +++ b/client/virt/libvirt_vm.py @@ -287,6 +287,7 @@ class VM(virt_vm.BaseVM): self.serial_console = None self.redirs = {} self.vnc_port = 5900 + self.vnclisten = "0.0.0.0" self.pci_assignable = None self.netdev_id = [] self.device_id = [] @@ -298,6 +299,7 @@ class VM(virt_vm.BaseVM): self.params = params self.root_dir = root_dir self.address_cache = address_cache + self.vnclisten = "0.0.0.0" # For now, libvirt does not have a monitor property. self.monitor = None self.driver_type = params.get("driver_type", self.LIBVIRT_DEFAULT) @@ -489,6 +491,9 @@ class VM(virt_vm.BaseVM): def add_vnc(help, vnc_port): return " --vnc --vncport=%d" % (vnc_port) + + def add_vnclisten(help, vnclisten): + return " --vnclisten=%s " % (vnclisten) def add_sdl(help): if has_option(help, "sdl"): @@ -629,6 +634,9 @@ class VM(virt_vm.BaseVM): if params.get("vnc_port"): vm.vnc_port = int(params.get("vnc_port")) virt_install_cmd += add_vnc(help, vm.vnc_port) + if params.get("vnclisten"): + vm.vnclisten = params.get("vnclisten") + virt_install_cmd += add_vnclisten(help, vm.vnclisten) elif params.get("display") == "sdl": virt_install_cmd += add_sdl(help) elif params.get("display") == "nographic": -- 1.7.1 -- Best Regards, Tang chen ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Autotest] [PATCH] virt: Add the parameter --vnclisten to the virt-install command 2011-12-30 5:26 [PATCH] virt: Add the parameter --vnclisten to the virt-install command tangchen @ 2011-12-30 10:36 ` Lucas Meneghel Rodrigues 2012-01-03 1:50 ` tangchen 0 siblings, 1 reply; 4+ messages in thread From: Lucas Meneghel Rodrigues @ 2011-12-30 10:36 UTC (permalink / raw) To: tangchen; +Cc: autotest, kvm On 12/30/2011 03:26 AM, tangchen wrote: > Hi, > > My colleague happened to find that when installing a Guest, > we cannot access to it by VNC because of the missing > parameter "--vnclisten=0.0.0.0" in virt-install. > > Here is the patch, please comment! :) Strange, I can access the guests using VNC just fine. I wonder why that is happening to you guys... > > Signed-off-by: Gu Yanhua<guyanhua-fnst@cn.fujitsu.com> > --- > client/virt/libvirt_vm.py | 8 ++++++++ > 1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/client/virt/libvirt_vm.py b/client/virt/libvirt_vm.py > index 65db338..4684aeb 100644 > --- a/client/virt/libvirt_vm.py > +++ b/client/virt/libvirt_vm.py > @@ -287,6 +287,7 @@ class VM(virt_vm.BaseVM): > self.serial_console = None > self.redirs = {} > self.vnc_port = 5900 > + self.vnclisten = "0.0.0.0" > self.pci_assignable = None > self.netdev_id = [] > self.device_id = [] > @@ -298,6 +299,7 @@ class VM(virt_vm.BaseVM): > self.params = params > self.root_dir = root_dir > self.address_cache = address_cache > + self.vnclisten = "0.0.0.0" > # For now, libvirt does not have a monitor property. > self.monitor = None > self.driver_type = params.get("driver_type", self.LIBVIRT_DEFAULT) > @@ -489,6 +491,9 @@ class VM(virt_vm.BaseVM): > > def add_vnc(help, vnc_port): > return " --vnc --vncport=%d" % (vnc_port) > + > + def add_vnclisten(help, vnclisten): > + return " --vnclisten=%s " % (vnclisten) > > def add_sdl(help): > if has_option(help, "sdl"): > @@ -629,6 +634,9 @@ class VM(virt_vm.BaseVM): > if params.get("vnc_port"): > vm.vnc_port = int(params.get("vnc_port")) > virt_install_cmd += add_vnc(help, vm.vnc_port) > + if params.get("vnclisten"): > + vm.vnclisten = params.get("vnclisten") > + virt_install_cmd += add_vnclisten(help, vm.vnclisten) > elif params.get("display") == "sdl": > virt_install_cmd += add_sdl(help) > elif params.get("display") == "nographic": > -- 1.7.1 > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] virt: Add the parameter --vnclisten to the virt-install command 2011-12-30 10:36 ` [Autotest] " Lucas Meneghel Rodrigues @ 2012-01-03 1:50 ` tangchen 2012-01-03 14:47 ` [Autotest] " Lucas Meneghel Rodrigues 0 siblings, 1 reply; 4+ messages in thread From: tangchen @ 2012-01-03 1:50 UTC (permalink / raw) To: Lucas Meneghel Rodrigues; +Cc: autotest, kvm Hi~ Here is the problem:) Without "vnclisten", guest is still accessable from localhost by vnc. But we cannot access guest from other host. And most of the time, we do the test on remote host, and in this situation, "vnclisten" is very useful.:) On 12/30/2011 06:36 PM, Lucas Meneghel Rodrigues wrote: > On 12/30/2011 03:26 AM, tangchen wrote: >> Hi, >> >> My colleague happened to find that when installing a Guest, >> we cannot access to it by VNC because of the missing >> parameter "--vnclisten=0.0.0.0" in virt-install. >> >> Here is the patch, please comment! :) > > Strange, I can access the guests using VNC just fine. I wonder why that is happening to you guys... > >> >> Signed-off-by: Gu Yanhua<guyanhua-fnst@cn.fujitsu.com> >> --- >> client/virt/libvirt_vm.py | 8 ++++++++ >> 1 files changed, 8 insertions(+), 0 deletions(-) >> >> diff --git a/client/virt/libvirt_vm.py b/client/virt/libvirt_vm.py >> index 65db338..4684aeb 100644 >> --- a/client/virt/libvirt_vm.py >> +++ b/client/virt/libvirt_vm.py >> @@ -287,6 +287,7 @@ class VM(virt_vm.BaseVM): >> self.serial_console = None >> self.redirs = {} >> self.vnc_port = 5900 >> + self.vnclisten = "0.0.0.0" >> self.pci_assignable = None >> self.netdev_id = [] >> self.device_id = [] >> @@ -298,6 +299,7 @@ class VM(virt_vm.BaseVM): >> self.params = params >> self.root_dir = root_dir >> self.address_cache = address_cache >> + self.vnclisten = "0.0.0.0" >> # For now, libvirt does not have a monitor property. >> self.monitor = None >> self.driver_type = params.get("driver_type", self.LIBVIRT_DEFAULT) >> @@ -489,6 +491,9 @@ class VM(virt_vm.BaseVM): >> >> def add_vnc(help, vnc_port): >> return " --vnc --vncport=%d" % (vnc_port) >> + >> + def add_vnclisten(help, vnclisten): >> + return " --vnclisten=%s " % (vnclisten) >> >> def add_sdl(help): >> if has_option(help, "sdl"): >> @@ -629,6 +634,9 @@ class VM(virt_vm.BaseVM): >> if params.get("vnc_port"): >> vm.vnc_port = int(params.get("vnc_port")) >> virt_install_cmd += add_vnc(help, vm.vnc_port) >> + if params.get("vnclisten"): >> + vm.vnclisten = params.get("vnclisten") >> + virt_install_cmd += add_vnclisten(help, vm.vnclisten) >> elif params.get("display") == "sdl": >> virt_install_cmd += add_sdl(help) >> elif params.get("display") == "nographic": >> -- 1.7.1 >> >> > > -- Best Regards, Tang chen -------------------------------------------------- Tang Chen Development Dept.I Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No.6 Wenzhu Road, Nanjing, 210012, China TEL: +86+25-86630566-8527 FUJITSU INTERNAL: 7998-8527 FAX: +86+25-83317685 EMail: tangchen@cn.fujitsu.com -------------------------------------------------- This communication is for use by the intended recipient(s) only and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not an intended recipient of this communication, you are hereby notified that any dissemination, distribution or copying hereof is strictly prohibited. If you have received this communication in error, please notify me by reply e-mail, permanently delete this communication from your system, and destroy any hard copies you may have printed ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Autotest] [PATCH] virt: Add the parameter --vnclisten to the virt-install command 2012-01-03 1:50 ` tangchen @ 2012-01-03 14:47 ` Lucas Meneghel Rodrigues 0 siblings, 0 replies; 4+ messages in thread From: Lucas Meneghel Rodrigues @ 2012-01-03 14:47 UTC (permalink / raw) To: tangchen; +Cc: autotest, kvm On 01/02/2012 11:50 PM, tangchen wrote: > Hi~ > > Here is the problem:) > > Without "vnclisten", guest is still accessable from localhost by vnc. > But we cannot access guest from other host. > > And most of the time, we do the test on remote host, and in this situation, > "vnclisten" is very useful.:) Ok, fair enough, applied, thanks! ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-01-03 14:47 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-12-30 5:26 [PATCH] virt: Add the parameter --vnclisten to the virt-install command tangchen 2011-12-30 10:36 ` [Autotest] " Lucas Meneghel Rodrigues 2012-01-03 1:50 ` tangchen 2012-01-03 14:47 ` [Autotest] " Lucas Meneghel Rodrigues
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.