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.
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
04-24-2008, 02:57 AM
"Daniel P. Berrange"
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.