0

I have 9 openvz VEs running on 3 physical servers. I'd like to add another VE to each physical server. Soooo, each physical server would then be running 4 VEs.

I used vzsplit -n 4 to generate new params to fit the VEs to the resources of the physical server. My problem is that I have to go in and manually update each VEs conf file.

Is there a better way to get the new params into each of the config files without manually editing each one? Even better, is there possibly a way to have all the conf files include parameters from a single file?

3 Answers 3

1

I solved my own problem. My solution was to execute the following bash script on all my openvz nodes in my cluster:

for VEID invzlist | awk '{ print $1 }' | grep -v VEID; do vzctl set $VEID --applyconfig shared --save; done

The script gets the VEIDs from vzlist, and for each one does --applyconfig

I used puppet to distribute my custom ve-shared.conf-sample that contains everything I want to be the same in the VEs. I setup a puppet Exec that will automatically execute the bash script anytime I make a change to ve-shared.conf-sample

In this way I can update all my VEs running on my openvz cluster by editing a single file.

0

It's been a while since I used OpenVZ but you can probably accomplish what you want with vzctl --save and do all changes quickly.

FWIW we moved out of OpenVZ to VMware (ESX, not Server); while OpenVZ is much lighter, VMware was easier to manage day to day, and gave us flexibility to use different kernels and OSes. OpenVZ felt like it would be perfect if I wanted to run 100 simple web hosting "VPS" accounts on a single box, and was pretty awkward for most other uses.

0

vzsplit is just a recommendation, you dont really need to adjust all the parameters of all vms every time you add a new VM

Most of the barriers will never be hit, not even close. From my experience, most of the time privvmpages and oomguarpages are the only parameters that really matter.

You must log in to answer this question.