4

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.

3 Answers 3

5

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.

3
  • Thanks, looks like a phyiscal server is the way to go. I wonder how much more expensive it will be! Feb 11, 2010 at 22:07
  • If you don't need a lot of power then there are plenty of budget P4 based servers out there top be found. If you are lucky you find special offers that are not much more expensive than a similarly specced VPS. Feb 12, 2010 at 0:22
  • I once had 7 VM running on a Sempron 1.8Ghz processor with 2GB RAM. Each person had a VM. We were really tight on disk IO. Now we have a Core 2 Quad with 4GB RAM and we're much better =D Feb 12, 2010 at 6:46
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)

2
  • Apache? I'm talking IIS here. Feb 11, 2010 at 22:06
  • IIS then - the point remains the same - you can serve different websites from different sites on the same server. Virtualisation is too big an overhead IMO. Feb 11, 2010 at 22:11
2

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).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .