Keeping the VEs upon hardware machine reinstall? [message #29782] |
Thu, 24 April 2008 11:38 |
ArsDangor
Messages: 6 Registered: March 2008
|
Junior Member |
|
|
Hi, there.
If I reinstall the hardware node, all config files under /etc/vz get lost. However, if I set a different file system for the private areas, the VEs are still there. How can I tell OpenVZ that "what is under /vz/private/200 must be reused as VE 200" and thus skip the OS template expansion? Just making a tar.gz of it and telling that's the new template is not acceptable to me (I might have to re-install hundreds of physical nodes).
Thanks in advance.
If all the world is a stage, I want better ligthting.
|
|
|
|
Re: Keeping the VEs upon hardware machine reinstall? [message #29839 is a reply to message #29806] |
Fri, 25 April 2008 23:07 |
ArsDangor
Messages: 6 Registered: March 2008
|
Junior Member |
|
|
Maratus, thanks for your answer.
Quote: | As far as I understand you have got "/vz" on a separate partition.
So when you reinstall your HN "/" will change but "/vz" will be the same. And you want to use "old" /vz partition on the "new" HN.
| You understood perfectly.
Quote: | I think the following steps should help us:
1. Save /etc/vz/conf directory.[...]
| The problem is that this doesn't scale in my scenario. Remember that I may have to reinstall hundreds of HNs in one go. I don't want any kind of human intervention in installing or configuring neither the HNs nor the VEs.
Long story short, all I need is something like vzctl create 10000 --noostemplate --private /vz/private/10000 Then, just running the appropraite vzctl set commands would recover my VE in seconds, with no data loss. A nice wish for bugzilla?
Cheers.
If all the world is a stage, I want better ligthting.
|
|
|
|
|
Re: Keeping the VEs upon hardware machine reinstall? [message #29858 is a reply to message #29857] |
Sun, 27 April 2008 14:09 |
ArsDangor
Messages: 6 Registered: March 2008
|
Junior Member |
|
|
"matatrus" | b) VE.conf file is responsible for the last two items.
So, for example what value of PRIVVMPAGES do you expect from the following command?
Quote:
vzctl create 10000 --noostemplate --private /vz/private/10000
| I don't care. I'd expect the same PRIVVMEMPAGES as if I run vzctl create 1000 --private /vz/private/1000 --ostemplate cern-4-x86_64-default To make this easier to understand, (sorry for spamming), I'm integrating OpenVZ VE management within Quattor. My code performs something like this:
if ! vzlist 1000
then
vzctl create 10000 --private /vz/private --ostemplate cern-4-x86_64-default
fi
vzctl set 1000 --privvmempages <privvmempages> --diskspace <diskspace> --hostname <hostname>...
vzctl start 1000
So, my "--noostemplate" requirement would be just another "if" inside the first if statement. Simple to me, and transparent for my users, if it was at all supported.
"curx" | move /etc/vz/conf to your /vz/conf(ig) and create a symlink from
/etc/vz/conf -> /vz/conf
|
Yes, this workaround will work with our framework. Thanks! Although it would be simpler for users to avoid this...
Cheers.
If all the world is a stage, I want better ligthting.
|
|
|