one icon indicating copy to clipboard operation
one copied to clipboard

Configured IP on imported VMs

Open AdriMenendezM opened this issue 9 years ago • 4 comments

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.

AdriMenendezM avatar Nov 24 '17 12:11 AdriMenendezM

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.

joseangelgm avatar Mar 26 '18 09:03 joseangelgm

Close in #1990

joseangelgm avatar Apr 19 '18 08:04 joseangelgm

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

'", "/usr/lib/one/ruby/cli/one_helper.rb:570:in perform_action'", "/usr/bin/onehost:267:in block (2 levels) in
'", "/usr/lib/one/ruby/cli/command_parser.rb:449: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.

Semedi avatar Apr 27 '18 14:04 Semedi

Close in #2055

joseangelgm avatar May 07 '18 07:05 joseangelgm