Project

General

Profile

Actions

Bug #1589

closed

Cannot create VMs on vSphere (4.0) cluster

Added by Rytis Sileika almost 12 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
VM management
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Steps that I followed:

- Updated lib/foreman/model/vmware.rb with the correct HASH (:vsphere_expected_pubkey_hash)
- Added new compute resource, setting type to VMWare. Fetching Datacentres worked fine - I received a list of available DCs. Selected one of them.

PROBLEM 1
---------

When creating a new host, I changed type from 'bare metal' to 'VMWare'. Filled in all the details. When I clicked on "Submit", it failed with the following error:

Missing partial compute_resources/vms/form/vmware with {:locale=>[:en, :en], :formats=>[:html], :handlers=>[:builder, :rjs, :rhtml, :rxml, :erb]} in view paths "/opt/foreman/app/views"

Full stack trace:

ActionView::MissingTemplate
Missing partial compute_resources/vms/form/vmware with {:locale=>[:en, :en], :formats=>[:html], :handlers=>[:builder, :rjs, :rhtml, :rxml, :erb]} in view paths "/opt/foreman/app/views"
app/views/hosts/_compute.html.erb:2:in `_app_views_hosts__compute_html_erb__383971327_70176225426240_4706636'
app/views/hosts/_compute.html.erb:1:in `_app_views_hosts__compute_html_erb__383971327_70176225426240_4706636'
app/views/hosts/_unattended.html.erb:6:in `_app_views_hosts__unattended_html_erb___317377005_70176226311880_6131276'
app/views/hosts/_form.html.erb:52:in `_app_views_hosts__form_html_erb___1710001210_70176226962920_1176350'
app/views/hosts/_form.html.erb:3:in `_app_views_hosts__form_html_erb___1710001210_70176226962920_1176350'
app/views/hosts/new.html.erb:3:in `_app_views_hosts_new_html_erb___2094403440_70176226972220_0'
app/controllers/application_controller.rb:258:in `process_error'
app/controllers/application_controller.rb:253:in `process_error'
app/controllers/hosts_controller.rb:100:in `create'

PROBLEM 2
---------

I don't know if this is related, or should be a separate bug report.

If I go to "Compute Resources" then select VMWare resource and click on "Virtual Machines" I get an error message:

Sorry but there was an error: 500 Internal Server Error

It seems that an AJAX call is being made to /compute_resources/1-<name>/vms

If I go there directly, I get the following error message:

undefined method `[]=' for nil:NilClass

And the stack trace:

NoMethodError
undefined method `[]=' for nil:NilClass
app/controllers/compute_resources/vms_controller.rb:6:in `index'


Related issues 1 (0 open1 closed)

Has duplicate Foreman - Bug #1812: 500 server error on vSphere compute_resources pageDuplicate08/07/2012Actions
Actions #1

Updated by Florian Koch almost 12 years ago

Hi,

i have the same error with vsphere 5

regards Florian

Actions #2

Updated by Tray Torrance almost 12 years ago

I'm seeing Problem 2 on vSphere 5, as well. Will update with a full trace next week.

Actions #3

Updated by Cyril CORDOUI BARZI almost 12 years ago

I have same issue than the problem one with vCenter 4.0 and "Compute Resources" (fog)
I can list VM, but if I try to create a new guest I have the following error:

Missing partial compute_resources/vms/form/vmware with {:locale=>[:en, :en], :formats=>[:html], :handlers=>[:rjs, :rhtml, :rxml, :builder, :erb]} in view paths "/home/puppet/foreman/app/views" 

With this Full trace:
ActionView::MissingTemplate
Missing partial compute_resources/vms/form/vmware with {:locale=>[:en, :en], :formats=>[:html], :handlers=>[:rjs, :rhtml, :rxml, :builder, :erb]} in view paths "/home/puppet/foreman/app/views" 
app/views/hosts/_compute.html.erb:2:in `_app_views_hosts__compute_html_erb___598015553_55079560_5515308'
app/views/hosts/_compute.html.erb:1:in `_app_views_hosts__compute_html_erb___598015553_55079560_5515308'
app/views/hosts/_unattended.html.erb:6:in `_app_views_hosts__unattended_html_erb___1022913327_57235040_389164'
app/views/hosts/_form.html.erb:52:in `_app_views_hosts__form_html_erb___957189508_58920400_528990'
app/helpers/layout_helper.rb:130:in `form_for'
app/views/hosts/_form.html.erb:3:in `_app_views_hosts__form_html_erb___957189508_58920400_528990'
app/views/hosts/new.html.erb:3:in `_app_views_hosts_new_html_erb__1939049200_58938700_0'
app/controllers/application_controller.rb:258:in `process_error'
app/controllers/application_controller.rb:253:in `process_error'
app/controllers/hosts_controller.rb:100:in `create'

