Unable to import wild VM - Cannot aquire Image 0

Please, describe the problem here and provide additional information below (if applicable) …

I’m unable to import several of my Wild VM’s. All of them have the following in the log.

Sun Aug 11 11:56:14 2019 [Z0][ONE][E]: DISK 0: Cannot acquire image 0, it is persistent and already in use
Sun Aug 11 11:56:14 2019 [Z0][ReM][E]: Req:5024 UID:0 one.vm.allocate result FAILURE [one.vm.allocate] DISK 0: Cannot acquire image 0, it is persistent and already in use


Versions of the related components and OS (frontend, hypervisors, VMs):

OpenNebula version 5.8.1 installed on CentOS 7
Hypervisor is ESXI/VMWare using vCenter 6.7
VM’s are running linux versions (CentOS 7 and Ubuntu"

Steps to reproduce:
Follow documentation http://docs.opennebula.org/5.8/deployment/opennebula_installation/overview.html
for installation. Enable vCenter Driver. Import vCenter cluster, go to Host, select Wild VM’s and attempt to import.

Current results:
Most import without issues, but several (about 5 of them) give the same
one.vm.allocate result FAILURE [one.vm.allocate] DISK 0: Cannot acquire image 0, it is persistent and already in use
error. and one of them gives me the following:

1.4.8/lib/sinatra/base.rb:975:in block (3 levels) in route!'", "/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:994:inroute_eval’", “/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in block (2 levels) in route!'", "/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1015:inblock in process_route’”, “/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in catch'", "/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:inprocess_route’”, “/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:973:in block in route!'", "/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:ineach’”, “/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in route!'", "/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1085:inblock in dispatch!’”, “/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in block in invoke'", "/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:incatch’”, “/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in invoke'", "/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1082:indispatch!’”, “/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in block in call!'", "/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:inblock in invoke’”, “/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in catch'", "/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:ininvoke’”, “/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in call!'", "/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:895:incall’”, “/usr/local/share/gems/gems/rack-1.6.11/lib/rack/commonlogger.rb:33:in call'", "/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:219:incall’”, “/usr/local/share/gems/gems/rack-1.6.11/lib/rack/deflater.rb:35:in call'", "/usr/local/share/gems/gems/rack-1.6.11/lib/rack/session/abstract/id.rb:225:incontext’”, “/usr/local/share/gems/gems/rack-1.6.11/lib/rack/session/abstract/id.rb:220:in call'", "/usr/local/share/gems/gems/rack-protection-1.5.5/lib/rack/protection/xss_header.rb:18:incall’”, “/usr/local/share/gems/gems/rack-protection-1.5.5/lib/rack/protection/path_traversal.rb:16:in call'", "/usr/local/share/gems/gems/rack-protection-1.5.5/lib/rack/protection/json_csrf.rb:18:incall’”, “/usr/local/share/gems/gems/rack-protection-1.5.5/lib/rack/protection/base.rb:49:in call'", "/usr/local/share/gems/gems/rack-protection-1.5.5/lib/rack/protection/base.rb:49:incall’”, “/usr/local/share/gems/gems/rack-protection-1.5.5/lib/rack/protection/frame_options.rb:31:in call'", "/usr/local/share/gems/gems/rack-1.6.11/lib/rack/nulllogger.rb:9:incall’”, “/usr/local/share/gems/gems/rack-1.6.11/lib/rack/head.rb:13:in call'", "/usr/local/share/gems/gems/rack-1.6.11/lib/rack/methodoverride.rb:22:incall’”, “/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/show_exceptions.rb:25:in call'", "/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:182:incall’”, “/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:2013:in call'", "/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:inblock in call’”, “/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1787:in synchronize'", "/usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:incall’”, “/usr/local/share/gems/gems/thin-1.7.2/lib/thin/connection.rb:86:in block in pre_process'", "/usr/local/share/gems/gems/thin-1.7.2/lib/thin/connection.rb:84:incatch’”, “/usr/local/share/gems/gems/thin-1.7.2/lib/thin/connection.rb:84:in pre_process'", "/usr/local/share/gems/gems/thin-1.7.2/lib/thin/connection.rb:50:inblock in process’”, “/usr/local/share/gems/gems/eventmachine-1.2.7/lib/eventmachine.rb:1077:in call'", "/usr/local/share/gems/gems/eventmachine-1.2.7/lib/eventmachine.rb:1077:inblock in spawn_threadpool’”]

Expected results:

VM’s imported and working?

I figured out the problem, apparently I had an ISO mounted on each of the VM’s that was imported as an image by Open Nebula. I had to shutdown each VM and remove the CDRom which the ISO was mounted to then import… though this shouldn’t be required its what I needed to do to get them imported. I suspect this might be a bug.