vcd-cli
vcd-cli copied to clipboard
vcd vapp add-vm powers on vApp
I'm using vCD 9.1 and I've found that there is no way to use vcd vapp add-vm without the vApp being powered on. I've tracked it down to the lack of options in a two specific functions.
Is there any reason for not having an option to keep the vApp powered off? Why is the default behavior to power the vApp on?
In ./lib/python3.6/site-packages/vcd_cli/vapp.py there is the add_vm function;
def add_vm(ctx, name, source_vapp, source_vm, catalog, target_vm, hostname,
network, ip_allocation_mode, storage_profile, password_auto,
accept_all_eulas):
In that function it calls a pyvcloud function called add_vms;
task = vapp.add_vms([spec], all_eulas_accepted=accept_all_eulas)
If I replace this function in my local install with the below I get the desired behavior;
task = vapp.add_vms([spec], deploy=False, power_on=False, all_eulas_accepted=accept_all_eulas)
The pyvcloud function is defined as such;
def add_vms(self,
specs,
deploy=True,
power_on=True,
all_eulas_accepted=None,
source_delete=False):
Any reason there isn't an option for deploy or power_on status?
Thanks, James
Any chance of reviewing this? Would you accept a pull request if I added options to change this functionality?
I agree with that. Since there is no option to modify hardware configuration of the VM while deploying I would prefer to have it powered off, so I can modify and power on it manually.
Any update? There is a issue related from four years now https://github.com/vmware/vcd-cli/issues/193