-
Notifications
You must be signed in to change notification settings - Fork 927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added CPU config and clne vm along with CPU reconfig #694
base: master
Are you sure you want to change the base?
Conversation
samples/clone_vm_CPU_reconfig.py
Outdated
help='Version/release CPUs of the Virtual machine CPUs') | ||
|
||
parser.add_custom_argument('--memory', required=False, action='store', default=None, | ||
help='Version/release memory of the Virtual machine memories') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mention the unit of memory (MB ) in the help of "--memory"
samples/clone_vm_CPU_reconfig.py
Outdated
parser.add_custom_argument('--cpu', required=False, action='store', default=None, | ||
help='Version/release CPUs of the Virtual machine CPUs') | ||
|
||
parser.add_custom_argument('--memory', required=False, action='store', default=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
provide default value for both cpu and memory so, you can remove line 23-27
# Powering off VM for CPU change | ||
if format(vm.runtime.powerState) == "poweredOn": | ||
print("Attempting to power off {0}".format(vm.name)) | ||
TASK = vm.PowerOffVM_Task() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No caps for the "TASK". Make it "task"
from pyVmomi import vim | ||
from tools import cli, service_instance, pchelper, tasks | ||
from pyVim.task import WaitForTasks | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run both the samples in python 2 and 3
Python 2 support is deprecated |
reconfigure_CPU_vm: command line interface to upgrade number of CPU.
clone_vm_CPU_reconfig: command line interface to clone VM template and reconfigure it.