Re: [PATCH] virt-clone:update the VNC handling information when cloning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/25/2012 09:37 PM, Wanlong Gao wrote:
> Assume you set port='5900' and no autoport.
> Then, copied guest's vnc will have the same port with the orignal.
> If one of them started, another can't get vnc.
> 
> So, if you find 'port=xxxx' in the orignal xml, you should modify it as autoport
> with some warning. Then, you can run both of guests at once.
> 
> Suggested-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
> Signed-off-by: Wanlong Gao <gaowanlong@xxxxxxxxxxxxxx>
> ---
>  virtinst/CloneManager.py |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/virtinst/CloneManager.py b/virtinst/CloneManager.py
> index dee3c59..5111861 100644
> --- a/virtinst/CloneManager.py
> +++ b/virtinst/CloneManager.py
> @@ -441,6 +441,10 @@ class CloneDesign(object):
>          self._guest.name = self._clone_name
>          self._guest.uuid = self._clone_uuid
>          self._clone_mac.reverse()
> +        if self._guest.graphics_dev.port != -1:
> +            logging.warn(_("Setting the graphics device port to autoport, "
> +                           "in order to avoid conflicting."))
> +            self._guest.graphics_dev.port = -1

Guests can have no graphics devices, or multiple graphics devices. This should
handle all those cases. As it is now this breaks the test suite, python
setup.py test

But the idea is fine.

Thanks,
Cole


[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux