我接触Xen也一年多了,每天工作都和Xen打交道,而且经常在Xen开源社区中交流,所以这里我总结一下我的认识,给对xl这个新工具有疑惑的同学答疑一下吧。
一些原因如下:
问:使用xl时,需要启动xend吗?
答:不需要,xl不依赖于xend,而且建议使用xl时关掉Xend的运行;另外,请注意xencommons这个daemon还是要启动的(它一般位于/etc/init.d/xencommons,其实它也是去启动了xenstored 和 xenconsoled两个daemon)。
下面是我收集的一些关于是否使用xl的英文材料,有兴趣的可以看看。
XL wiki:
http://wiki.xen.org/wiki/XL
As of Xen 4.1, xl is the default toolstack supplied as part of the Xen release. The older xend toolstack is still available in tree but is considered deprecated and may eventually be removed.
xl is based on the xenlight library (libxl), a library designed to provide a common “bottom third” for any Xen toolstack.
Xen 4.1 release notes.
http://blog.xen.org/index.php/2011/03/25/xen-4-1-releases/
XL Toolstack: Xen 4.1 includes a re-architected toolstack, that is based on the new libxenlight library, providing a simple and robust API for toolstacks. XL is functionally equivalent and almost entirely backwards compatible with existing XM domain configuration files. The XEND toolstack remains supported in Xen 4.1 however we strongly recommend that users upgrade to XL.
some discussions about XL/XM in Xen-devel mailing list:
http://xen.1045712.n5.nabble.com/New-feature-support-xl-or-xm-td2516259.html
xl does have the callback mechanisms for cleanup, they are implemented in a per-VM daemon that is started when you create the domain. However you can still create a VM without starting the related daemon.
(no callbacks or cleanups in that case).
There are only two things that xl doesn’t have compared to xend: the concept of managed domains (domains that are installed on your system and may be offline) and an XML-RPC interface.
We like the ‘xm’ CLI, in fact we are trying our best to provide a compatible command line interface with ‘xl’. Ideally you’ll be able to symlink xl to xm and everything will still work.
libxl does use libxenctrl and libxenguest. But it does not use xend and so does not need it to be running.
if you want to migrate your VMs to another 4.1 (or 4.2 or 5.0, etc.) host without xend you just need to shutdown xend (leaving the VMs running) and use xl to perform the migration.
http://lists.xen.org/archives/html/xen-devel/2012-01/msg02227.html
http://lists.xen.org/archives/html/xen-devel/2012-01/msg02227.html
Features missing in Xl, with no current plan to introduce them (as usual, contributions are welcome and encouraged):
- python support in VM config files;
- an RPC interface;
- managed domain;
- pv-usb;
- netchannel2;
- pv-scsi;
Features missing in Xl, work in progress:
- Remus;
- machine parsable output from xl create.