Foreman - VMware - Template Provisioning - all authorization methods failed (tried password)

Hi All,

I'm trying to create new VM from VMware template and it stuck on the ssh
part:

all authorization methods failed (tried password)
negotiating protocol version
got KEXINIT from server
sending KEXINIT
negotiating algorithms
Creating scope :completer_scope. Overwriting existing method Organization.
completer_scope.
Creating scope :completer_scope. Overwriting existing method Location.
completer_scope.

puppet - CentOS release 6.6 (Final)
Use your Domain Admin/Account to login!

*puppet *is my Puppet\Foreman server.

I'm able to create server from PXE installation without any problem. But
when trying to create from Template it gets this error. It even not get to
Finish Template.
If more info is needed lease let me know.

Please assist.

I found this thread but it wasn't helpful:

https://groups.google.com/forum/#!topic/foreman-users/xANy5i4jf-8

··· On Thursday, April 30, 2015 at 12:10:02 PM UTC+3, Eddie Mashayev wrote: > > Hi All, > > I'm trying to create new VM from VMware template and it stuck on the ssh > part: > > all authorization methods failed (tried password) > negotiating protocol version > got KEXINIT from server > sending KEXINIT > negotiating algorithms > Creating scope :completer_scope. Overwriting existing method Organization. > completer_scope. > Creating scope :completer_scope. Overwriting existing method Location. > completer_scope. > > > puppet - CentOS release 6.6 (Final) > Use your Domain Admin/Account to login! > > > *puppet *is my Puppet\Foreman server. > > I'm able to create server from PXE installation without any problem. But > when trying to create from Template it gets this error. It even not get to > Finish Template. > If more info is needed lease let me know. > > > Please assist. > >

> I'm trying to create new VM from VMware template and it stuck on the ssh
> part:
>
> >
> all authorization methods failed (tried password)
[snip]
>
> I'm able to create server from PXE installation without any problem. But
> when trying to create from Template it gets this error. It even not get
> to Finish Template.

Check the username and password you set in the image under the Compute
Resource in Foreman, and double check your image actually has that
user/pass set up. Perhaps it's simply failing to log in?

··· On 30/04/15 10:09, Eddie Mashayev wrote:


Dominic Cleal
Red Hat Engineering

Hi Dominic,

I checked it already.
The image have user root/root1234 and the same configured in
"Compute Resource in Foreman"(root/root1234).

I can't understand why it shows error regrading my Foreman server when I
try to provisining from template:
This is my foreman server /etc/motd why it promp?

"puppet - CentOS release 6.6 (Final)
Use your Domain Admin/Account to login"

Just to clarify my Foreman server can't be ssh with root directly only with
Domain user and after that you can switch to root(sudo su -).

··· On Friday, May 1, 2015 at 10:53:34 AM UTC+3, Dominic Cleal wrote: > > On 30/04/15 10:09, Eddie Mashayev wrote: > > I'm trying to create new VM from VMware template and it stuck on the ssh > > part: > > > > > > > all authorization methods failed (tried password) > [snip] > > > > I'm able to create server from PXE installation without any problem. But > > when trying to create from Template it gets this error. It even not get > > to Finish Template. > > Check the username and password you set in the image under the Compute > Resource in Foreman, and double check your image actually has that > user/pass set up. Perhaps it's simply failing to log in? > > -- > Dominic Cleal > Red Hat Engineering >

Hi,

Just to update.

I found the issue - when I'm using fixed IP in the template instead of DHCP
and inserting the same IP in Network section it works.
It leads to other question - Why DHCP not working?

Any ideas?

··· On Friday, May 1, 2015 at 1:22:27 PM UTC+3, Eddie Mashayev wrote: > > Hi Dominic, > > I checked it already. > The image have user root/root1234 and the same configured in > "Compute Resource in Foreman"(root/root1234). > > I can't understand why it shows error regrading my Foreman server when I > try to provisining from template: > This is my foreman server /etc/motd why it promp? > > "puppet - CentOS release 6.6 (Final) > Use your Domain Admin/Account to login" > > Just to clarify my Foreman server can't be ssh with root directly only > with Domain user and after that you can switch to root(sudo su -). > > > > > On Friday, May 1, 2015 at 10:53:34 AM UTC+3, Dominic Cleal wrote: >> >> On 30/04/15 10:09, Eddie Mashayev wrote: >> > I'm trying to create new VM from VMware template and it stuck on the >> ssh >> > part: >> > >> > > >> > all authorization methods failed (tried password) >> [snip] >> > >> > I'm able to create server from PXE installation without any problem. >> But >> > when trying to create from Template it gets this error. It even not get >> > to Finish Template. >> >> Check the username and password you set in the image under the Compute >> Resource in Foreman, and double check your image actually has that >> user/pass set up. Perhaps it's simply failing to log in? >> >> -- >> Dominic Cleal >> Red Hat Engineering >> >

