From: Ian Campbell Subject: Re: [PATCH,RFC]: Introduce libxl_domain_create() Date: Tue, 21 Dec 2010 14:12:47 +0000 Message-ID: <1292940767.4500.1942.camel@zakaz.uk.xensource.com> References: <1292353212.11246.35.camel@qabil.uk.xensource.com> <1292576770.32368.11405.camel@zakaz.uk.xensource.com> <1292921096.11246.55.camel@qabil.uk.xensource.com> <1292929378.4500.1546.camel@zakaz.uk.xensource.com> <19728.37003.785643.203280@mariner.uk.xensource.com> <1292937205.4500.1848.camel@zakaz.uk.xensource.com> <19728.46251.630356.920208@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <19728.46251.630356.920208@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: Xen Devel , Gianni Tedesco , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Tue, 2010-12-21 at 14:07 +0000, Ian Jackson wrote: > Ian Campbell writes ("Re: [Xen-devel] [PATCH,RFC]: Introduce libxl_domain_create()"): > > On Tue, 2010-12-21 at 11:33 +0000, Ian Jackson wrote: > > > Yes. The primary console for an HVM guest is not a PV console, but > > > the guest's emulated serial port provided by qemu. So to connect to > > > it you need qemu running. > > > > Why is that? > > > > In the PV case the xenconsole client is quite happy to sit and wait (on > > a xenstore watch) for the console entries to be created in xenstore. Why > > can the qemu case not do the same? > > TBH I think this is a bug in the xenconsole client, because it means > that the xenconsole client has an arbitrary timeout when it ought to > be started at the point when we know that the console is there. > > But I think you are right and this isn't the reason why it's done like > that at the moment. > > I vaguely remember some complication with the bootloader. Perhaps the > problem was that we can't start the console client until the > bootloader has finished using our controlling terminal ? The opposite -- the bootloader interacts with the user via xenconsole. > It seems to me that the right approach is > (a) the domain creation function should call back to the application > to say "your domain's console is ready now and you can connect to > it if you like" > (b) the bootloader's console should be plumbed explicitly rather > than simply relying on inheriting a suitable terminal from the > library's caller. > > Without (b), doing xapi or libvirt on top of libxl is going to be > impossible. (b) is already done and has been since Tim first plumbed the bootloader stuff through. > TBH some of the console plumbing is pretty horrid and needs a > redesign. For example, why can't you connect to the same domain more > than once ? (Ans: because xenconsoled uses ptys for talking to > xenconsole!!) Why can't you automatically log the guest's serial > console ? (Ans: because that's done with completely separate code in > qemu which doesn't know how to do more than speak to a particular > tty.)