Hi, Dan Thank you for reviewing. > The console code already has support for auto-connecting to the console > with retries. When popping up the console it will retry after 125 ms, > 250ms, 500ms, 1s, 2s and then every 2s upto 10 times. > Oops, I forgot that the connection to the console is retried in "console.py". > I'm interested to know what this isn't working for you ? Check the log > file /root/.virt-manager/virt-manager.log which should show you messages > every time it tries to open the console. The code for re-trying the console > connection is in src/virtManager/console.py in the try_login() method. > I thought that the following is the problem. ---------------------------------------------------------------------- In finish() of "create.py", the port number of VNC become -1. When "Status monitoring" is short, the port number of VNC is updated in a short time, but, when "Status monitoring" is long, the port number of VNC is not updated for a long time. Because the XML data cached in "domain.py" is updated only in tick(). ---------------------------------------------------------------------- And, I forgot retrying in "console.py". Therefore, I adopted updating the port number of VNC in "cerate.py". I remake the patch. This patch only clears XML in get_graphics_console(), and the connection to the console is not retried in "create.py". So, by applying this patch, the XML data is cleared by retrying in "console.py" even when "Status monitoring" is long, and the port number of VNC is updated. (Because retrying in "console.py" calls get_graphics_console()) Thanks, Masayuki Sunou. ---------------------------------------------------------------------- diff -r 27ad8c7fbc3e src/virtManager/domain.py --- a/src/virtManager/domain.py Thu May 24 16:49:13 2007 -0400 +++ b/src/virtManager/domain.py Sat Jun 09 11:44:54 2007 +0900 @@ -430,6 +430,7 @@ class vmmDomain(gobject.GObject): return os.access(tty, os.R_OK | os.W_OK) def get_graphics_console(self): + self.xml = None type = self.get_xml_string("/domain/devices/graphics/@type") port = None if type == "vnc": ---------------------------------------------------------------------- In message <20070607124857.GB2119@xxxxxxxxxx> "Re: [et-mgmt-tools] [PATCH] Fix connection with the console when thedomain is created" ""Daniel P. Berrange" <berrange@xxxxxxxxxx>" wrote: > On Thu, Jun 07, 2007 at 03:00:58PM +0900, Masayuki Sunou wrote: > > Hi > > > > When virt-mangager is set the following configuration and VM is created, > > the console is not displayed automatically long time. > > (it displays "The console is currently unavailable") > > > > 1. Set "Status monitoring" to long time.(ex: 60 seconds). > > 2. Set "Automatically open consoles" to "For new domains". > > > > This patch fixes it by waiting start of the console.(like virt-install) > > This is bad - you can't have a while loop which sits for 5 seconds in an > even handler in GTK because it will block all UI events from running. > > > Note: > > # 5 seconds, .25 second sleeps > > --> 5 : Virt-manager waits only for short time.(5 seconds) > > Because virt-manager have a means to connect with a console > > easily again. (unlike virt-install) > > The console code already has support for auto-connecting to the console > with retries. When popping up the console it will retry after 125 ms, > 250ms, 500ms, 1s, 2s and then every 2s upto 10 times. > > I'm interested to know what this isn't working for you ? Check the log > file /root/.virt-manager/virt-manager.log which should show you messages > every time it tries to open the console. The code for re-trying the console > connection is in src/virtManager/console.py in the try_login() method. > > Dan. > -- > |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| > |=- Perl modules: http://search.cpan.org/~danberr/ -=| > |=- Projects: http://freshmeat.net/~danielpb/ -=| > |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/et-mgmt-tools >