FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora/Linux Management Tools

 
 
LinkBack Thread Tools
 
Old 04-23-2008, 12:33 AM
Hiroyuki Kaguchi
 
Default fix "--wait" option of virt-viewer.

When virt-viewer is executed specifying "--wait" option, the graphical
console is not displayed even through the domain is started.
The cause of this trouble is that virt-viewer try to get the vncport number
from the information of the stopping domain.
This patch fixes "--wait" option.

Thanks,
Signed-off-by: Hiroyuki Kaguchi <fj7025cf@aa.jp.fujitsu.com>
diff -r e2ee322e3d1a -r b37550a1a79c src/main.c
--- a/src/main.c Tue Apr 08 15:17:24 2008 -0400
+++ b/src/main.c Mon Apr 21 18:09:43 2008 +0900
@@ -803,23 +803,25 @@
}

do {
- dom = viewer_lookup_domain(conn, name);
- if (!dom && !waitvnc) {
- fprintf(stderr, "unable to lookup domain %s
", name);
- return 3;
- }
- if (!dom)
- usleep(500*1000);
- } while (!dom);
+ do {
+ dom = viewer_lookup_domain(conn, name);
+ if (!dom && !waitvnc) {
+ fprintf(stderr, "unable to lookup domain %s
", name);
+ return 3;
+ }
+ if (!dom)
+ usleep(500*1000);
+ } while (!dom);

- do {
viewer_extract_vnc_graphics(dom, &vncport);
if (!vncport && !waitvnc) {
fprintf(stderr, "unable to find vnc graphics for %s
", name);
return 4;
}
- if (!vncport)
+ if (!vncport) {
+ virDomainFree(dom);
usleep(300*1000);
+ }
} while (!vncport);
tmpname = virDomainGetName(dom);
if (tmpname != NULL) {
@@ -894,7 +896,7 @@
char *uri = NULL;
char *name = NULL;
int opt_ind;
- const char *sopts = "hVc:";
+ const char *sopts = "hVvc:wd";
static const struct option lopts[] = {
{ "help", 0, 0, 'h' },
{ "version", 0, 0, 'V' },
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 04-24-2008, 02:57 AM
"Daniel P. Berrange"
 
Default fix "--wait" option of virt-viewer.

On Wed, Apr 23, 2008 at 09:33:07AM +0900, Hiroyuki Kaguchi wrote:
> When virt-viewer is executed specifying "--wait" option, the graphical
> console is not displayed even through the domain is started.
> The cause of this trouble is that virt-viewer try to get the vncport number
> from the information of the stopping domain.
> This patch fixes "--wait" option.

I was a little confused at first because --wait option already works as
described when I test it, but then I realized that with older XenD from
version 3.0.3 libvirt uses different code and so exposes this bug.
So I've applied your patch.

Regards,
Dan.
--
|: Red Hat, Engineering, Boston -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 :|

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 

Thread Tools




All times are GMT. The time now is 07:40 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org