Description of problem: Not possible to add vm to affinity group via cli I tried two options: 1) first via affinitygroup collection, but I do not see any options in auto-completion connect to vm 2) second via update vm -> update vm Global_vm_1 --affinitygroup-identifier test_cli but it not add vm to affinity group Version-Release number of selected component (if applicable): rhevm-cli-3.5.0.5-1.el6ev.noarch How reproducible: Always Steps to Reproduce: 1. See above 2. 3. Actual results: not possible to add vm to affinity group CLI Expected results: possible to vm to affinity group via CLI Additional info: maybe it possible, but I do not found this way, so I believe for user it will also hard to find it
Affinity groups are represented as a sub-collection of clusters, so in order to add a VM to an affinity group you have to specify the identifier of the VM to add, the identifier of the cluster and the identifier of the affinity group: # add vm --id {vm:id} --cluster-identifier {cluster:id} --affinitygroup-identifier {affinitygroup:id} This will work and will add the VM to the affinity group. However the "cluster-identifier" parameter doesn't appear in auto-completion, probably hidden by the "cluster-id" used when adding a new VM. We have to check this. Updating the affinity group with an update of the VM isn't supported.
Checked on rhevm-cli-3.5.0.6-1.el6ev.noarch I still not see --cluster-identifier under auto-complete options: [RHEVM shell (connected)]# add vm affinitygroup-identifier description instance_type-id quota-id bios-boot_menu-enabled disks-clone instance_type-name rng_device-rate-bytes cluster disks-disk memory rng_device-rate-period cluster-id display-allow_override memory_policy-ballooning rng_device-source cluster-name display-copy_paste_enabled memory_policy-guaranteed serial_number-policy comment display-file_transfer_enabled migration_downtime serial_number-value console-enabled display-keyboard_layout name snapshots-snapshot content display-monitors numa_tune_mode soundcard_enabled correlation_id display-single_qxl_pci origin sso-methods-method cpu-architecture display-smartcard_enabled os-boot stateless cpu-cpu_tune-vcpu_pin display-type os-cmdline template-id cpu-mode domain-name os-initRd template-name cpu-topology-cores expect os-kernel timezone cpu-topology-sockets high_availability-enabled os-type tunnel_migration cpu_profile-id high_availability-priority payloads-payload type cpu_shares id permissions-clone usb-enabled custom_properties-custom_property initialization-configuration-data placement_policy-affinity usb-type datacenter-identifier initialization-configuration-type placement_policy-host-id use_latest_template_version delete_protected initialization-regenerate_ids placement_policy-host-name virtio_scsi-enabled
Thought it connect to 3.5.4 build my mistake, back to ON_QA
Checked on ovirt-engine-cli-3.6.0.0-0.3.20150623.git53408f5.el6.noarch I still not see --cluster-identifier under auto-complete options: add vm --id 2f08a2e7-2423-4467-b588-2760c2ea5913 cluster- cluster-id cluster-name
In order to fix bug 1213393 a new set of --parent-whatever-name and --parent-whatever-identifier options have been introduced to specify the parent entities. The old --whatever-id option are still supported, for backwards compatibility, but the aren't displayed in the auto completion list, the new ones are displayed instead. So in the list you should see the following options: parent-cluster-name parent-cluster-identifier parent-affinitygroup-name parent-affinitygroup-identifier In order to add a VM to the affinity group you can then use the following command: # add vm 123 --parent-cluster-identifier 456 --parent-affinitygroup-identifier 789 You can also use the names, if you prefer that: # add vm 123 --parent-cluster-name mycluster --parent-affinitygroup-name mygroup I think that no additional changes are needed, so I'm moving back to ON_QA.
Thanks for description, but like I checked add vm 123 --parent-cluster-identifier 456 --parent-affinitygroup-identifier 789 not work, but add vm --id 2f08a2e7-2423-4467-b588-2760c2ea5913 --parent-cluster-name cl_36_amd --parent-affinitygroup-name test and add vm --id 6bbe63c9-6532-4f5b-8d83-4ef0103f113a --parent-cluster-identifier 8663f496-8d35-467a-a3af-fdebd560e745 --parent-affinitygroup-identifier 10b22342-ca2d-4a85-abcc-14ab134b5b1c Works great. Verified on ovirt-engine-cli-3.6.0.0-0.3.20150623.git53408f5.el6.noarch
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHEA-2016-0406.html