Closed agrare closed 1 year ago
Keeping this WIP because I think we can still return a list of Lans without a host we just need to looks for dvswitches in the vm's parent_datacenter.
We can use the parent_cluster.lans
to get all lans available to the VM in the cluster. This mirrors what the RHV UI does where even if a VM is powered off you can still see a list of available lans to select from.
Backported to petrosian
in commit 312320ba13573d374731b6fedb6bc434b64e5f68.
commit 312320ba13573d374731b6fedb6bc434b64e5f68
Author: Jason Frey <fryguy9@gmail.com>
Date: Tue Mar 21 16:39:24 2023 -0400
Merge pull request #637 from agrare/fix_vm_reconfig_nil_host
Fix VM Reconfigure for stopped VMs
(cherry picked from commit adbe19ce083dbd24c3d05b507dbf33d8c32f7d95)
Ovirt VMs have no host assigned when they are not running. This causes an exception to be raised when trying to reconfigure a VM that isn't running because we are using the host for the list of available lans.