Hammer cli create ovirt vm

>
> Hi all,
>
> I'm trying to run this command to create an ovirt machine:
Hard to say, since no error is given. You should also attach logs; as well as engine.log in this time frame.

Try to use the UI for starters; if this works, debug hammer.
Also, make sure you do not hit this bug[1].

Further, there is currently a discussion regarding ovirt's quite too soon recycling of mac addresses.
Basically, the mac from a deleted VM is recycled immediately[2]. This is fine as long as foreman does delete the VM; if
it is done manually (like, testing) it can leave left over mac address reservations in your DHCP.
Make sure to clean this up.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1262293
[2] https://www.mail-archive.com/users@ovirt.org/msg28140.html

ยทยทยท On 06.10.2015 15:46, Eliraz Asulin wrote: > > hammer -d -v host create --name memcache004 --hostgroup memcached > --compute-resource-id=44 --environment=production --puppet-ca-proxy > lava2-proxy --puppet-proxy lava2-proxy > --interface="managed=true,primary=true,provision=true,compute_name=eth0,compute_network=ovirtmgmt" > --domain taboolasyndication.com --subnet IL_new_subnet --operatingsystem > "CentOS 6.7" --architecture x86_64 --medium "new Centos mirror" > --partition-table "Kickstart default" > --compute-attributes="cluster=Cluster003,cores=2,memory=4096,start=true" > --volume="size_gb=20,storage_domain=ovirt-node003-taboolasyndication-com-Local,bootable=true" > > and get an error without too much information: > > eliraz-a-mbp:~ eliraz.a$ hammer -d -v host create --name memcache004 > --hostgroup memcached --compute-resource-id=44 --environment=production > --puppet-ca-proxy lava2-proxy --puppet-proxy lava2-proxy > --interface="managed=true,primary=true,provision=true,compute_name=eth0,compute_network=ovirtmgmt" > --domain taboolasyndication.com --subnet IL_new_subnet --operatingsystem > "CentOS 6.7" --architecture x86_64 --medium "new Centos mirror" > --partition-table "Kickstart default" > --compute-attributes="cluster=Cluster003,cores=2,memory=4096,start=true" > --volume="size_gb=20,storage_domain=ovirt-node003-taboolasyndication-com-Local,bootable=true" > [ INFO 2015-10-06T16:43:26 Init] Initialization of Hammer CLI (0.4.0) has > started... > [DEBUG 2015-10-06T16:43:26 Init] Running at ruby 2.0.0-p481 > [ INFO 2015-10-06T16:43:26 Init] Configuration from the file > /Users/eliraz.a/.hammer/cli_config.yml has been loaded > [ INFO 2015-10-06T16:43:26 Init] Configuration from the file > /Users/eliraz.a/.hammer/cli.modules.d/foreman.yml has been loaded > [DEBUG 2015-10-06T16:43:26 Connection] Registered: foreman > [DEBUG 2015-10-06T16:43:26 API] Global headers: { > :content_type => "application/json", > :accept => "application/json;version=2", > "Accept-Language" => "he" > } > [ INFO 2015-10-06T16:43:26 Modules] Extension module hammer_cli_foreman > (0.4.0) loaded > [DEBUG 2015-10-06T16:43:26 Init] Using locale 'he' > [DEBUG 2015-10-06T16:43:26 Init] 'mo' files for locale domain 'hammer-cli' > loaded from '/Library/Ruby/Gems/2.0.0/gems/hammer_cli-0.4.0/locale' > [DEBUG 2015-10-06T16:43:26 Init] 'mo' files for locale domain > 'hammer-cli-foreman' loaded from > '/Library/Ruby/Gems/2.0.0/gems/hammer_cli_foreman-0.4.0/locale' > [ INFO 2015-10-06T16:43:26 HammerCLI::MainCommand] Called with options: > {"option_verbose"=>true, "option_debug"=>true} > [ INFO 2015-10-06T16:43:27 HammerCLIForeman::Host] Called with options: {} > [ INFO 2015-10-06T16:43:27 HammerCLIForeman::Host::CreateCommand] Called > with options: {"option_puppet_proxy"=>"lava2-proxy", > "option_puppet_ca_proxy"=>"lava2-proxy", "option_managed"=>true, > "option_build"=>true, "option_enabled"=>true, > "option_compute_attributes"=>{"cluster"=>"Cluster003", "cores"=>"2", > "memory"=>"4096", "start"=>"true"}, > "option_volume_list"=>[{"size_gb"=>"20", > "storage_domain"=>"ovirt-node003-taboolasyndication-com-Local", > "bootable"=>"true"}], "option_interface_list"=>[{"managed"=>"true", > "primary"=>"true", "provision"=>"true", "compute_name"=>"eth0", > "compute_network"=>"ovirtmgmt"}], "option_environment_name"=>"production", > "option_architecture_name"=>"x86_64", > "option_domain_name"=>"taboolasyndication.com", > "option_operatingsystem_title"=>"CentOS 6.7", "option_medium_name"=>"new > Centos mirror", "option_ptable_name"=>"Kickstart default", > "option_subnet_name"=>"IL_new_subnet", "option_compute_resource_id"=>44, > "option_hostgroup_name"=>"memcached", "option_name"=>"memcache004"} > [ INFO 2015-10-06T16:43:27 API] GET /api/environments > [DEBUG 2015-10-06T16:43:27 API] Params: { > :search => "name = \"production\"" > } > [DEBUG 2015-10-06T16:43:27 API] Headers: { > :params => { > :search => "name = \"production\"" > } > } > [DEBUG 2015-10-06T16:43:28 API] Response: { > "total" => 5, > "subtotal" => 1, > "page" => 1, > "per_page" => 200, > "search" => "name = \"production\"", > "sort" => { > "by" => nil, > "order" => nil > }, > "results" => [ > [0] { > "created_at" => "2013-01-28T14:55:48Z", > "updated_at" => "2013-01-28T14:55:48Z", > "name" => "production", > "id" => 1 > } > ] > } > [DEBUG 2015-10-06T16:43:28 API] Response headers: { > :date => "Tue, 06 Oct 2015 13:44:01 GMT", > :server => "Apache/2.2.15 (CentOS)", > :foreman_version => "1.9.2", > :foreman_api_version => "2", > :apipie_checksum => "fe52d989f2a9c40aa8514ae2bfab7799", > :x_ua_compatible => "IE=Edge,chrome=1", > :etag => "\"06cb1dbc80ba3042ebbb6910eb0be9b1\"", > :cache_control => "must-revalidate, private, max-age=0", > :x_request_id => "335f58ea30df38943a6424b3f2f4911f", > :x_runtime => "1.142825", > :x_rack_cache => "miss", > :x_powered_by => "Phusion Passenger 4.0.18", > :set_cookie => [ > [0] > "_session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTIyNDg0NTJhNjNlYjk0ZmQ4MWJkNDBiZWVlZmMyNDA3BjsAVEkiC2xvY2FsZQY7AEZJIgdpdAY7AFQ%3D--a9f750c87f04fdf90d92caa7458178522232a61c; > path=/; HttpOnly", > [1] "request_method=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT" > ], > :status => "200 OK", > :connection => "close", > :transfer_encoding => "chunked", > :content_type => "application/json; charset=utf-8" > } > [ INFO 2015-10-06T16:43:28 API] GET /api/architectures > [DEBUG 2015-10-06T16:43:28 API] Params: { > :search => "name = \"x86_64\"" > } > [DEBUG 2015-10-06T16:43:28 API] Headers: { > :params => { > :search => "name = \"x86_64\"" > } > } > [DEBUG 2015-10-06T16:43:30 API] Response: { > "total" => 2, > "subtotal" => 1, > "page" => 1, > "per_page" => 200, > "search" => "name = \"x86_64\"", > "sort" => { > "by" => nil, > "order" => nil > }, > "results" => [ > [0] { > "created_at" => "2013-01-28T15:11:58Z", > "updated_at" => "2013-01-28T15:11:58Z", > "name" => "x86_64", > "id" => 1 > } > ] > } > [DEBUG 2015-10-06T16:43:30 API] Response headers: { > :date => "Tue, 06 Oct 2015 13:44:02 GMT", > :server => "Apache/2.2.15 (CentOS)", > :foreman_version => "1.9.2", > :foreman_api_version => "2", > :apipie_checksum => "fe52d989f2a9c40aa8514ae2bfab7799", > :x_ua_compatible => "IE=Edge,chrome=1", > :etag => "\"7ce56c52d6af92036aa05fa05abf3e52\"", > :cache_control => "must-revalidate, private, max-age=0", > :x_request_id => "d6bfda929b7fcc29c0e2bd05925b95bc", > :x_runtime => "1.479317", > :x_rack_cache => "miss", > :x_powered_by => "Phusion Passenger 4.0.18", > :set_cookie => [ > [0] > "_session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWRiZTFhNDgyZjRmZGU4OTQ2MWQwZTM0MWQ1M2JhZTFlBjsAVEkiC2xvY2FsZQY7AEZJIgdpdAY7AFQ%3D--3ef438abd70a1968014c2fa69307989f04038a67; > path=/; HttpOnly", > [1] "request_method=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT" > ], > :status => "200 OK", > :connection => "close", > :transfer_encoding => "chunked", > :content_type => "application/json; charset=utf-8" > } > [ INFO 2015-10-06T16:43:30 API] GET /api/domains > [DEBUG 2015-10-06T16:43:30 API] Params: { > :search => "name = \"taboolasyndication.com\"" > } > [DEBUG 2015-10-06T16:43:30 API] Headers: { > :params => { > :search => "name = \"taboolasyndication.com\"" > } > } > [DEBUG 2015-10-06T16:43:31 API] Response: { > "total" => 11, > "subtotal" => 1, > "page" => 1, > "per_page" => 200, > "search" => "name = \"taboolasyndication.com\"", > "sort" => { > "by" => nil, > "order" => nil > }, > "results" => [ > [0] { > "fullname" => "taboolasyndication.com", > "dns_id" => 17, > "created_at" => "2013-01-28T15:11:58Z", > "updated_at" => "2015-07-08T09:04:03Z", > "id" => 1, > "name" => "taboolasyndication.com" > } > ] > } > [DEBUG 2015-10-06T16:43:31 API] Response headers: { > :date => "Tue, 06 Oct 2015 13:44:03 GMT", > :server => "Apache/2.2.15 (CentOS)", > :foreman_version => "1.9.2", > :foreman_api_version => "2", > :apipie_checksum => "fe52d989f2a9c40aa8514ae2bfab7799", > :x_ua_compatible => "IE=Edge,chrome=1", > :etag => "\"68555bb9a7b2989906c8347accb5dbdc\"", > :cache_control => "must-revalidate, private, max-age=0", > :x_request_id => "2e8fa7c443073d0c3de5872a2d36861a", > :x_runtime => "1.252781", > :x_rack_cache => "miss", > :x_powered_by => "Phusion Passenger 4.0.18", > :set_cookie => [ > [0] > "_session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTIwODcxYTFhM2M3NjRkZWFiMjNlN2ZkYzhiOTcwN2E2BjsAVEkiC2xvY2FsZQY7AEZJIgdpdAY7AFQ%3D--8ca72caf7817a95639a435888ed8e511c340dfd4; > path=/; HttpOnly", > [1] "request_method=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT" > ], > :status => "200 OK", > :connection => "close", > :transfer_encoding => "chunked", > :content_type => "application/json; charset=utf-8" > } > [ INFO 2015-10-06T16:43:31 API] GET /api/operatingsystems > [DEBUG 2015-10-06T16:43:31 API] Params: { > :search => "title = \"CentOS 6.7\"" > } > [DEBUG 2015-10-06T16:43:31 API] Headers: { > :params => { > :search => "title = \"CentOS 6.7\"" > } > } > [DEBUG 2015-10-06T16:43:33 API] Response: { > "total" => 20, > "subtotal" => 1, > "page" => 1, > "per_page" => 200, > "search" => "title = \"CentOS 6.7\"", > "sort" => { > "by" => nil, > "order" => nil > }, > "results" => [ > [0] { > "description" => "", > "major" => "6", > "minor" => "7", > "family" => "Redhat", > "release_name" => "", > "password_hash" => "MD5", > "created_at" => "2015-08-07T14:03:26Z", > "updated_at" => "2015-09-29T08:23:25Z", > "id" => 20, > "name" => "CentOS", > "title" => "CentOS 6.7" > } > ] > } > [DEBUG 2015-10-06T16:43:33 API] Response headers: { > :date => "Tue, 06 Oct 2015 13:44:05 GMT", > :server => "Apache/2.2.15 (CentOS)", > :foreman_version => "1.9.2", > :foreman_api_version => "2", > :apipie_checksum => "fe52d989f2a9c40aa8514ae2bfab7799", > :x_ua_compatible => "IE=Edge,chrome=1", > :etag => "\"fd488fee73df8f9e512194bb2eda63d7\"", > :cache_control => "must-revalidate, private, max-age=0", > :x_request_id => "a6163c20c4d2d715e6dd1de115725283", > :x_runtime => "1.403356", > :x_rack_cache => "miss", > :x_powered_by => "Phusion Passenger 4.0.18", > :set_cookie => [ > [0] > "_session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWMzNWRiNzc0ZThlMWU2ZWY5MWI4NjJlMDM4MTU0M2VkBjsAVEkiC2xvY2FsZQY7AEZJIgdpdAY7AFQ%3D--24776ef170f6d4f673f9d01d80f2ad2146f6aeea; > path=/; HttpOnly", > [1] "request_method=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT" > ], > :status => "200 OK", > :connection => "close", > :transfer_encoding => "chunked", > :content_type => "application/json; charset=utf-8" > } > [ INFO 2015-10-06T16:43:33 API] GET /api/media > [DEBUG 2015-10-06T16:43:33 API] Params: { > :search => "name = \"new Centos mirror\"" > } > [DEBUG 2015-10-06T16:43:33 API] Headers: { > :params => { > :search => "name = \"new Centos mirror\"" > } > } > [DEBUG 2015-10-06T16:43:34 API] Response: { > "total" => 25, > "subtotal" => 1, > "page" => 1, > "per_page" => 200, > "search" => "name = \"new Centos mirror\"", > "sort" => { > "by" => nil, > "order" => nil > }, > "results" => [ > [0] { > "path" => > "http://mirror.centos.org/centos-$major/$major/os/$arch/", > "os_family" => "Redhat", > "created_at" => "2013-03-10T13:39:07Z", > "updated_at" => "2015-01-25T15:17:56Z", > "id" => 6, > "name" => "new Centos mirror" > } > ] > } > [DEBUG 2015-10-06T16:43:34 API] Response headers: { > :date => "Tue, 06 Oct 2015 13:44:06 GMT", > :server => "Apache/2.2.15 (CentOS)", > :foreman_version => "1.9.2", > :foreman_api_version => "2", > :apipie_checksum => "fe52d989f2a9c40aa8514ae2bfab7799", > :x_ua_compatible => "IE=Edge,chrome=1", > :etag => "\"762ac149d99ddfaef2e502b524b73388\"", > :cache_control => "must-revalidate, private, max-age=0", > :x_request_id => "707609a7242c65200f66cd01e326092d", > :x_runtime => "1.273579", > :x_rack_cache => "miss", > :x_powered_by => "Phusion Passenger 4.0.18", > :set_cookie => [ > [0] > "_session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWM2YzM2MDE0MjE1ZDdmNjk2ZDgwNDUzODU1MDE3YWVkBjsAVEkiC2xvY2FsZQY7AEZJIgdpdAY7AFQ%3D--61be2e60b3cd9d2f03b92eb25bebd2700bf773d0; > path=/; HttpOnly", > [1] "request_method=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT" > ], > :status => "200 OK", > :connection => "close", > :transfer_encoding => "chunked", > :content_type => "application/json; charset=utf-8" > } > [ INFO 2015-10-06T16:43:34 API] GET /api/ptables > [DEBUG 2015-10-06T16:43:34 API] Params: { > :search => "name = \"Kickstart default\"" > } > [DEBUG 2015-10-06T16:43:34 API] Headers: { > :params => { > :search => "name = \"Kickstart default\"" > } > } > [DEBUG 2015-10-06T16:43:36 API] Response: { > "total" => 51, > "subtotal" => 1, > "page" => 1, > "per_page" => 200, > "search" => "name = \"Kickstart default\"", > "sort" => { > "by" => nil, > "order" => nil > }, > "results" => [ > [0] { > "os_family" => "Redhat", > "created_at" => "2015-09-29T08:32:23Z", > "updated_at" => "2015-09-29T08:32:31Z", > "name" => "Kickstart default", > "id" => 71 > } > ] > } > [DEBUG 2015-10-06T16:43:36 API] Response headers: { > :date => "Tue, 06 Oct 2015 13:44:08 GMT", > :server => "Apache/2.2.15 (CentOS)", > :foreman_version => "1.9.2", > :foreman_api_version => "2", > :apipie_checksum => "fe52d989f2a9c40aa8514ae2bfab7799", > :x_ua_compatible => "IE=Edge,chrome=1", > :etag => "\"7d1596b0234b0d424c5af647db38723c\"", > :cache_control => "must-revalidate, private, max-age=0", > :x_request_id => "affe8b59d4caec61b79ea2c4b92f0308", > :x_runtime => "1.568018", > :x_rack_cache => "miss", > :x_powered_by => "Phusion Passenger 4.0.18", > :set_cookie => [ > [0] > "_session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTk2YzFkNDU0OGRiNmNjMGUyZjc3MDc1ZjhmZTQ5ZmU0BjsAVEkiC2xvY2FsZQY7AEZJIgdpdAY7AFQ%3D--9a289a5995c2f52fb1f848b94a176f173258a53c; > path=/; HttpOnly", > [1] "request_method=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT" > ], > :status => "200 OK", > :connection => "close", > :transfer_encoding => "chunked", > :content_type => "application/json; charset=utf-8" > } > [ INFO 2015-10-06T16:43:36 API] GET /api/subnets > [DEBUG 2015-10-06T16:43:36 API] Params: { > :search => "name = \"IL_new_subnet\"" > } > [DEBUG 2015-10-06T16:43:36 API] Headers: { > :params => { > :search => "name = \"IL_new_subnet\"" > } > } > [DEBUG 2015-10-06T16:43:37 API] Response: { > "total" => 10, > "subtotal" => 1, > "page" => 1, > "per_page" => 200, > "search" => "name = \"IL_new_subnet\"", > "sort" => { > "by" => nil, > "order" => nil > }, > "results" => [ > [0] { > "network" => "172.16.120.0", > "cidr" => 22, > "mask" => "255.255.252.0", > "priority" => nil, > "vlanid" => "", > "gateway" => "172.16.120.1", > "dns_primary" => "192.168.10.231", > "dns_secondary" => "", > "from" => "172.16.120.51", > "to" => "172.16.123.254", > "created_at" => "2014-08-17T13:52:58Z", > "updated_at" => "2015-09-29T13:39:11Z", > "ipam" => "DHCP", >