Hi Dominic,

I thought it will be solved in the next releases (I'm working with Foreman
1.9.3) but still the same issue?
For some reason if I’m giving static IP to the Template image and then
inserting the same IP in the: New host > Interface > Server IP, it working
for me and the finish templates is working.

Maybe it’s related to error I get when trying to suggest new DHCP IP ->
“Error generating IP: Not Found”

> Started POST "/subnets/freeip" for 10.2.152.29 at 2015-11-30 11:20:09 +
0200
2015-11-30 11:20:09 [app] [I] Processing by SubnetsController#freeip as
JSON
2015-11-30 11:20:09 [app] [I] Parameters: {"subnet_id"=>"3", "host_mac"=>"",
"location_id"=>"1", "taken_ips"=>["", "Error generating IP: Not Found"]}
2015-11-30 11:20:09 [app] [I] Rendered common/404.html.erb within layouts/application
(2.8ms)
2015-11-30 11:20:09 [app] [I] Rendered home/_user_dropdown.html.erb (3.3ms)
2015-11-30 11:20:09 [app] [I] Read fragment views/tabs_and_title_records-9 (
0.3ms)
2015-11-30 11:20:09 [app] [I] Rendered home/_topbar.html.erb (5.3ms)
2015-11-30 11:20:09 [app] [I] Rendered layouts/base.html.erb (8.2ms)
2015-11-30 11:20:09 [app] [I] Completed 404 Not Found in 51ms (Views: 16.3ms
> ActiveRecord: 5.1ms)
2015-11-30 11:20:10 [app] [I]

Why dhcp is not working for me?
Can you help me here?

··· On Tuesday, May 5, 2015 at 3:50:46 PM UTC+3, Eddie Mashayev wrote: > > Hi, > > Just to update. > > I found the issue - when I'm using fixed IP in the template instead of > DHCP and inserting the same IP in Network section it works. > It leads to other question - Why DHCP not working? > > Any ideas? > > On Friday, May 1, 2015 at 1:22:27 PM UTC+3, Eddie Mashayev wrote: >> >> Hi Dominic, >> >> I checked it already. >> The image have user root/root1234 and the same configured in >> "Compute Resource in Foreman"(root/root1234). >> >> I can't understand why it shows error regrading my Foreman server when I >> try to provisining from template: >> This is my foreman server /etc/motd why it promp? >> >> "puppet - CentOS release 6.6 (Final) >> Use your Domain Admin/Account to login" >> >> Just to clarify my Foreman server can't be ssh with root directly only >> with Domain user and after that you can switch to root(sudo su -). >> >> >> >> >> On Friday, May 1, 2015 at 10:53:34 AM UTC+3, Dominic Cleal wrote: >>> >>> On 30/04/15 10:09, Eddie Mashayev wrote: >>> > I'm trying to create new VM from VMware template and it stuck on the >>> ssh >>> > part: >>> > >>> > > >>> > all authorization methods failed (tried password) >>> [snip] >>> > >>> > I'm able to create server from PXE installation without any problem. >>> But >>> > when trying to create from Template it gets this error. It even not >>> get >>> > to Finish Template. >>> >>> Check the username and password you set in the image under the Compute >>> Resource in Foreman, and double check your image actually has that >>> user/pass set up. Perhaps it's simply failing to log in? >>> >>> -- >>> Dominic Cleal >>> Red Hat Engineering >>> >>

A 404 response probably means it isn't configured properly. If it's
meant to be using DHCP, then ensure you have a DHCP smart proxy assigned
to the subnet (under Infra > Subnets > Proxies) and the IPAM mode on the
subnet is set to DHCP too. Check the smart proxy log file as it will
log about the request.