Actions #4

Updated by Tray Torrance almost 12 years ago

Upon switching my foreman install to development mode, this is the logged error when attempting to list VMs:

Completed 500 Internal Server Error in 38791ms

NoMethodError (You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.[]=):
  app/controllers/compute_resources/vms_controller.rb:6:in `index'

Rendered vendor/ruby/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/templates/rescues/_trace.erb (4.2ms)
  Notice Load (0.7ms)  SELECT * FROM `notices` INNER JOIN `user_notices` ON `notices`.id = `user_notices`.notice_id WHERE (`user_notices`.us
er_id = 1 )
Rendered vendor/ruby/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (776.1ms)
Rendered vendor/ruby/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (793.
9ms)

Actions #5

Updated by Ohad Levy almost 12 years ago

  • Priority changed from High to Normal

sadly this seems like rbvmomi gem fault.

this is not the full trace, you should probably look for the full trace (vs the application trace).

can you get the vm listing using rbvmomi? sadly i cant reproduce it locally.

Actions #6

Updated by Rytis Sileika almost 12 years ago

I've tried connection with `rmvmomi` (from the bundled gem), and was able to list the VMs and folders in it without any problems:

# bundle exec vendor/ruby/1.8/gems/rbvmomi-1.5.1/bin/rbvmomish -o vsphere-host -k -u <username> -p <password> RAILS_ENV=production
vsphere-host> dc = si.content.rootFolder.childEntity.grep(VIM::Datacenter)[0]
Datacenter("datacenter-2")
vsphere-host> dc.vmFolder.childEntity
[Folder("group-v1141"),
 Folder("group-v763"),
 Folder("group-v762"),
 Folder("group-v1181"),
 Folder("group-v1171"),
 Folder("group-v85"),
 Folder("group-v1090"),
 VirtualMachine("vm-921"),
 VirtualMachine("vm-1111"),
 VirtualMachine("vm-1165"),
 VirtualMachine("vm-1182"),
 VirtualMachine("vm-809"),
 VirtualMachine("vm-846"),
 VirtualMachine("vm-848"),
 VirtualMachine("vm-873")]
vsphere-host>
Actions #7

Updated by Ohad Levy over 11 years ago

  • Status changed from New to Pending

at the moment I'm lacking a proper test env, (or at least in my single vcenter / esx I cant reproduce the problem).

anyone got a setup that I could access / use for testing?

Actions #8

Updated by Jason Ashby over 11 years ago

Ohad Levy wrote:

at the moment I'm lacking a proper test env, (or at least in my single vcenter / esx I cant reproduce the problem).

anyone got a setup that I could access / use for testing?

Unfortunately, I can't offer mine up, but I'm happy to do some deeper troubleshooting if you can give me a list of things to try.

Actions #9

Updated by Miles Monteleone over 11 years ago

Same here. No chance my company would provide access to our ESX environment. Tell me what I can do and I'll do it.

Jason Ashby wrote:

Ohad Levy wrote:

at the moment I'm lacking a proper test env, (or at least in my single vcenter / esx I cant reproduce the problem).

anyone got a setup that I could access / use for testing?

Unfortunately, I can't offer mine up, but I'm happy to do some deeper troubleshooting if you can give me a list of things to try.

Actions #10

Updated by Branden Timm over 11 years ago

Having the exact same issues here with Foreman 1.0.1 and vSphere 5.1. I set the logging level to debug in my Rails environment file and got a more complete stack trace than what was posted above:

Operation FAILED: undefined method `[]=' for nil:NilClass
/usr/lib/ruby/gems/1.8/gems/rbvmomi-1.5.1/lib/rbvmomi/vim/Folder.rb:192:in `inventory'
/usr/lib/ruby/gems/1.8/gems/rbvmomi-1.5.1/lib/rbvmomi/vim/Folder.rb:189:in `each'
/usr/lib/ruby/gems/1.8/gems/rbvmomi-1.5.1/lib/rbvmomi/vim/Folder.rb:189:in `inventory'
/usr/lib/ruby/gems/1.8/gems/fog-1.4.0/lib/fog/vsphere/requests/compute/list_virtual_machines.rb:95:in `list_all_virtual_machine_mobs'
/usr/lib/ruby/gems/1.8/gems/fog-1.4.0/lib/fog/vsphere/requests/compute/list_virtual_machines.rb:94:in `each'
/usr/lib/ruby/gems/1.8/gems/fog-1.4.0/lib/fog/vsphere/requests/compute/list_virtual_machines.rb:94:in `list_all_virtual_machine_mobs'
/usr/lib/ruby/gems/1.8/gems/fog-1.4.0/lib/fog/vsphere/requests/compute/list_virtual_machines.rb:75:in `list_all_virtual_machines'
/usr/lib/ruby/gems/1.8/gems/fog-1.4.0/lib/fog/vsphere/requests/compute/list_virtual_machines.rb:14:in `list_virtual_machines'
/usr/lib/ruby/gems/1.8/gems/fog-1.4.0/lib/fog/vsphere/models/compute/servers.rb:19:in `all'
/usr/share/foreman/app/controllers/compute_resources_vms_controller.rb:6:in `index'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/abstract_controller/base.rb:150:in `process_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_controller/metal/rendering.rb:11:in `process_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/abstract_controller/callbacks.rb:18:in `process_action'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.15/lib/active_support/callbacks.rb:485:in `_run__1194565028__process_action__1891903405__callbacks'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.15/lib/active_support/callbacks.rb:221:in `_conditional_callback_around_3108'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.15/lib/active_support/callbacks.rb:331:in `around'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.15/lib/active_support/callbacks.rb:315:in `send'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.15/lib/active_support/callbacks.rb:315:in `_callback_around_13'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.15/lib/active_support/callbacks.rb:220:in `_conditional_callback_around_3108'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.15/lib/active_support/callbacks.rb:436:in `_run__1194565028__process_action__1891903405__callbacks'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.15/lib/active_support/callbacks.rb:410:in `send'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.15/lib/active_support/callbacks.rb:410:in `_run_process_action_callbacks'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.15/lib/active_support/callbacks.rb:94:in `send'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.15/lib/active_support/callbacks.rb:94:in `run_callbacks'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/abstract_controller/callbacks.rb:17:in `process_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_controller/metal/rescue.rb:17:in `process_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.15/lib/active_support/notifications.rb:52:in `instrument'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.15/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.15/lib/active_support/notifications.rb:52:in `instrument'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/abstract_controller/base.rb:119:in `process'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/abstract_controller/rendering.rb:41:in `process'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_controller/metal.rb:138:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_controller/metal.rb:178:in `action'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_dispatch/routing/route_set.rb:68:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_dispatch/routing/route_set.rb:68:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_dispatch/routing/route_set.rb:33:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb:148:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:93:in `recognize'
/usr/lib/ruby/gems/1.8/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:82:in `optimized_each'
/usr/lib/ruby/gems/1.8/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:92:in `recognize'
/usr/lib/ruby/gems/1.8/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb:139:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_dispatch/routing/route_set.rb:499:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_dispatch/middleware/head.rb:14:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.2.5/lib/rack/methodoverride.rb:24:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_dispatch/middleware/flash.rb:182:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_dispatch/middleware/cookies.rb:302:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.15/lib/active_record/query_cache.rb:32:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.15/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.15/lib/active_record/query_cache.rb:12:in `cache'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.15/lib/active_record/query_cache.rb:31:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:354:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_dispatch/middleware/callbacks.rb:46:in `call'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.15/lib/active_support/callbacks.rb:416:in `_run_call_callbacks'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_dispatch/middleware/callbacks.rb:44:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.2.5/lib/rack/sendfile.rb:106:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
/usr/lib/ruby/gems/1.8/gems/railties-3.0.15/lib/rails/rack/logger.rb:13:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.2.5/lib/rack/runtime.rb:17:in `call'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.15/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.2.5/lib/rack/lock.rb:13:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.2.5/lib/rack/lock.rb:13:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rack-1.2.5/lib/rack/lock.rb:13:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.15/lib/action_dispatch/middleware/static.rb:30:in `call'
/usr/lib/ruby/gems/1.8/gems/railties-3.0.15/lib/rails/application.rb:168:in `call'
/usr/lib/ruby/gems/1.8/gems/railties-3.0.15/lib/rails/application.rb:77:in `send'
/usr/lib/ruby/gems/1.8/gems/railties-3.0.15/lib/rails/application.rb:77:in `method_missing'
/usr/lib/ruby/gems/1.8/gems/rack-1.2.5/lib/rack/urlmap.rb:47:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.2.5/lib/rack/urlmap.rb:41:in `each'
/usr/lib/ruby/gems/1.8/gems/rack-1.2.5/lib/rack/urlmap.rb:41:in `call'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb:206:in `start_request_handler'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb:171:in `send'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb:171:in `handle_spawn_application'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/utils.rb:479:in `safe_fork'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb:166:in `handle_spawn_application'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb:180:in `start'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/rack/application_spawner.rb:129:in `start'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb:253:in `spawn_rack_application'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb:246:in `spawn_rack_application'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.12/helper-scripts/passenger-spawn-server:99
Rendered common/500.rhtml (3.2ms)
Completed 500 Internal Server Error in 10639ms (Views: 4.9ms | ActiveRecord: 1.4ms)

I also cannot offer up my vSphere environment for testing but am willing to try whatever.

FWIW, I believe you can virtualize ESXi itself - meaning you could probably make a reasonable test environment with 1 vcenter vm and one ESXi vm.

Actions #11

Updated by Ohad Levy over 11 years ago

  • Category changed from Host creation to VM management
  • Status changed from Pending to New

I've just sent a quick fix for the vm listing error mentioned here https://github.com/fog/fog/pull/1229/

Actions #12

Updated by Branden Timm over 11 years ago

I can confirm that this seems to have fixed (or improved) the issue after switching bundler.d/fob.rb to use master instead of >= 1.4. At least a partial list of VMs are being returned now.

Actions #13

Updated by Branden Timm over 11 years ago

Sorry, typo there - obviously it's bundler.d/fog.rb, not fob.rb

Actions #14

Updated by Miles Monteleone over 11 years ago

Branden Timm wrote:

I can confirm that this seems to have fixed (or improved) the issue after switching bundler.d/fob.rb to use master instead of >= 1.4. At least a partial list of VMs are being returned now.

Same here, but only 3 VMs are returned, which are all in the root level of their respective datacenters. Seems that VCenter folders are not being traversed.

Thanks for the work on this Ohad! This is very cool to see in Foreman; I only wish I had better ruby dev skills so I could help out more :\

Actions #15

Updated by Ohad Levy over 11 years ago

I just finished a working POC for this :) so its perfect timing.

in order to test this, you would need to checkout https://github.com/ohadlevy/foreman/tree/vmware

(make sure you pull the vmware branch from my github).

Please let us know if it works

Actions #16

Updated by Miles Monteleone over 11 years ago

Thanks Ohad! I checked out the vmware branch but Foreman is still only displaying top-level VMs.

Ohad Levy wrote:

I just finished a working POC for this :) so its perfect timing.

in order to test this, you would need to checkout https://github.com/ohadlevy/foreman/tree/vmware

(make sure you pull the vmware branch from my github).

Please let us know if it works

Actions #17

Updated by Ohad Levy over 11 years ago

Miles Monteleone wrote:

Thanks Ohad! I checked out the vmware branch but Foreman is still only displaying top-level VMs.

actually what i fixed was vm creation, not so much of the listing.. I'll try to see if i can fix that, but I'm guessing that would be in another ticket :)

after you could create vm's from foreman directly, you dont really need to browse the VMS via the compute resource (as all of the info would be avail under the hosts tab).

If you aready have it running, can you try creating a vm and see if it works currectly (network, datastore etc)

thanks!

Actions #18

Updated by Miles Monteleone over 11 years ago

Ohad Levy wrote:

Miles Monteleone wrote:

Thanks Ohad! I checked out the vmware branch but Foreman is still only displaying top-level VMs.

actually what i fixed was vm creation, not so much of the listing.. I'll try to see if i can fix that, but I'm guessing that would be in another ticket :)

after you could create vm's from foreman directly, you dont really need to browse the VMS via the compute resource (as all of the info would be avail under the hosts tab).

If you aready have it running, can you try creating a vm and see if it works currectly (network, datastore etc)

thanks!

Understood! I'm going to give it a whirl.

Actions #19

Updated by Ohad Levy over 11 years ago

  • Status changed from New to Resolved
  • Assignee set to Ohad Levy
  • Target version set to 1.1

Pull request at
https://github.com/theforeman/foreman/pull/242

This requests adds the ability to create VM's on VCenter (and hopefully ESX too) - please test!! :)

Actions

Also available in: Atom PDF