Hypervisor error

Hi,

I am not able to add an esx hypervisor to foreman. Here is the what I
get:

Browser:
Unable to save
Unable to connect to Hypervisor: wrong number of arguments (2 for 1)

Here is the output of the production log:

Processing HypervisorsController#create (for 10.0.34.176 at 2012-03-17
14:28:52) [POST]
Parameters: {"hypervisor"=>{"kind"=>"libvirt",
"name"=>"napcloud204.wonka.net", "hyperuser"=>"root", "uri"=>"esx://
10.60.5.204?no_verify=1", "hyperpass"=>"g0l1v3!"}, "commit"=>"Submit",
"authenticity_token"=>"bFPeTwrYwee/hJZtLboVUuXI+ROhr9R0CUtm4tlytqw="}
User Load (0.2ms) SELECT * FROM users WHERE (users.id = 1)
Setting current user thread-local variable to admin
Hypervisor Columns (0.7ms) SHOW FIELDS FROM hypervisors
SQL (0.1ms) BEGIN
Hypervisor Load (0.2ms) SELECT hypervisors.id FROM hypervisors
WHERE (hypervisors.name = BINARY 'napcloud204.wonka.net') LIMIT 1
Hypervisor Load (0.1ms) SELECT hypervisors.id FROM hypervisors
WHERE (hypervisors.uri = BINARY 'esx://10.60.5.204?no_verify=1')
LIMIT 1
trying to contact Hypervisor napcloud204.wonka.net
Failed to connect to hypervisor napcloud204.wonka.net - wrong number
of arguments (2 for 1)
Closing connection to napcloud204.wonka.net
SQL (0.1ms) ROLLBACK
Failed to save: Unable to connect to Hypervisor: wrong number of
arguments (2 for 1)
Rendering template within layouts/application
Rendering hypervisors/new
Rendered hypervisors/_form (9.2ms)
Bookmark Load (0.2ms) SELECT * FROM bookmarks ORDER BY name
Bookmark Columns (0.4ms) SHOW FIELDS FROM bookmarks
Rendered bookmarks/_list (2.7ms)
Rendered bookmarks/_list (0.4ms)
Rendered home/_settings (33.1ms)
Rendered home/_topbar (45.6ms)
Completed in 276ms (View: 65, DB: 3) | 200 OK [http://
foreman.wonka.net/hypervisors]

I don't think the patch I submitted was every merged. You can still use the patch, but you will need my version of virt.

IMHO, I didn't really find the esx virt integration all that stable. It does work though and definitely good for development environments but just don't install on your production systems.

If I get a chance I'll try and clean up my virt repo so its less confusing.

Have a look at : ESX Integration - Foreman

Corey Osman
corey@logicminds.biz

Green IT and Datacenter Automation Specialist

··· On Mar 17, 2012, at 2:31 PM, Robert Tsai wrote:

Hi,

I am not able to add an esx hypervisor to foreman. Here is the what I
get:

Browser:
Unable to save
Unable to connect to Hypervisor: wrong number of arguments (2 for 1)

Here is the output of the production log:

Processing HypervisorsController#create (for 10.0.34.176 at 2012-03-17
14:28:52) [POST]
Parameters: {“hypervisor”=>{“kind”=>“libvirt”,
“name”=>“napcloud204.wonka.net”, “hyperuser”=>“root”, “uri”=>“esx://
10.60.5.204?no_verify=1”, “hyperpass”=>“g0l1v3!”}, “commit”=>“Submit”,
“authenticity_token”=>“bFPeTwrYwee/hJZtLboVUuXI+ROhr9R0CUtm4tlytqw=”}
User Load (0.2ms) SELECT * FROM users WHERE (users.id = 1)
Setting current user thread-local variable to admin
Hypervisor Columns (0.7ms) SHOW FIELDS FROM hypervisors
SQL (0.1ms) BEGIN
Hypervisor Load (0.2ms) SELECT hypervisors.id FROM hypervisors
WHERE (hypervisors.name = BINARY ‘napcloud204.wonka.net’) LIMIT 1
Hypervisor Load (0.1ms) SELECT hypervisors.id FROM hypervisors
WHERE (hypervisors.uri = BINARY ‘esx://10.60.5.204?no_verify=1’)
LIMIT 1
trying to contact Hypervisor napcloud204.wonka.net
Failed to connect to hypervisor napcloud204.wonka.net - wrong number
of arguments (2 for 1)
Closing connection to napcloud204.wonka.net
SQL (0.1ms) ROLLBACK
Failed to save: Unable to connect to Hypervisor: wrong number of
arguments (2 for 1)
Rendering template within layouts/application
Rendering hypervisors/new
Rendered hypervisors/_form (9.2ms)
Bookmark Load (0.2ms) SELECT * FROM bookmarks ORDER BY name
Bookmark Columns (0.4ms) SHOW FIELDS FROM bookmarks
Rendered bookmarks/_list (2.7ms)
Rendered bookmarks/_list (0.4ms)
Rendered home/_settings (33.1ms)
Rendered home/_topbar (45.6ms)
Completed in 276ms (View: 65, DB: 3) | 200 OK [http://
foreman.wonka.net/hypervisors]


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

Hi Corey,

Im running EL5 which maybe the issue.

-Robert

··· On Sat, Mar 17, 2012 at 3:17 PM, Corey Osman wrote:

I don’t think the patch I submitted was every merged. You can still use
the patch, but you will need my version of virt.

IMHO, I didn’t really find the esx virt integration all that stable. It
does work though and definitely good for development environments but just
don’t install on your production systems.

If I get a chance I’ll try and clean up my virt repo so its less confusing.

Have a look at :
ESX Integration - Foreman

Corey Osman
corey@logicminds.biz

Green IT and Datacenter Automation Specialist

On Mar 17, 2012, at 2:31 PM, Robert Tsai wrote:

Hi,

I am not able to add an esx hypervisor to foreman. Here is the what I
get:

Browser:
Unable to save
Unable to connect to Hypervisor: wrong number of arguments (2 for 1)

Here is the output of the production log:

Processing HypervisorsController#create (for 10.0.34.176 at 2012-03-17
14:28:52) [POST]
Parameters: {“hypervisor”=>{“kind”=>“libvirt”,
“name”=>“napcloud204.wonka.net”, “hyperuser”=>“root”, “uri”=>“esx://
10.60.5.204?no_verify=1”, “hyperpass”=>“g0l1v3!”}, “commit”=>“Submit”,
“authenticity_token”=>“bFPeTwrYwee/hJZtLboVUuXI+ROhr9R0CUtm4tlytqw=”}
User Load (0.2ms) SELECT * FROM users WHERE (users.id = 1)
Setting current user thread-local variable to admin
Hypervisor Columns (0.7ms) SHOW FIELDS FROM hypervisors
SQL (0.1ms) BEGIN
Hypervisor Load (0.2ms) SELECT hypervisors.id FROM hypervisors
WHERE (hypervisors.name = BINARY ‘napcloud204.wonka.net’) LIMIT 1
Hypervisor Load (0.1ms) SELECT hypervisors.id FROM hypervisors
WHERE (hypervisors.uri = BINARY ‘esx://10.60.5.204?no_verify=1’)
LIMIT 1
trying to contact Hypervisor napcloud204.wonka.net
Failed to connect to hypervisor napcloud204.wonka.net - wrong number
of arguments (2 for 1)
Closing connection to napcloud204.wonka.net
SQL (0.1ms) ROLLBACK
Failed to save: Unable to connect to Hypervisor: wrong number of
arguments (2 for 1)
Rendering template within layouts/application
Rendering hypervisors/new
Rendered hypervisors/_form (9.2ms)
Bookmark Load (0.2ms) SELECT * FROM bookmarks ORDER BY name
Bookmark Columns (0.4ms) SHOW FIELDS FROM bookmarks
Rendered bookmarks/_list (2.7ms)
Rendered bookmarks/_list (0.4ms)
Rendered home/_settings (33.1ms)
Rendered home/_topbar (45.6ms)
Completed in 276ms (View: 65, DB: 3) | 200 OK [http://
foreman.wonka.net/hypervisors] http://foreman.wonka.net/hypervisors]


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

It really doesn't matter which OS. You just need libvirt > 0.9.1 and my patches.

Did you follow my instructions? EPEL should have newer libvirt rpms by now and libvirt support for ESX 5 was added to RHEL 6.2 I think.

Corey Osman
corey@logicminds.biz
678-348-0582 (Pacific Time)

Green IT and Datacenter Automation Specialist

··· On Mar 17, 2012, at 4:02 PM, Robert Tsai wrote:

Hi Corey,

Im running EL5 which maybe the issue.

-Robert

On Sat, Mar 17, 2012 at 3:17 PM, Corey Osman corey@logicminds.biz wrote:
I don’t think the patch I submitted was every merged. You can still use the patch, but you will need my version of virt.

IMHO, I didn’t really find the esx virt integration all that stable. It does work though and definitely good for development environments but just don’t install on your production systems.

If I get a chance I’ll try and clean up my virt repo so its less confusing.

Have a look at : ESX Integration - Foreman

Corey Osman
corey@logicminds.biz

Green IT and Datacenter Automation Specialist

On Mar 17, 2012, at 2:31 PM, Robert Tsai wrote:

Hi,

I am not able to add an esx hypervisor to foreman. Here is the what I
get:

Browser:
Unable to save
Unable to connect to Hypervisor: wrong number of arguments (2 for 1)

Here is the output of the production log:

Processing HypervisorsController#create (for 10.0.34.176 at 2012-03-17
14:28:52) [POST]
Parameters: {“hypervisor”=>{“kind”=>“libvirt”,
“name”=>“napcloud204.wonka.net”, “hyperuser”=>“root”, “uri”=>“esx://
10.60.5.204?no_verify=1”, “hyperpass”=>“g0l1v3!”}, “commit”=>“Submit”,
“authenticity_token”=>“bFPeTwrYwee/hJZtLboVUuXI+ROhr9R0CUtm4tlytqw=”}
User Load (0.2ms) SELECT * FROM users WHERE (users.id = 1)
Setting current user thread-local variable to admin
Hypervisor Columns (0.7ms) SHOW FIELDS FROM hypervisors
SQL (0.1ms) BEGIN
Hypervisor Load (0.2ms) SELECT hypervisors.id FROM hypervisors
WHERE (hypervisors.name = BINARY ‘napcloud204.wonka.net’) LIMIT 1
Hypervisor Load (0.1ms) SELECT hypervisors.id FROM hypervisors
WHERE (hypervisors.uri = BINARY ‘esx://10.60.5.204?no_verify=1’)
LIMIT 1
trying to contact Hypervisor napcloud204.wonka.net
Failed to connect to hypervisor napcloud204.wonka.net - wrong number
of arguments (2 for 1)
Closing connection to napcloud204.wonka.net
SQL (0.1ms) ROLLBACK
Failed to save: Unable to connect to Hypervisor: wrong number of
arguments (2 for 1)
Rendering template within layouts/application
Rendering hypervisors/new
Rendered hypervisors/_form (9.2ms)
Bookmark Load (0.2ms) SELECT * FROM bookmarks ORDER BY name
Bookmark Columns (0.4ms) SHOW FIELDS FROM bookmarks
Rendered bookmarks/_list (2.7ms)
Rendered bookmarks/_list (0.4ms)
Rendered home/_settings (33.1ms)
Rendered home/_topbar (45.6ms)
Completed in 276ms (View: 65, DB: 3) | 200 OK [http://
foreman.wonka.net/hypervisors]


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


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


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

Ok thanks. I'll have to update EPEL cause libvirt is only showing at 0.8.2. I'll keep you posted on the progress.

··· Sent from my iPhone

On Mar 17, 2012, at 4:08 PM, Corey Osman corey@logicminds.biz wrote:

It really doesn’t matter which OS. You just need libvirt > 0.9.1 and my patches.

Did you follow my instructions? EPEL should have newer libvirt rpms by now and libvirt support for ESX 5 was added to RHEL 6.2 I think.

Corey Osman
corey@logicminds.biz
678-348-0582 (Pacific Time)

Green IT and Datacenter Automation Specialist

On Mar 17, 2012, at 4:02 PM, Robert Tsai wrote:

Hi Corey,

Im running EL5 which maybe the issue.

-Robert

On Sat, Mar 17, 2012 at 3:17 PM, Corey Osman corey@logicminds.biz wrote:
I don’t think the patch I submitted was every merged. You can still use the patch, but you will need my version of virt.

IMHO, I didn’t really find the esx virt integration all that stable. It does work though and definitely good for development environments but just don’t install on your production systems.

If I get a chance I’ll try and clean up my virt repo so its less confusing.

Have a look at : ESX Integration - Foreman

Corey Osman
corey@logicminds.biz

Green IT and Datacenter Automation Specialist

On Mar 17, 2012, at 2:31 PM, Robert Tsai wrote:

Hi,

I am not able to add an esx hypervisor to foreman. Here is the what I
get:

Browser:
Unable to save
Unable to connect to Hypervisor: wrong number of arguments (2 for 1)

Here is the output of the production log:

Processing HypervisorsController#create (for 10.0.34.176 at 2012-03-17
14:28:52) [POST]
Parameters: {“hypervisor”=>{“kind”=>“libvirt”,
“name”=>“napcloud204.wonka.net”, “hyperuser”=>“root”, “uri”=>“esx://
10.60.5.204?no_verify=1”, “hyperpass”=>“g0l1v3!”}, “commit”=>“Submit”,
“authenticity_token”=>“bFPeTwrYwee/hJZtLboVUuXI+ROhr9R0CUtm4tlytqw=”}
User Load (0.2ms) SELECT * FROM users WHERE (users.id = 1)
Setting current user thread-local variable to admin
Hypervisor Columns (0.7ms) SHOW FIELDS FROM hypervisors
SQL (0.1ms) BEGIN
Hypervisor Load (0.2ms) SELECT hypervisors.id FROM hypervisors
WHERE (hypervisors.name = BINARY ‘napcloud204.wonka.net’) LIMIT 1
Hypervisor Load (0.1ms) SELECT hypervisors.id FROM hypervisors
WHERE (hypervisors.uri = BINARY ‘esx://10.60.5.204?no_verify=1’)
LIMIT 1
trying to contact Hypervisor napcloud204.wonka.net
Failed to connect to hypervisor napcloud204.wonka.net - wrong number
of arguments (2 for 1)
Closing connection to napcloud204.wonka.net
SQL (0.1ms) ROLLBACK
Failed to save: Unable to connect to Hypervisor: wrong number of
arguments (2 for 1)
Rendering template within layouts/application
Rendering hypervisors/new
Rendered hypervisors/_form (9.2ms)
Bookmark Load (0.2ms) SELECT * FROM bookmarks ORDER BY name
Bookmark Columns (0.4ms) SHOW FIELDS FROM bookmarks
Rendered bookmarks/_list (2.7ms)
Rendered bookmarks/_list (0.4ms)
Rendered home/_settings (33.1ms)
Rendered home/_topbar (45.6ms)
Completed in 276ms (View: 65, DB: 3) | 200 OK [http://
foreman.wonka.net/hypervisors]


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


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


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


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

HI Corey,

Just an update. I ended up re-installing foreman and puppet on a clean
install of CenOS 6. I followed your instructions and installed
libvirt > 0.9.1 with your patches and I'm still getting the following
error:

"hyperuser"=>"root", "uri"=>"esx://10.60.5.204?no_verify=1",
"name"=>"esxtest", "kind"=>"libvirt"}}
Failed to connect to hypervisor esxtest - wrong number of arguments (2
for 1)
Failed to save: Unable to connect to Hypervisor: wrong number of
arguments (2 for 1)

