Run two separate web servers on a single VPS
A friend and I are considering paying a monthly fee for our own VPS. We currently have our own individual hosting, but it is limited and does not allow us to do things like schedule tasks and install other software.
What is required to set up one server as two separate virtual machines? So that I do not have access to my friends stuff, and vice versa. I know Atwood and Haack have done this, so I know it's possible, but there's really not enough detail there for me to get started. I am a total newbie to VM concepts, and my current setup is my own W2K server that is not a VM.
Solution 1:
The difference between Atwood and you is that you don't have a physical server.
What you will be trying to achieve here is to put a virtual machine in a virtual machine. This may seem impossible. Let's say it depends. This is called recursive virtualization.
Recursive virtualization is not possible with technologies such as paravirtualisation (ex: Xen) or OS containers (ex: Solaris Zones, OpenVZ). No ifs not buts, not possible. Most public VPS technology (99% i'd say) is based on either one of these technologies.
Recursive virtualisation is possible with full virtualization with a little luck. I believe it is possible to run a VirtualBox inside a Virtualbox VM. If you are in this scenario, you can bet your VPS provider will try to keep you from doing such a thing.
Let's say you've got the right technology and you achieve setting it up. VPS usually have few ressources (RAM, CPU but mainly IO) therefore it will be incredibly slow...
To sum up, VPS inside VPS is a no-no. Although getting together with a few friends to rent a small physical server is a very good idea and will work perfectly fine.
Solution 2:
Why do you have to use virtualisation for this? Since Unix began* you've been able to restrict users from viewing other users files.
I'd say virtualisation is quite an overkill here, and certainly even if you are able to get a VM inside a VM working (I tried on VMware Fusion to test out Citrix's XenServer but never succeeded) the performance hit would be too bad and you'll be longing for your own VM back again.
You'd be better off having one server, an SSH and SFTP login each, your own private directories, and configuring Apache to host your separate directories. I would recommend having your own IP addresses which is certainly possible - just ask any provider - some like Memset (who I'd highly recommend) even give you a couple anyway.
Then you can set up any website you like to listen on the separate IPs, and even use name-based hosting as well to get multiple sites hosted each.
Other options include FreeBSD jails, OpenSolaris zones, Linux containers. They're all virtualised solutions but were designed exactly for this sort of thing, and don't suffer the overhead of a completely separate OS like most typical virtualisation solutions. (By the way, OpenVZ is absolutely horrid, and more of a hack than a virtualisation solution.)
If you do go down the route of having a physical server carved up into two VMs (which you'll also need 2 IPs for anyway) then this is certainly a reasonable solution, but the cheapest dedicated provider (who has got a half-decent support team) I've found is £59+VAT a month.
(* almost certainly)
Solution 3:
Recursive virtualisation, when possible (which isn't often) is very very inefficient and you would not want to work that way. I have before now run UserModeLinux VMs inside a VMWare VM, but there were specific reasons for doing so, it was only for a short amount of time, and efficiency wasn't a significant issue.
If your needs are not high (i.e. you are are moving away from shared hosting in order to gain control more than because you need much more CPU/RAM/space/... then a shared arrangement gives) then it might be worth considering a cheap dedicated server. Several hosts rent out older servers quite cheaply if you look for special offers on boards like www.webhostingtalk.com and if you are lucky you will stumble on one that works out much better value than a VPS. You can then run what-ever your preferred VM providing solution is on that. I have a server picked up from OLM's "server a day" offers a while ago that is still competative price-wise today on which I run a couple of VMs under VMWare. I've not seen a deal as good as the one I got since, but you never know what you might find if you keep an eye open (and shop around similar providers - there are others on the WHT offers boards and such places who regularly advertise low-budget dedicated servers based on older kit).