You can also enable debug logging to get more information, i.e. to see
if it's querying the DHCP smart proxy or using an internal DB IPAM mode.
See Foreman :: Manual.

··· On 30/11/15 10:15, Eddie Mashayev wrote: > Hi Dominic, > > I thought it will be solved in the next releases (I'm working with > Foreman 1.9.3) but still the same issue? > For some reason if I’m giving static IP to the Template image and then > inserting the same IP in the: New host > Interface > Server IP, it > working for me and the finish templates is working. > > Maybe it’s related to error I get when trying to suggest new DHCP IP -> > “Error generating IP: Not Found” > > > > >StartedPOST "/subnets/freeip"for10.2.152.29at 2015-11-3011:20:09+0200 > 2015-11-3011:20:09[app][I]ProcessingbySubnetsController#freeip as JSON > 2015-11-3011:20:09[app][I]Parameters:{"subnet_id"=>"3","host_mac"=>"","location_id"=>"1","taken_ips"=>["","Error > generating IP: Not Found"]} > 2015-11-3011:20:09[app][I]Renderedcommon/404.html.erb within > layouts/application (2.8ms) > 2015-11-3011:20:09[app][I]Renderedhome/_user_dropdown.html.erb (3.3ms) > 2015-11-3011:20:09[app][I]Readfragment views/tabs_and_title_records-9(0.3ms) > 2015-11-3011:20:09[app][I]Renderedhome/_topbar.html.erb (5.3ms) > 2015-11-3011:20:09[app][I]Renderedlayouts/base.html.erb (8.2ms) > 2015-11-3011:20:09[app][I]Completed404NotFoundin51ms(Views:16.3ms|ActiveRecord:5.1ms) > 2015-11-3011:20:10[app][I]


Dominic Cleal
dominic@cleal.org

Thanks Dominic!! It fixed my problem.

··· On Monday, November 30, 2015 at 12:43:55 PM UTC+2, Dominic Cleal wrote: > > On 30/11/15 10:15, Eddie Mashayev wrote: > > Hi Dominic, > > > > I thought it will be solved in the next releases (I'm working with > > Foreman 1.9.3) but still the same issue? > > For some reason if I’m giving static IP to the Template image and then > > inserting the same IP in the: New host > Interface > Server IP, it > > working for me and the finish templates is working. > > > > Maybe it’s related to error I get when trying to suggest new DHCP IP -> > > “Error generating IP: Not Found” > > > > > > > >StartedPOST "/subnets/freeip"for10.2.152.29at 2015-11-3011:20:09+0200 > > 2015-11-3011:20:09[app][I]ProcessingbySubnetsController#freeip as JSON > > > 2015-11-3011:20:09[app][I]Parameters:{"subnet_id"=>"3","host_mac"=>"","location_id"=>"1","taken_ips"=>["","Error > > > generating IP: Not Found"]} > > 2015-11-3011:20:09[app][I]Renderedcommon/404.html.erb within > > layouts/application (2.8ms) > > 2015-11-3011:20:09[app][I]Renderedhome/_user_dropdown.html.erb (3.3ms) > > 2015-11-3011:20:09[app][I]Readfragment > views/tabs_and_title_records-9(0.3ms) > > 2015-11-3011:20:09[app][I]Renderedhome/_topbar.html.erb (5.3ms) > > 2015-11-3011:20:09[app][I]Renderedlayouts/base.html.erb (8.2ms) > > > 2015-11-3011:20:09[app][I]Completed404NotFoundin51ms(Views:16.3ms|ActiveRecord:5.1ms) > > > 2015-11-3011:20:10[app][I] > > A 404 response probably means it isn't configured properly. If it's > meant to be using DHCP, then ensure you have a DHCP smart proxy assigned > to the subnet (under Infra > Subnets > Proxies) and the IPAM mode on the > subnet is set to DHCP too. Check the smart proxy log file as it will > log about the request. > > You can also enable debug logging to get more information, i.e. to see > if it's querying the DHCP smart proxy or using an internal DB IPAM mode. > See http://theforeman.org/manuals/1.9/index.html#7.2Debugging. > > -- > Dominic Cleal > dom...@cleal.org >