I had heard of it being done. I have a friend doing it. So I decided I would too. It is an interesting idea to run virtualization in virtualization. One argument I have heard for running VServer in Xen is a best of both worlds scenario. VServer uses very little resources for each virtual instance thus allowing for many, many virtual instances to be started. Xen has the ability to perform live migration. The scenario would then be that physical server A has X number of Xen virtual machines running each with Y number of VServer instances. We want to migrate one of the Xen virtual machines to physical server B for load purposes. With Xen that migration is possible and the Y number of VServer instances go with it without skipping a beat.
Xen currently ships with kernel version 2.6.18. I noticed that there was a Debian package for a Xen 2.6.22 kernel which would allow me to use the latest stable code of VServer. I downloaded that package and extracted the three patches it included for patching a vanilla 2.6.22.9 kernel for Xen. I downloaded the VServer patch for 2.6.22.10 and the vanilla kernel 2.6.22.9. I then extracted the kernel and patched it with the VServer patch. That went smooth without any “gotchas.” I then proceeded to patch the kernel with the three Xen patches from the Debian package. There were a few segments that the patch utility was unable to do automatically so I went through and performed them manually. There were relatively simple and straightforward. (Note: There was a one set of segments in ecryptfs that I did not attempt to merge.) After that I configured the kernel to include both the Xen extensions as well as the VServer extensions. Booted the new kernel and was up and running. I tested the VServer extensions by creating and starting a VServer instance running SSH. It all worked like a charm.
I am comtemplating creating a single patch of Xen and VServer for the 2.6.22.9 kernel and posting it here if for no one else but myself. Happy virtualizing.