Description of problem: VM provision with auto_placement fails if best_fit host doesn't have selected VM Network [EVM] VM [test_vlan_lkhom_3] Step [CheckProvisioned] Status [[MiqException::MiqProvisionError]: Port group [DPortGroup] is not available on target] Message [[MiqException::MiqProvisionError]: Port group [DPortGroup] is not available on target] Version-Release number of selected component (if applicable):5.8.0.7 How reproducible:100% Steps to Reproduce: 1.Prepare env on which host A won't have VM Network B 2.Host A also should be the best choice for provisioning 3.Provision VM with auto_placement and select VM Network B Actual results:provision fails Expected results:auto_placement should affect VM Network also Additional info:this issue is not reproducible with manual Host/Datastore selection as selected Host limits VM network options
Lucy, VMware best-fit for ManageIQ uses the eligible_hosts method, which means it calls allowed_hosts on the workflow See here: https://github.com/ManageIQ/manageiq-content/blob/master/content/automate/ManageIQ/Infrastructure/VM/Provisioning/Placement.class/__methods__/vmware_best_fit_least_utilized.rb#L18 We need to look into having the VMware allowed_hosts method filter the hosts if a network is already selected. Adam would be a good resource here.
https://github.com/ManageIQ/manageiq/pull/14946
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/4c807454c8398b476f21bbba21addd94400debfd commit 4c807454c8398b476f21bbba21addd94400debfd Author: Lucy Fu <lufu> AuthorDate: Fri Apr 28 15:43:04 2017 -0400 Commit: Lucy Fu <lufu> CommitDate: Fri Apr 28 15:46:09 2017 -0400 Filter out the hosts with the selected network. Once a network is selected, the available hosts should be filtered out to the hosts that are on the selected network. https://bugzilla.redhat.com/show_bug.cgi?id=1435814 app/models/miq_provision_virt_workflow.rb | 9 +++++++ spec/models/miq_provision_virt_workflow_spec.rb | 31 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+)