Create VM on VMWare ESX

The initial error why we tried different versions from github was:

Started POST "/hosts/compute_resource_selected" for 172.20.34.1 at Tue Mar
19 16:41:24 +0100 2013
Processing by HostsController#compute_resource_selected as
Parameters: {"architecture_id"=>"", "compute_resource_id"=>"2",
"operatingsystem_id"=>""}
User Load (0.5ms) SELECT users.* FROM users WHERE users.id = 1
LIMIT 1
Setting current user thread-local variable to admin
Setting Load (0.4ms) SELECT settings.* FROM settings WHERE
settings.name = 'authorize_login_delegation' ORDER BY LOWER(
settings.name)
LIMIT 1
CACHE (0.0ms) SELECT settings.* FROM settings WHERE
settings.name = 'authorize_login_delegation' ORDER BY LOWER(setting
s.name) LIMIT
1
ComputeResource Load (0.4ms) SELECT compute_resources.* FROM
compute_resources WHERE compute_resources.id = 2 ORDER BY

LOWER(compute_resources.name) LIMIT 1
Rendered compute_resources_vms/form/vmware/_network.html.erb (59.9ms)
Rendered compute_resources_vms/form/_vmware.html.erb (430.0ms)
Rendered hosts/_compute.html.erb (496.3ms)
Operation FAILED: undefined method []' for nil:NilClass /usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/compute.rb:155:inmanaged_obj_id'
/usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/requests/compute/list_networks.rb:23:in
network_attributes' /usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/requests/compute/list_networks.rb:11:inlist_networks'
/usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/requests/compute/list_networks.rb:9:in
map' /usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/requests/compute/list_networks.rb:9:inlist_networks'
/usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/models/compute/networks.rb:14:in
all' /usr/share/foreman/lib/foreman/model/vmware.rb:55:innetworks'
/usr/share/foreman/app/views/compute_resources_vms/form/vmware/_network.html.erb:2:in
`_app_views_compute_resources_vms_form_vmwar

e__network_html_erb___513155592_70101847862960_16195308'

every time we select our esx host in the create new host tab.

··· Am Dienstag, 19. März 2013 16:21:26 UTC+1 schrieb barmeni...@googlemail.com: > > greetings, > > in our POC we try to create a vm host on vmware esx with foreman. We > started with foreman 1.1 stable rpm on centos 6.2 and found out that > there were knows issues during the deploy on esx server. > http://projects.theforeman.org/issues/1589 > > so we tried to install the the patched version > https://github.com/ohadlevy/foreman/tree/vmware > put until now we are unable to get it to work. > > we worked arround the errors > > https://github.com/ohadlevy/fog.git (at vmware) is not checked out. > Please run `bundle install` (is installed, even linked, but still not found > by passenger) > Could not find gem 'ruby-debug19 (removed it from environment.rb) > > At the moment we are facing this error: > Error converting value for param 'hostcert': Error converting value for > param 'certdir': Error converting value for param 'ssldir': Could not find > value for $confdir > > Any ideas or suggestions which version of foreman is valid for deploying > vm hosts on esx server. > > greetings > daniel >

> The initial error why we tried different versions from github was:
>
> Started POST "/hosts/compute_resource_selected" for 172.20.34.1 at Tue Mar
> 19 16:41:24 +0100 2013
> Processing by HostsController#compute_resource_selected as
> Parameters: {"architecture_id"=>"", "compute_resource_id"=>"2",
> "operatingsystem_id"=>""}
> User Load (0.5ms) SELECT users.* FROM users WHERE users.id = 1
> LIMIT 1
> Setting current user thread-local variable to admin
> Setting Load (0.4ms) SELECT settings.* FROM settings WHERE
> settings.name = 'authorize_login_delegation' ORDER BY LOWER(
> settings.name)
> LIMIT 1
> CACHE (0.0ms) SELECT settings.* FROM settings WHERE
> settings.name = 'authorize_login_delegation' ORDER BY LOWER(setting
> s.name)
> LIMIT 1
> ComputeResource Load (0.4ms) SELECT compute_resources.* FROM
> compute_resources WHERE compute_resources.id = 2 ORDER BY
> LOWER(
> compute_resources.name) LIMIT 1
> Rendered compute_resources_vms/form/vmware/_network.html.erb (59.9ms)
> Rendered compute_resources_vms/form/_vmware.html.erb (430.0ms)
> Rendered hosts/_compute.html.erb (496.3ms)
> Operation FAILED: undefined method []' for nil:NilClass > /usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/compute.rb:155:in > managed_obj_id'
> /usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/requests/compute/list_networks.rb:23:in
> network_attributes' > /usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/requests/compute/list_networks.rb:11:in > list_networks'
> /usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/requests/compute/list_networks.rb:9:in
> map' > /usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/requests/compute/list_networks.rb:9:in > list_networks'
> /usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/models/compute/networks.rb:14:in
> all' > /usr/share/foreman/lib/foreman/model/vmware.rb:55:in networks'
> /usr/share/foreman/app/views/compute_resources_vms/form/vmware/_network.html.erb:2:in
> _app_views_compute_resources_vms_form_vmwar > > e__network_html_erb___513155592_70101847862960_16195308' > > every time we select our esx host in the create new host tab. > > > >> greetings, >> >> in our POC we try to create a vm host on vmware esx with foreman. We >> started with foreman 1.1 stable rpm on centos 6.2 and found out that >> there were knows issues during the deploy on esx server. >> http://projects.theforeman.**org/issues/1589<http://projects.theforeman.org/issues/1589> >> >> so we tried to install the the patched version https://github.com/** >> ohadlevy/foreman/tree/vmware<https://github.com/ohadlevy/foreman/tree/vmware> >> put until now we are unable to get it to work. >> >> we worked arround the errors >> >> https://github.com/ohadlevy/**fog.git<https://github.com/ohadlevy/fog.git>(at vmware) is not checked out. Please run bundle install` (is installed,
>> even linked, but still not found by passenger)
>> Could not find gem 'ruby-debug19 (removed it from environment.rb)
>>
>> At the moment we are facing this error:
>> Error converting value for param 'hostcert': Error converting value for
>> param 'certdir': Error converting value for param 'ssldir': Could not find
>> value for $confdir
>>
>> Any ideas or suggestions which version of foreman is valid for deploying
>> vm hosts on esx server.
>>
>>

  1. I suggest using github fog repo, my repo is not maintained, and mostly
    out of date at the moment.
  2. the patch you described, make sense if you dont use clusters, its a
    oneliner, and i suggest you change it on the latest official fog that
    foreman uses (1.10).
  3. the last issue was discussed on IRC and is actually another bug in fog,
    it seems related to dots or whitespaces in your vmware network name - see
    https://github.com/fog/fog/issues/1671

