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.

Is there a way to set the priority (renice) a specific Virtual Machine on my server?

I am running three VMs on VMWare Server 2.0 on a Debian Lenny box with two physical CPUs. Obviously each of these three VMs are running as the same program, but have seperate process IDs. I was wondering if there was maybe a script I could use to give one box (my VOIP Asterisk PBX) priority over the other two.

Thanks!

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Since each virtual machine runs as a seperate process, I don't think you need anything more than the standard renice command. Assuming the two VMs you want to run at lower priority have the process id's of 1542 and 1543, you could use

renice -n 10 -p 1542
renice -n 10 -p 1543

to add 10 to their niceness. Your Asterisk VM should have the default niceness of 0, so this would give them a lower priority than it. The least priority you can assign to a process is a niceness level of 19.

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.