Weblog entry #164 for Steve
I setup my first vserver installation yesterday evening.
Simple enough to do, but not as flexible or usable as Xen is for me. I will endeavor to make a short writeup if I get time soon.
The only other things I've been doing recently are making a new release of xen-tools (out now), moving the code behind this site to use the prototype javascript library instead of my own custom code which is .. non-perfect .. and adding some more back-end facilities. (Such as the ability to edit polls before they are pushed out)
Comments on this Entry
Hi Steve,
I have just started using vserver on Sunday. I also plan writing something for my site, I would be pleased to submit it here as well (actually, I have already written something, but need to explore more features and better understand the processes).
Cheers,
Julien
[ Parent | Reply to this comment ]
[ Send Message | View Steve's Scratchpad | View Weblogs ]
You'd certainly be welcome to have anything you wrote posted here, if it is as nice as that simple guide.
The only difference I think between what you did and what I did was that I used the linux-image-xen-vserver-amd64 package - so that I could keep my Xen guests up and running.
[ Parent | Reply to this comment ]
As for the linux-image, sure, it should be adapted to what you already run and suit your architecture (added to my draft).
Cheers,
Julien
[ Parent | Reply to this comment ]
can you elaborate on what are/were your requirements (eg what you use Xen for that you wanted vserver to do), either here as a comment or more appropriately in your upcoming article.
as vserver and xen do different things (user-land virtualization vs paravirtualization), they also excel at different things, though they can both be used to accomplish some of the same things (though more or less optimally). right tool for the right job.
"i used a claw hammer for the first time yesterday. simple enough to do, but not as flexible or usable as a sledge hammer is for me."
see, context is everything. ;-)
[ Parent | Reply to this comment ]
[ Send Message | View Steve's Scratchpad | View Weblogs ]
I use Xen internally for providing seperate machines, these are used for things like running my master CFengine server, or to provide a build-environment for Debian packages.
VServer could easily do this.
Where it fails is allowing interesting network setup. With Xen I can be very flexable and setup different networks linked with VPNs, etc.
VServer doesn't seem suited to that kind of setup, since the networking is shared rather than virtualised.
The other reason it fails, for me, is that each guest uses the same kernel. I like to have different ones - right now I'm running three different Xen kernels:
- The stock Debian packaged one for most of the guests.
- A custom one I had to build to get NFS ROOT support - as described on this site previously.
- I super-stripped down tiny one for "small" guests.
Hopefully the first and second will become identical soon - I keep meaning to report a bug asking for the Debian kernels to have the NFSROOT option set, but I've not yet done so.
Actually I'm not sure if VServer can boot over NFS? If it can't thats another reason for it to fail!
[ Parent | Reply to this comment ]
vserver does not virtualize the network stack to the point of appearing as separate physical machines (like xen or qemu), but instead virtualizing ip addresses. with an emphasis on security, vserver allows you to have separate ip addresses per vserver with iptables managing them. it is probably possible that tun/tap devices could be associated and used by individual vservers to create simulated networks with limitless possibilities (like qemu).
vserver does not allow separate kernels, but neither incurs the overhead of separate kernels (though, yes, paravirtualization does reduce that overhead).
are you talking about nfs booting the "host" (the vserver kernel) or the vserver "guests"?
there's no reason you shouldn't be able to nfs boot a vserver kernel. and as the filesystem is a kernel-land issue a vserver guest could "boot" (though it's really just init'ing and running) off a nfs filesystem mounted by the host.
the difference between xen and vserver boils down to levels of separation. the more separation, the more overhead incurred.
- i have ultimate flexibility with physical machines, but that incurs ultimate overhead.
- qemu allows me to run multiple computer architectures on a single machine, but incurs resource overhead (processing, memory, storage).
- xen allows me the flexibility to run multiple operating systems (or multiple instances of the same os) on a single machine, but with the restraint of a single computer architecture, and again incurs overhead, but less than the previous options.
- vserver allows running multiple user-land instances on a single kernel, but with all the restraints that stem from using a single kernel.
that separation/freedom is not "free", you pay for it. it's just a matter of being as efficient as possible (minimizing overhead) while fulfilling all requirements (degree of separation).
and there's no reason not to use both at the same time, as xen and vserver can coexist (as evident in etch's kernel images). use xen to create virtual networks and run different kernels, but have all your "stable" applications running in a single xen domain, but kept separate in user-land by vserver. some xen users will argue that it's easier for them to just use another xen dom to separate the applications than learning vserver, but they are just trading one resource (their time & mental capacities) for another (computer resource overhead).
personally, i don't need anything fancy on the kernel-side, but i want user-land isolation for security and managability. for instance every php application i have runs in its own vserver (but with a unified url namespace by using a reverse-proxy apache in its own vserver), but by using vserver and hardlinks my apache+php vserver instances have an equivalent footprint (processor, memory, storage) as a single apache+php installation.
sometimes i think xen users advocate their mallet as the best hammer (even if only implicitly), misleading those who would be better served by a claw hammer (and admins should know and apply both as appropriate).
[ Parent | Reply to this comment ]