I can log into the esx host fine as foreman through virsh:

sudo -u foreman virsh -c esx://10.60.5.204?no_verify=1

virsh # version
Compiled against library: libvir 0.9.1
Using library: libvir 0.9.1
Using API: ESX 0.9.1
Running hypervisor: ESX 4.1.

Maybe i should wait for 0.5 since it will have fog support?

Sounds like you don't have the correct virt lib (not libvirt). Did you use this branch (https://github.com/logicminds/virt/tree/coreyschanges)?

I would wait to 0.5 to be honest. Once I test the new stuff I change the instructions on the website and remove the references to my patches.

Corey Osman
corey@logicminds.biz

Green IT and Datacenter Automation Specialist

··· On Mar 28, 2012, at 10:16 PM, Robert Tsai wrote:

HI Corey,

Just an update. I ended up re-installing foreman and puppet on a clean
install of CenOS 6. I followed your instructions and installed
libvirt > 0.9.1 with your patches and I’m still getting the following
error:

“hyperuser”=>“root”, “uri”=>“esx://10.60.5.204?no_verify=1”,
“name”=>“esxtest”, “kind”=>“libvirt”}}
Failed to connect to hypervisor esxtest - wrong number of arguments (2
for 1)
Failed to save: Unable to connect to Hypervisor: wrong number of
arguments (2 for 1)

