WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

Re: [Xen-API] [PATCH] Make xiu add a vnc-port entry in XenStore

To: Dave Scott <Dave.Scott@xxxxxxxxxxxxx>
Subject: Re: [Xen-API] [PATCH] Make xiu add a vnc-port entry in XenStore
From: Ewan Mellor <ewan.mellor@xxxxxxxxxxxxx>
Date: Fri, 6 Aug 2010 10:36:08 +0100
Cc: Xen-API <xen-api@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 06 Aug 2010 02:36:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <81A73678E76EA642801C8F2E4823AD2180818B3C6E@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <20100805102836.GI19622@xxxxxxxxxxxxxxxxxxxxxxx> <81A73678E76EA642801C8F2E4823AD2180818B3C6E@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
So what else was in the fake qemu-dm-wrapper?  Do we need to simulate all that
in xiu too?

That can't be the whole story anyway, because PV domains wouldn't have run 
qemu-dm at all.  I can imagine that simulated PV VMs have always been broken
though.

Ewan.

On Thu, Aug 05, 2010 at 04:06:37PM +0100, Dave Scott wrote:

> Thanks for this...
> 
> What's probably happened is that the old SDK .xva had a fake qemu-dm-wrapper 
> which did a bit of xenstore-write'ing. This has been lost (probably a good 
> thing) by the move to the new SDK-from-main.iso.
> 
> Cheers,
> Dave
> 
> > -----Original Message-----
> > From: xen-api-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-api-
> > bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Ewan Mellor
> > Sent: 05 August 2010 10:29
> > To: Xen-API
> > Subject: [Xen-API] [PATCH] Make xiu add a vnc-port entry in XenStore
> > 
> > Starting simulated VMs when using xiu is completely broken at the
> > moment.
> > xapi waits for a vnc-port to be written to XenStore (in one of two
> > places, depending upon whether the VM is HVM or PV).  xiu doesn't
> > currently write a value for this field, and so the VM start hangs for
> > 20 minutes until the watch times out.
> > 
> > The first patch here fixes all the compile-time warnings in xiu.
> > 
> > The second patch writes a vnc-port entry in the two necessary places,
> > for every VM that is created.
> > 
> > Ewan.
> > 
> > diff -r 9e71f6b54bfc ocaml/xiu/xiu.ml
> > --- a/ocaml/xiu/xiu.ml      Wed Aug 04 20:42:21 2010 +0100
> > +++ b/ocaml/xiu/xiu.ml      Wed Aug 04 23:16:36 2010 +0100
> > @@ -120,10 +120,11 @@
> > 
> >  type sysctl = Sysctl_getdomaininfolist | Sysctl_physinfo |
> > Sysctl_getcpuinfo | Sysctl_unknown of int
> > 
> > -type hypcall = Hypcall_domain_shutdown
> > +type hypcall = Hypcall_domain_shutdown | Hypcall_unknown
> > 
> >  let hypcall_of_int = function
> >    | 1 -> Hypcall_domain_shutdown
> > +  | _ -> Hypcall_unknown
> > 
> >  let domctl_of_int = function
> >     | 1  -> Domctl_create | 2 -> Domctl_destroy @@ -199,8 +200,8 @@
> > 
> >  (** Perform the module (re)loading *)
> >  let initialise_dummy_devices () =
> > -  Unix.system("/sbin/rmmod dummy");
> > -  Unix.system(sprintf "/sbin/modprobe dummy numdummies=%d"
> > max_dummy_vifs)
> > +  ignore(Unix.system("/sbin/rmmod dummy"));
> > ignore(Unix.system(sprintf
> > + "/sbin/modprobe dummy numdummies=%d" max_dummy_vifs))
> > 
> >  (** Free list of dummy<N> devices, used to simulate guest VIF backends
> > *)  let vif_free_list = ref (List.map (fun x -> sprintf "dummy%d" x)
> > (Range.to_list (Range.make 0 max_dummy_vifs))) @@ -273,7 +274,6 @@
> >                     | Xenbus.InitWait -> ()
> >                     | Xenbus.Closing ->
> >                             xs.Xs.write w (Xenbus.string_of Xenbus.Closed);
> > -                           let hotplugpath = sprintf
> > "/xapi/%s/hotplug/%s/%s/hotplug" domid ty id in
> >                             if ty = "vif" then (
> >                                     let device_path = sprintf
> > "/xapi/%s/hotplug/vif/%s/vif" domid id in
> >                                     let device = xs.Xs.read device_path in
> > 
> > 
> > ---
> > 
> > 
> > diff -r 9e71f6b54bfc ocaml/xiu/xiu.ml
> > --- a/ocaml/xiu/xiu.ml      Wed Aug 04 20:42:21 2010 +0100
> > +++ b/ocaml/xiu/xiu.ml      Thu Aug 05 11:18:01 2010 +0100
> > @@ -349,6 +349,12 @@
> >                             xs.Xs.unwatch (sprintf
> > "/local/domain/%d/device" dom) "frontend";
> >                             xs.Xs.unwatch (sprintf "/local/domain/0/device-
> > model/%d" dom) "devicemodel"
> >                             in
> > +                   let write_vnc_port dom =
> > +                           let port = sprintf "%d" (5900 + dom) in
> > +                           xs.Xs.write (sprintf
> > "/local/domain/%d/serial/0/vnc-port" dom) port; (* PV *)
> > +                           xs.Xs.write (sprintf
> > "/local/domain/%d/console/vnc-port" dom) port (* HVM *)
> > +                        in
> > +
> >                     (* diff old list and new list *)
> >                     let currents = Hashtbl.fold (fun k v acc -> k :: acc)
> > domains [] in
> > 
> > @@ -359,6 +365,7 @@
> > 
> >                     List.iter (fun old -> remove_watch_for_olddomain old)
> > disappeared;
> >                     List.iter (fun n -> add_watch_for_newdomain n) news;
> > +                   List.iter write_vnc_port news;
> >                     olds := currents;
> >                     ()
> >                     in

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

<Prev in Thread] Current Thread [Next in Thread>