Configured IP on imported VMs
Enhancement Request
Description
It would be very usefull ONE could detect automatically the IP configured on a VM while importing based on the VMware tools' info.
Use case
When a VM with network adapters is imported, ONE detects if they are connected to an existing network, but doesn't take into account which IPs are configured on the VM.
When a VM with more than one ip in the same interface is imported, only is display in the network tab the first IP. The rest ips are store in the template's VCENTER_ADDITIONAL_IPS field. It would be useful if all the ips addresses were displayed.
Close in #1990
Right now there are some errors in this functionality:
Maybe related to https://github.com/OpenNebula/one/commit/fa736ab9be5227961de071d46b1a6b5d097df878
One way to reproduce the bug is to have 1 wild with 3 NICS and 2 NETWORKS, for example:
wild0: - nic 0 : VM network - nic 1 : Random_net - nic 2 : VM network
Output:
$ onehost importvm 0 "wild0 - Cluster2"
There is a problem with your vm NICS, make sure that they are working properly. Error: undefined method []' for nil:NilClass/["/usr/lib/one/ruby/vcenter_driver/virtual_machine.rb:1595:in rescue in reference_unmanaged_devices'", "/usr/lib/one/ruby/vcenter_driver/virtual_machine.rb:1582:in reference_unmanaged_devices'", "/usr/lib/one/ruby/vcenter_driver/importer.rb:117:in import_wild'", "/usr/lib/one/ruby/opennebula/host.rb:234:in import_wild'", "/usr/bin/onehost:271:in block (3 levels) in perform_action'", "/usr/bin/onehost:267:in block (2 levels) in run'", "/usr/lib/one/ruby/cli/command_parser.rb:76:in initialize'", "/usr/bin/onehost:36:in new'", "/usr/bin/onehost:36:in
Also even if is not considered for this ticket, rollback functionality is not working properly. In this case for example when u get the error above you will see the wild imported with his resources (imported too) so it's better not to import anything when we catch any failure instead of keep the corrupted item.
Close in #2055