I can log into the esx host fine as foreman through virsh:

sudo -u foreman virsh -c esx://10.60.5.204?no_verify=1

virsh # version
Compiled against library: libvir 0.9.1
Using library: libvir 0.9.1
Using API: ESX 0.9.1
Running hypervisor: ESX 4.1.

Maybe i should wait for 0.5 since it will have fog support?


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

Thanks again Corey! I'll wait for 0.5.

··· Sent from my iPhone

On Mar 28, 2012, at 11:10 PM, Corey Osman corey@logicminds.biz wrote:

Sounds like you don’t have the correct virt lib (not libvirt). Did you use this branch (https://github.com/logicminds/virt/tree/coreyschanges)?

I would wait to 0.5 to be honest. Once I test the new stuff I change the instructions on the website and remove the references to my patches.

Corey Osman
corey@logicminds.biz

Green IT and Datacenter Automation Specialist

On Mar 28, 2012, at 10:16 PM, Robert Tsai wrote:

HI Corey,

Just an update. I ended up re-installing foreman and puppet on a clean
install of CenOS 6. I followed your instructions and installed
libvirt > 0.9.1 with your patches and I’m still getting the following
error:

“hyperuser”=>“root”, “uri”=>“esx://10.60.5.204?no_verify=1”,
“name”=>“esxtest”, “kind”=>“libvirt”}}
Failed to connect to hypervisor esxtest - wrong number of arguments (2
for 1)
Failed to save: Unable to connect to Hypervisor: wrong number of
arguments (2 for 1)

I can log into the esx host fine as foreman through virsh:

sudo -u foreman virsh -c esx://10.60.5.204?no_verify=1

virsh # version
Compiled against library: libvir 0.9.1
Using library: libvir 0.9.1
Using API: ESX 0.9.1
Running hypervisor: ESX 4.1.

Maybe i should wait for 0.5 since it will have fog support?


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


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