Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am in the planning stages of installing esxi 5 to host about 5 guest os's (identical CentOS 5 images). I want them to have separate data allocation (seperate virtual disks) but I want them to be able to dynamically share resources (memory,cpu), with 1 VM having a higher priority over the other 4 VM.

I've been reading the documentation and it looks like this is possible to do. How are resources shared dynamically? Wouldn't the guest OS need to be rebooted in order for new ram/cpu to be added/removed from a particular VM? Logistically I'm not sure how the OS can play nice with this.

Also, how would I structure my resource pool(s) for this to work?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Get some training, honestly it's worth it - try the vSphere 'Install, Manage & Configure' as a starter.

Either way your query comes down to some basic understanding of what a hypervisor does, essentially they're just complex time-slicers.

For instance if you only had one real CPU cores and two VMs, each with one virtual cpu core and both were 100% busy the hypervisor would just alternate this load between servers equally; one would get some real CPU time then the other would get an equal amount of time and then it'd go back to the first VM again.

In the scenario above if you had two or more real CPU cores then effectively each VM would get all the CPU time they needed and the time wouldn't have to be 'sliced'.

This model extrapolates to many real CPU cores and many many virtual CPU cores - if there's enough real CPU core time available to allow all virtual CPU usage to be carried out without time slicing then that's what happens, everyone's happy. If there's more demand than resources then time-slicing happens and you lose some performance but everything's still fine.

What resource pools do is make time-slicing NOT equal. For instance in the scenario above you could make it so that in the one real CPU core example one of the VMs could get twice or more CPU time than the other VM. The hypervisor just gives more time to the resource that's configured to have more CPU resource - it's as simple as that.

That said vSphere resource pools can get VERY complex VERY quickly and if I were you I'd seriously consider just leaving things at their default setting and no changing anything about resouce allocation. It's not that it doesn't work great but from your question I'd suggest you really do with the relevant training before going down that route.

Hope this helps.

share|improve this answer
    
I see, so I guess there is a distinction between virtual CPUs and real CPUs. However, how is it possible for more real CPUs to be allocated to a VM? –  user104835 Jan 25 '12 at 15:19
    
Also, what is the default setting? For example, with a server with 8 CPUs, if I were to create 4 VMs, would it create 2 virtual CPUs per VM with 1 real CPU giving time to 1 virtual CPU? Or would it create 8 virtual CPUs per VM and split time equally among the 8 real CPUs? –  user104835 Jan 25 '12 at 15:22
    
It can just lie to the VMs basically and there is no default - YOU decide how many virtual CPUs (and memory etc) to give to a VM - they don't have to match reality. A 'rule of thumb' many use is to just give every VM two virtual CPUs and 4GB of memory. –  Chopper3 Jan 25 '12 at 15:25
    
so with memory, I assume I should just chop it up into equal pieces for every VM, but is there a way to dynamically allocate memory to VMs that need more, ie hot adding memory? Is it up to the guest OS to "detect" the new memory? –  user104835 Jan 25 '12 at 15:29
1  
No, again ESXi only actually uses the memory that the applications actively ask for, not how much they've been allocated - i.e. it IS all dynamic and manages itself. Get some basic training, seriously. –  Chopper3 Jan 25 '12 at 15:40

CPU speed prioritization is fully dynamic, as for memory - that is a good question. I suggest the following: ESXi 5, the hypervisor, is free - for one host machine, up to 32GB RAM. A bunch of modules are disabled with the free license, but before activating the free license it installs as a full package in 60 day trial.

This is what you want: http://downloads.vmware.com/d/info/datacenter_cloud_infrastructure/vmware_vsphere_hypervisor_esxi/5_0

Give it a go on your test machine, I've got 3 GB RAM here on a dual core and it's enough to install a couple virtual appliances. Even better: I've got VMWare Workstation trial running, with a virtual machine, assigned 2 GB RAM and 2 cores to it, and installed ESXi 5 on it. You'll get to try out the installation, network configuration, management through the vSphere client and you can play with virtual machines within a virtual machine. What more could anyone possibly want! :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.