Ralph Shumaker wrote: > The link above makes Zen sound kinda similar to coLinux. Would this be > a remotely decent assessment?
Not really. It is similar to coLinux or UML or VMware in that it gets you another running instance of Linux but that is where the similarity ends. I am fairly certain that coLinux and UML etc are going away in favor of Xen. It is on track to be included in RHEL and SuSe Linux and I am sure others will follow. Xen is the first thing GRUB boots. It is like its own OS kernel. The actual term for it is that it is a hypervisor. Xen then boots your operating systems which all run side by side in their own protected environments at very near native hardware speeds. Benchmarks show 1-2% performance loss for Xen and much more for any of the other technologies. Xen is a hypervisor just like VM on the IBM mainframes and provides similar functionality. With fast cpu's, lots of RAM, virtualization, cheap SAN (thanks to iscsi, AoE, etc.) the PC platform is rapidly becoming more like the mainframe in terms of power and ability than the mainframe is becoming like the PC in terms of price. At the moment the guest OS's require some special mods to work with Xen due to a deficiency int he x86 cpu design which means you cannot yet run Windows in a domain but once the next generation of Intel/AMD cpu's come along which fix this you will be able to run any OS unmodified on the same physical box right alongside your various Linux and BSD distributions. I recently purchased a dual-core AMD64 machine with 2G of RAM and 250G of disk specifically to run Xen. I have consolidated my workstation, my email server, and my web server on one physical hardware platform in different Xen "domains" (OS instances) and will be setting up another to replace my aging firewall box soon. I will probably also install Ubuntu and Gentoo and a couple other OS's I have been meaning to play with eventually as well. This is great for security. If my web server is intruded upon it does not affect my email or firewall and vice versa. They all run SE Linux as well. One domain runs FC4 which provides me with my slick and very up to date GUI desktop environment. The other domains all run CentOS 4.1 which gives me a stable long term server environment. The xm command is used to manage most Xen functionality. I can create a new domain by creating a config file for it (called "mail.conf for example): disk = [ 'phy:mapper/VolGroup00-mail,hda1,w','phy:mapper/VolGroup00-mailswap,hda2,w' ] extra = "3" kernel = "/boot/vmlinuz-2.6.12-xenU" memory = 512 name = "mail" root = "/dev/hda1 ro" Then issuing the xen create command: /usr/sbin/xm create mail.conf and my new domain boots up, runs through all of the init scripts, ifconfig's itself an IP (a virtual interface bridges to the physical eth0) and you've got an instant server. I can list the domains currently running on the box with: [EMAIL PROTECTED] ~]# /usr/sbin/xm list Name Id Mem(MB) CPU VCPU(s) State Time(s) Domain-0 0 507 - 2 r---- 12749.8 mail 13 511 1 1 -b--- 2927.3 www 14 511 0 1 -b--- 531.5 Domain-0 is the default name for the first domain created which is the management domain which can communicate with the Xen hypervisor to launch the other domains. I can use the xm mem-set command to increase or decrease the amount of RAM available to each domain on the fly. I can use xentop to see the performance of all of my domains. I can save the state of a domain to disk so if I need to reboot the physical hardware I don't have to kill all of the processes in the domains or cause the domain to lose its uptime (for whatever that is worth). I install all of my OS's in LVM volumes managed from Domain-0 so I can easily add/remove disk space from domains on the fly. If I want to migrate my mail server from CentOS to debian I just create a new domain, install debian, and move the data over with minimal downtime to the mail service and zero downtime to the box itself. I hope to never again have to totally re-install the whole box. I installed Fedora from boot disks but I installed CentOS by just mounting a logical volume to Domain-0, creating a yum.conf that points to CentOS 4.1 repositories, and doing: yum --installroot=/mnt/ groupinstall Base Then I unmount that logical volume, make a xen config file which points to it, and xm create my domain. If I use xm -c create my terminal is attached to the console of the domain so I see the kernel boot up, init scripts run, and I get a login prompt. The only downside to installing this way is that certain system setup scripts don't get run so I have to configure my own hosts file and a couple other things. If you really want to boot the CD to install Xen you can run Qemu (which is more like VMware) and actually boot the CD inside Qemu and go through the whole install process for any version of Linux and install your OS into a logical volume. Then once it is all installed you can shutdown the OS, exit Qemu, then reboot the OS in a Xen domain to get rid of the performance hit taken when running under a full hardware emulator like Qemu. And all without affecting the other domains running on the system. I read that Xen takes precautions to isolate some parts of the hardware and drivers from the rest so a fault in one It also allows you to get console and restart a crashed domain (ever reboot a box remotely and have it not come back up?) as long as Domain-0 is functioning (so on a serious production box in a datacenter don't do anything in Domain-0 except administer your other domains). Another cool feature (which I have not yet taken advantage of) is that with Xen you can migrate domains between boxes with shared disk storage (via iscsi, AoE, fibrechannel, or whatever) with only tens of milliseconds of downtime to the domain making for some really cool clustering possibilities. The Xen guys have migrated a Quake server from one box to another and the players never noticed. I have been running my Xen setup for a week and so far I am very impressed with it and I think that from now on any machine I own, be it server or desktop, is going to have Xen installed. RAM is cheap and 99% of cpu cycles go to waste anyway so this sort of consolidation really makes a lot of sense. -- Tracy R Reed http://ultraviolet.org -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
