2

I'm using KVM for virtualization on a couple of Ubuntu servers but each physical server runs a bunch of VMs. Is there a way I can scale my VMs across physical servers? Does KVM support this? Is there an alternative tool that does this?

I know that VMWare, Citrix and RedHat have their own scalable hyper-visors but they are darn expensive.

Here's an image that illustrate what I mean:

enter image description here

Thank you.


Here's a scenario. We're going to be serving Django site using Apache and Postgres. Nothing more complex than that. In order to handle traffic spikes, I'd like to add more VM guests automatically to handle the extra load. Doesn't EC2 do something like this? This is pretty much what my needs are.

Mridang Agarwalla
  • 317
  • 2
  • 7
  • 15

2 Answers2

2

generally you cant scale single vm's across physical machines (eg vertical scaling) no matter what hypervisor software you are using, it's just a physical impossibility right now

if your thinking horizontal scaling where you create extra VM's to balance load then sure thats totally possible

anthonysomerset
  • 4,233
  • 2
  • 21
  • 24
  • I must have gotten this all wrong then. Doesn't Amazon use Xen which scales across multiple physical servers? Thanks. – Mridang Agarwalla Aug 26 '11 at 08:10
  • @Mridang: I think everyone's talking about different things. You might want to clarify your question to explain exactly what you mean -- based on what you *appear* to be saying, Anthony's answer is correct, but I have trouble imagining that could be what you're asking. – womble Aug 26 '11 at 09:32
  • @womble: Have a look at my edit please. Maybe that'll help clarify the doubts. Thank you. – Mridang Agarwalla Aug 26 '11 at 10:03
  • i've edited my answer to clarify, yes amazon use xen but ultimately one single instance is never running accross more than one hypervisor at any one time – anthonysomerset Aug 26 '11 at 10:49
2

how do you mean "scale"? You can add more VMs as long as your hosts allow that, and add more hosts when you run out of resources. That's what "scaling" means in this context, and it's possible with any KVM implementation, though a nice management tool makes things easier and much more manageable.

If you mean make a single VM as powerful as the sum of the hosts it's running on, then no, this is science fiction.

dyasny
  • 18,802
  • 6
  • 49
  • 64
  • That cleared it up but can KVM add automatically add hosts to handle more loads automatically? I haven't been able to find anything related to this. Is this where something like OpenStack comes in? – Mridang Agarwalla Aug 26 '11 at 08:44
  • KVM is just a hypervisor, all it does is handle some of VMs activities (the rest is handled by qemu). To automatically handle hosts you need management. This is either something as simple as libvirt, which allows you to connect to several hosts from the same `virt-manager` for example, and create/start VMs there, or something more sophisticated, like RHEV, where VMs can be live-migrated between hosts according to pwoer saving and load balancing policies, or something as complex as openstack or amazon, which automatically provisions hosts and guests. – dyasny Aug 26 '11 at 08:58
  • it all depends on your needs really, the picture you posted describes vSphere, Linux based products that are roughly equivalent are RHEV, ProxMox, ConVirt, and several others. If you better describe your needs, a better suited solution can be proposed – dyasny Aug 26 '11 at 09:00
  • Here's a scenario. We're going to be serving Django site using Apache and Postgres. Nothing more complex than that. In order to handle traffic spikes, I'd like to add more VM guests automatically to handle the extra load. Doesn't EC2 do something like this? This is pretty much what my needs are. All the OSs are Ubuntu/Debian. Thank you for your help dynasny. – Mridang Agarwalla Aug 26 '11 at 09:25
  • yes, EC2/rackspace and other cloud providers fit the description nicely – dyasny Aug 26 '11 at 09:32
  • If I were not to use Amazon/Rackspace, can I build a similar environment with KVM and it's tools? Would you know how? I've been seeing quite a bit of stuff about OpenStack and I'm wondering if that's it? Thanks again. – Mridang Agarwalla Aug 26 '11 at 10:05
  • 4
    You could build something like Amazon, and plenty of people here know how. It's not something you're going to learn by asking a couple of questions on Server Fault, though -- you've got a lot of learning ahead of you. – womble Aug 26 '11 at 10:08
  • yes, just like womble said - openStack is just one of the available solutions, but it's a serious project, and not something you'll be told how to do step-by-step on an online forum – dyasny Aug 26 '11 at 10:45
  • Thanks everyone. I'll read up more and maybe stick to regular load balancers and a bunch of distributed manually created VMs for now. – Mridang Agarwalla Aug 26 '11 at 12:10