vm templates

Discussion in 'General' started by ITG, Nov 26, 2012.

  1. ITG

    ITG New Member

    Hello everyone. My first post here, and i have been trolling this forum for the answer but i haven't found one yet, so if this is a redundant question, my apologies.

    I have a multiserver setup using centos 6.3, and ispconfig 3 installed. 1 server has everything installed successfully except for vserver. Then i have my second server with openvz installed ( 2.6.32-042stab063.2 ) ..

    Everything is working perfectly... With 1 exception.

    So here is my vserver setup. I have 1 os template right now, 'centos-6-x86', and 2 vm templates (ie: copper and bronze).

    When i add a new vm, and use the vm template for copper, it creates the vm, starts it, and everything is working perfectly. All the configuration values are correct in the vps itself. Now lets say i want to upgrade that vm, i would think that I would need to change the vm template from copper to bronze. Well, when i do this, it restarts the vm, but when the vm starts, the configuration of the vm is not changed... it still maintains the same values as the copper vm template.

    Now, i can go under the vm in the ispconfig 3 control panel, and go to advanced and change the values there to match the bronze template and it will update/restart the vm and the values are correct after restart, but i would think changing the vm template should be enough to make this happen.. am i wrong?

    Also, how come it has to restart the vm? using the vzctl command line, the memory/diskspace parameters can be changed while it's live without having to restart the vps. Any idea if this is going to be fixed/updated in future versions of ispconfig?

    Thanks for all the help!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPCOnfig rewrites the template file and then applies it by restarting the vm. Changing just the template files will not apply the values.

    Feel free to make a feature request to add support for the vzctl command to apply changes in the bugtracker. This will not work for all changes but for some bascic values it will work.
     
  3. ITG

    ITG New Member

    I don't think i understand, or we may be missing each other on this point. I'm not making a change to the vm template itself, rather, i have created 2 different vm templates, one called copper with 512MB ram, and 1 called Bronze with 1024MB ram.

    When i originally added the vm, i used the copper template.

    The customer wanted to upgrade to the bronze level, so i assumed that all i would need to do is go under vserver -> virtual machines and click on his vps listed there VEID 101 and change the template from the drop down box from copper to bronze.

    When i do this, the vps restarts itself, but applies the same configuration values as copper, not bronze. I don't think this is what was meant to be done.

    Do you see what i'm talking about? I hope i explained this right.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Ahh ok, you changed the template but the values of the new template were not applied to the vm aftre restart? Which values differ in the two templates, there are some values that can be set on the advanced tab of the vm and values set there take precedence over values that are defined in the template.
     
  5. ITG

    ITG New Member

    Ok, sorry for the long wait between posts.. Here is what I have...

     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, thats the values that i guessed. They are set on the advanced tab and override the values from your template though.
     
  7. ITG

    ITG New Member

    That still doesn't explain why when i change the vm server to use a different template, why the values from the new template don't overwrite the config file to reflect the new config.

    If i originally set a vserver to my copper plan, then i change the template for that server to reflect my bronze template, i guess i expect it to actually re-make the config for my vps, and reboot the vps with the new values.

    It appears that when i do make that change (not a change to the physical template, just which template that vps points to) it does reboot the vps, so ispconfig recognizes a change was made, it just doesn't write the change in the config file.

    Any thoughts? or am i off the deep end with this?? :)
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    The template values are used during initial creation of the vm to fill in the fields of the advanced tab and then the values on the advanced tab have precedence over the values of the template. So if you change a template later, all values except of the ones from the advanced tab get applied from the template as the template can not overwrite a value that is set on the advanced tab.

    I guess we can add some kind of check that values on the advanced tab get changed in case that they were not altered manually since the initial creation of the vm
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

Share This Page