All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas Meneghel Rodrigues <lmr@redhat.com>
To: tangchen <tangchen@cn.fujitsu.com>
Cc: autotest@test.kernel.org, kvm@vger.kernel.org
Subject: Re: [Autotest] [PATCH] virt: Add the parameter --vnclisten to the virt-install command
Date: Fri, 30 Dec 2011 08:36:10 -0200	[thread overview]
Message-ID: <4EFD941A.6030701@redhat.com> (raw)
In-Reply-To: <4EFD4B82.9000809@cn.fujitsu.com>

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
>
>


  reply	other threads:[~2011-12-30 10:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2012-01-03  1:50   ` tangchen
2012-01-03 14:47     ` [Autotest] " Lucas Meneghel Rodrigues

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EFD941A.6030701@redhat.com \
    --to=lmr@redhat.com \
    --cc=autotest@test.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=tangchen@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.