Description of problem:
While creating VM from a template which was renamed, the VM will be created with a disabled Memory Balloon, even if the template has this setting set as enabled.
What's more - even if it was manually selected to be enabled during VM creation (after the Memory Balloon checkbox got unchecked if the renamed template got selected), the VM will not have the Memory Balloon device.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a VM
2. Verify that it has a Memory Balloon Device Enabled checkbox set (Under Resource Allocation tab)
3. Create a template from that VM
4. Choose the new template and use "Edit" option to rename it.
5. Create a new VM, choosing that renamed template as the base.
6. Note that once you select the template the Memory Balloon Device Enabled checkbox gets unselected.
7. Check the box, so it gets selected again.
8. Fill the required details i.e. VM name and create the VM.
9. Check the properties of the VM just created, Note that the Memory Balloon Device Enabled will be unchecked.
Using renamed template will get the Memory Balloon device be disabled.
It will happen even if the device is manually re-enabled during the VM creation.
The Memory Balloon Device Enabled should be set according to the setting of the selected template, at the time one is selected. Also the manual override should be always respected.
Renaming the template back to it's original name doesn't resolve the issue, so once the template gets renamed for whatever reason it activates this broken behaviour.
verified on 3.6.0-0.12.master.el6