This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"Status"=>"Success", | |
| "Value"=> | |
| {"OpaqueRef:8ad1b315-5e03-196d-52c2-435750371ec4"=> | |
| {"snapshot_of"=>"OpaqueRef:NULL", | |
| "domid"=>"-1", | |
| "HVM_shadow_multiplier"=>1.0, | |
| "PV_args"=>"console=ttyS0 xencons=ttyS", | |
| "PV_kernel"=>"", | |
| "memory_overhead"=>"1048576", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [root@chef tmp]# knife xen server create recipe[zabbix-agent::default] -N Test | |
| Creating with the following defaults: | |
| Baseline: CentOS 5.4 (64-bit) | |
| Network : Pool-wide network associated with eth0 | |
| Cloning from baseline image... | |
| /usr/lib/ruby/gems/1.8/gems/fog-0.3.17/lib/fog/xenserver/connection.rb:34:in `request': undefined method `first' for #<Hash:0x2ba1bbcd2458> (NoMethodError) | |
| from /usr/lib/ruby/gems/1.8/gems/fog-0.3.17/lib/fog/xenserver/requests/get_vm.rb:8:in `get_vm' | |
| from /usr/lib/ruby/gems/1.8/gems/fog-0.3.17/lib/fog/xenserver.rb:54:in `default_image' | |
| from /usr/lib/ruby/gems/1.8/gems/fog-0.3.17/lib/fog/xenserver/requests/create_vm.rb:6:in `create_vm' | |
| from /usr/lib/ruby/gems/1.8/gems/fog-0.3.17/lib/fog/xenserver/requests/create_server.rb:6:in `create_server' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [root@monitor yum.repos.d]# locate zabbix_server ?? | |
| /etc/rc.d/init.d/zabbix_server | |
| /etc/rc.d/rc0.d/K45zabbix_server | |
| /etc/rc.d/rc1.d/K45zabbix_server | |
| /etc/rc.d/rc2.d/S55zabbix_server | |
| /etc/rc.d/rc3.d/S55zabbix_server | |
| /etc/rc.d/rc4.d/S55zabbix_server | |
| /etc/rc.d/rc5.d/S65zabbix_server | |
| /etc/rc.d/rc6.d/K45zabbix_server | |
| /etc/zabbix/zabbix_server.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [root@chef knife]# knife xen server create -P 192.168.5.111 | |
| Server Name? tet | |
| Creating with the following defaults: | |
| Baseline: CentOS 5.4 (64-Bit) | |
| Network : Pool-wide network associated with eth0 | |
| Cloning from baseline image... | |
| /usr/lib/ruby/gems/1.8/gems/fog-0.3.17/lib/fog/attributes.rb:146:in `send': undefined method `memory_overhead=' for #<Fog::Xenserver::Vm:0x2b4df6076060> (NoMethodError) | |
| from /usr/lib/ruby/gems/1.8/gems/fog-0.3.17/lib/fog/attributes.rb:146:in `merge_attributes' | |
| from /usr/lib/ruby/gems/1.8/gems/fog-0.3.17/lib/fog/attributes.rb:141:in `each' | |
| from /usr/lib/ruby/gems/1.8/gems/fog-0.3.17/lib/fog/attributes.rb:141:in `merge_attributes' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| knife ssh 'xe vm-copy vm=CentOSBase new-name-label=Test' -x user -P pass | |
| /usr/lib/ruby/1.8/optparse.rb:451:in `parse': missing argument: -P (OptionParser::MissingArgument) | |
| from /usr/lib/ruby/1.8/optparse.rb:1293:in `parse_in_order' | |
| from /usr/lib/ruby/1.8/optparse.rb:1252:in `catch' | |
| from /usr/lib/ruby/1.8/optparse.rb:1252:in `parse_in_order' | |
| from /usr/lib/ruby/1.8/optparse.rb:1246:in `order!' | |
| from /usr/lib/ruby/1.8/optparse.rb:1337:in `permute!' | |
| from /usr/lib/ruby/1.8/optparse.rb:1358:in `parse!' | |
| from /usr/lib/ruby/gems/1.8/gems/mixlib-cli-1.2.0/lib/mixlib/cli.rb:162:in `parse_options' | |
| from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/lib/chef/knife.rb:199:in `parse_options' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [root@chef fog]# knife xen server create -P 192.168.5.111 -N test | |
| Creating with the following defaults: | |
| Baseline: CentOS 5.4 (64-Bit) | |
| Network : Pool-wide network associated with eth0 | |
| Cloning from baseline image... | |
| /usr/lib/ruby/gems/1.8/gems/fog-0.3.17/lib/fog/xenserver/connection.rb:34:in `request': uninitialized constant Fog::Xenserver::InvalidRequest (NameError) | |
| from /usr/lib/ruby/gems/1.8/gems/fog-0.3.17/lib/fog/xenserver/requests/create_vif.rb:6:in `create_vif' | |
| from /usr/lib/ruby/gems/1.8/gems/fog-0.3.17/lib/fog/xenserver/requests/create_vm.rb:13:in `create_vm' | |
| from /usr/lib/ruby/gems/1.8/gems/fog-0.3.17/lib/fog/xenserver/requests/create_server.rb:6:in `create_server' | |
| from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/lib/chef/knife/xen_server_create.rb:100:in `run' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [root@chef cookbooks]# knife search index rebuild | |
| /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/lib/chef/search/query.rb:39:in `search': undefined method `each' for nil:NilClass (NoMethodError) | |
| from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/lib/chef/knife/search.rb:67:in `run' | |
| from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/lib/chef/knife.rb:127:in `run' | |
| from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/lib/chef/application/knife.rb:118:in `run' | |
| from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/knife:25 | |
| from /usr/bin/knife:19:in `load' | |
| from /usr/bin/knife:19 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| class String | |
| def red; color(self, "\e[1m\e[31m"); end | |
| def green; color(self, "\e[1m\e[32m"); end | |
| def yellow; color(self, "\e[1m\e[33m"); end | |
| def blue; color(self, "\e[1m\e[34m"); end | |
| def pur; color(self, "\e[1m\e[35m"); end | |
| def color(text, color_code) "#{color_code}#{text}\e[0m" end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #### Why Does This Code | |
| puts "Hostname?".red | |
| $Hostname = STDIN.gets | |
| @fqdn = "#{$Hostname}.example.com" | |
| puts @fqdn | |
| #### Print to console like this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Sat, 20 Nov 2010 10:42:05 -0500] INFO: Client key /etc/chef/client.pem is not present - registering | |
| [Sat, 20 Nov 2010 10:42:05 -0500] WARN: HTTP Request Returned 409 Conflict: Client already exists | |
| [Sat, 20 Nov 2010 10:42:05 -0500] WARN: HTTP Request Returned 403 Forbidden: You are not allowed to take this action. | |
| /usr/lib/ruby/1.8/net/http.rb:2097:in `error!': 403 "Forbidden" (Net::HTTPServerException) | |
| from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/rest.rb:229:in `api_request' | |
| from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/rest.rb:280:in `retriable_rest_request' | |
| from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/rest.rb:210:in `api_request' | |
| from /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/rest.rb:126:in `put_rest' |