On Wed, Feb 21, 2007 at 12:07:42PM +0900, Saori Fukuta wrote: > Hi, > > I try to install with virt-install and sometimes vncviewer get an error > message that says "unable to connect to host:Connection refused(111)". > So, I cannot continue installation. > > The attached patch to resolve this issues in the following way: > > 1) Check whether the domain has VNCport number. > 2) If the number is exist, use the VNCport number. > 3) If not, check again every 0.25 second up to 40 seconds. This is no good because it is Xen specific - the code breaks when used with the QEMU / KVM backend to libvirt. I think this is actually a combination of two bugs: - libvirt looks in xenstore to find the port number, but if it is missing hardcodes 5900 + domid. So there is a race condition where if virt-install asks for the XML dump, before the framebuffer daemon has started up, it will get the wrong port number. This is a hardcoded fallback port number is a hangover from old Xen 3.0.2 where the port number was fixed & not kept in xenstore at all. We need to fix libvirt to only use this code on Xen <= 3.0.3 - Once the above fix in libvirt is done, we can make virt-install do a loop like the one you have below, but instead of looking in xenstore it will look at the port in the XML - waiting for it to change from '-1' to an actual port number Regards 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 -=|