Re: [libvirt] Couple qemu driver bugs after xml refactoring

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

 



On Tue, Jul 22, 2008 at 04:53:19PM +0100, Daniel P. Berrange wrote:
> On Tue, Jul 22, 2008 at 11:42:03AM -0400, Cole Robinson wrote:
> > Hi all,
> > 
> > I've hit a couple bugs in the qemu driver with the recent
> > domain xml refactoring. I've debugged them but in both
> > cases I'm not sure what the optimal solutions are, so I'm
> > just laying them out here:
> > 
> > 1) Previously defining a qemu guest without a 'listen'
> > address specified in the graphics tag would default to
> > 127.0.0.1 (hardcoded in qemu_driver->vncListen). Current
> > xml doesn't set this default, and will build a qemu
> > command line with an entry like '-vnc (null):1'. Not
> > sure if the default should be set at the parsing level
> > or the driver level.
> 
> There was a good reason for removing the 127.0.0.1 from the XML parsing
> stage, but i can't remember what it is :-) Anyway this should really be
> handled at the point where we build the command line in the qemu driver
> code

Here's a patch for this bit

diff -r 59140de4e7a9 src/qemu_conf.c
--- a/src/qemu_conf.c	Mon Jul 21 18:27:29 2008 +0100
+++ b/src/qemu_conf.c	Tue Jul 22 22:12:22 2008 +0100
@@ -1106,7 +1106,9 @@
                 options[sizeof(options)-1] = '\0';
             }
             ret = snprintf(vncdisplay, sizeof(vncdisplay), "%s:%d%s",
-                           vm->def->graphics->data.vnc.listenAddr,
+                           (vm->def->graphics->data.vnc.listenAddr ?
+                            vm->def->graphics->data.vnc.listenAddr :
+                            (driver->vncListen ? driver->vncListen : "")),
                            vm->def->graphics->data.vnc.port - 5900,
                            options);
         } else {


Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]