Ohad

··· On Tue, Mar 19, 2013 at 5:44 PM, wrote: > Am Dienstag, 19. März 2013 16:21:26 UTC+1 schrieb > barmeni...@googlemail.com:

greetings

daniel


You received this message because you are subscribed to the Google Groups
“Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Marc, Ohad,

thanks for the updates. Running now with foreman-1.1-stable rpm and fog
gems git://github.com/grimme-atix-de/fog.git.

Changed the network name and removed all spaces, now it's working.

thanks

greetings

daniel

··· Am Mittwoch, 20. März 2013 10:12:02 UTC+1 schrieb Marc Grimme: > > Hi, > have a look at this pull request https://github.com/fog/fog/pull/1680. It > might fix the problem. > > IMHO the regular expression for parsing the obj_ids is failing if blanks > are in it. It cannot match with the regexp: > /\("(\S+)"\)/ > as \S excludes blanks. > So I'd suggest to change it to: > /\("([^"]+)"\)/ > which means go to the next " to match the obj_id. > > Hope this makes somehow sense. > At least my tests are still working after that change. > > Let me know what you think. > Regards Marc. > > Am Dienstag, 19. März 2013 22:59:18 UTC+1 schrieb ohad: >> >> >> >> On Tue, Mar 19, 2013 at 5:44 PM, wrote: >> >>> The initial error why we tried different versions from github was: >>> >>> Started POST "/hosts/compute_resource_selected" for 172.20.34.1 at Tue >>> Mar 19 16:41:24 +0100 2013 >>> Processing by HostsController#compute_resource_selected as >>> Parameters: {"architecture_id"=>"", "compute_resource_id"=>"2", >>> "operatingsystem_id"=>""} >>> User Load (0.5ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = >>> 1 LIMIT 1 >>> Setting current user thread-local variable to admin >>> Setting Load (0.4ms) SELECT `settings`.* FROM `settings` WHERE >>> `settings`.`name` = 'authorize_login_delegation' ORDER BY LOWER( >>> settings.name) >>> LIMIT 1 >>> CACHE (0.0ms) SELECT `settings`.* FROM `settings` WHERE >>> `settings`.`name` = 'authorize_login_delegation' ORDER BY LOWER(setting >>> s.name) >>> LIMIT 1 >>> ComputeResource Load (0.4ms) SELECT `compute_resources`.* FROM >>> `compute_resources` WHERE `compute_resources`.`id` = 2 ORDER BY >>> LOWER( >>> compute_resources.name) LIMIT 1 >>> Rendered compute_resources_vms/form/vmware/_network.html.erb (59.9ms) >>> Rendered compute_resources_vms/form/_vmware.html.erb (430.0ms) >>> Rendered hosts/_compute.html.erb (496.3ms) >>> Operation FAILED: undefined method `[]' for nil:NilClass >>> /usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/compute.rb:155:in >>> `managed_obj_id' >>> /usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/requests/compute/list_networks.rb:23:in >>> `network_attributes' >>> /usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/requests/compute/list_networks.rb:11:in >>> `list_networks' >>> /usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/requests/compute/list_networks.rb:9:in >>> `map' >>> /usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/requests/compute/list_networks.rb:9:in >>> `list_networks' >>> /usr/lib/ruby/gems/1.8/gems/fog-1.9.0/lib/fog/vsphere/models/compute/networks.rb:14:in >>> `all' >>> /usr/share/foreman/lib/foreman/model/vmware.rb:55:in `networks' >>> /usr/share/foreman/app/views/compute_resources_vms/form/vmware/_network.html.erb:2:in >>> `_app_views_compute_resources_vms_form_vmwar >>> >>> e__network_html_erb___513155592_70101847862960_16195308' >>> >>> every time we select our esx host in the create new host tab. >>> >>> >>> Am Dienstag, 19. März 2013 16:21:26 UTC+1 schrieb >>> barmeni...@googlemail.com: >>> >>>> greetings, >>>> >>>> in our POC we try to create a vm host on vmware esx with foreman. We >>>> started with foreman 1.1 stable rpm on centos 6.2 and found out that >>>> there were knows issues during the deploy on esx server. >>>> http://projects.theforeman.**org/issues/1589 >>>> >>>> so we tried to install the the patched version https://github.com/** >>>> ohadlevy/foreman/tree/vmware >>>> put until now we are unable to get it to work. >>>> >>>> we worked arround the errors >>>> >>>> https://github.com/ohadlevy/**fog.git(at vmware) is not checked out. Please run `bundle install` (is installed, >>>> even linked, but still not found by passenger) >>>> Could not find gem 'ruby-debug19 (removed it from environment.rb) >>>> >>>> At the moment we are facing this error: >>>> Error converting value for param 'hostcert': Error converting value for >>>> param 'certdir': Error converting value for param 'ssldir': Could not find >>>> value for $confdir >>>> >>>> Any ideas or suggestions which version of foreman is valid for >>>> deploying vm hosts on esx server. >>>> >>>> >> 1. I suggest using github fog repo, my repo is not maintained, and mostly >> out of date at the moment. >> 2. the patch you described, make sense if you dont use clusters, its a >> oneliner, and i suggest you change it on the latest official fog that >> foreman uses (1.10). >> 3. the last issue was discussed on IRC and is actually another bug in >> fog, it seems related to dots or whitespaces in your vmware network name - >> see https://github.com/fog/fog/issues/1671 >> >> Ohad >> >>> greetings >>>> daniel >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Foreman users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to foreman-user...@googlegroups.com. >>> To post to this group, send email to forema...@googlegroups.com. >>> Visit this group at http://groups.google.com/group/foreman-users?hl=en. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >>