From b13d02449aaf4f09b199a22c94bf520c79fced3c Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Tue, 21 May 2024 10:40:20 -0400 Subject: [PATCH] Fix VM Provision datastore location class When building the `VirtualMachineRelocateSpec` the `datastore` property is a `ManagedObjectReference` to a `Datastore`. We were setting the value to a simple `String` rather than a `VimString` with the proper `xsiType`/`vimType`. This would have broken when we moved from having VimString in ems_ref as a serialized yaml column and added ems_ref_obj. --- .../providers/vmware/infra_manager/provision/cloning.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/manageiq/providers/vmware/infra_manager/provision/cloning.rb b/app/models/manageiq/providers/vmware/infra_manager/provision/cloning.rb index cf990c10d..78c1d6b2e 100644 --- a/app/models/manageiq/providers/vmware/infra_manager/provision/cloning.rb +++ b/app/models/manageiq/providers/vmware/infra_manager/provision/cloning.rb @@ -168,7 +168,7 @@ def clone_vm(vim_clone_options) def datastore_ems_ref(clone_opts) datastore = Storage.find_by(:id => clone_opts[:datastore].id) - datastore.try(:ems_ref) + datastore.try(:ems_ref_obj) end def get_selected_snapshot