Hammer-cli 422 Unprocessable Entity error when generating a new VM (Foreman 1.10 on Ubuntu 14.04)

Hi,

I'm trying to generate a new VM using hammer-cli. In my setup, I have a
an Ubuntu 14.04 host that is running Foreman 1.10 and I use Ovirt 3.5 for
virtualization. When I attempt to create the VM using the following
command:

hammer -d -v host create --hostgroup="CentOS7"
–compute-resource="XMEOW-Ovirt" --compute-profile="1-Test-Small"
–interface="primary=true,provision=true,compute_name=eth0,compute_network=test,type=interface"
–name="hammertime6"

I receive the following error:

[DEBUG 2016-01-06 11:50:29 API] Headers: {}
[DEBUG 2016-01-06 11:50:34 API] 422 Unprocessable Entity
{
"error" => {
"id" => nil,
"errors" => {
"base" => [
[0] "Failed to create a compute XMEOW-Ovirt (oVirt)
instance hammertime6.test.xmeow.org: \n "
]
},
"full_messages" => [
[0] "Failed to create a compute XMEOW-Ovirt (oVirt) instance
hammertime6.test.xmeow.org: \n "
]
}
}
[ERROR 2016-01-06 11:50:34 Exception] Failed to create a compute
XMEOW-Ovirt (oVirt) instance hammertime6.test.xmeow.org:

I feel like I'm missing something, but I'm not sure what. I've attached
the full hammer output as well as foreman's production.log. Any help or
suggestions would be appreciated.

Thank you,

production-201601061140.log (14.2 KB)

So I think I discovered what my issue is. When I define the
compute_network by its name instead of UUID I get that error.

hammer -d -v host create
–name="hammertime01"
–build=1
–compute-resource-id=1
–compute-attributes="start=1"
–hostgroup-id=7
–image-id=3
–provision-method="image"
–partition-table-id=55
–managed=true
–enabled=true
–root-password="password" \

–interface="primary=true,provision=true,compute_name=eth0,compute_network=test,type=Nic::Managed,managed=1,_destroy=0,name=hammertime01,virtual=0"

–subnet-id=2
–domain-id=2
–mac=00:11:22:33:44:a0

Generated:

[DEBUG 2016-01-12 16:26:35 API] Headers: {}
[DEBUG 2016-01-12 16:26:43 API] 422 Unprocessable Entity
{
"error" => {
"id" => nil,
"errors" => {
"conflict" => [],
"interfaces.conflict" => [],
"base" => [
[0] "Failed to create a compute XMEOW-Ovirt (oVirt)
instance hammertime01.test.xmeow.org: \n "
]
},
"full_messages" => [
[0] "Failed to create a compute XMEOW-Ovirt (oVirt) instance
hammertime01.test.xmeow.org: \n "
]
}
}

It worked with this command;

hammer -d -v host create
–name="hammertime02"
–build=1
–compute-resource-id=1
–compute-attributes="start=1"
–hostgroup-id=7
–image-id=3
–provision-method="image"
–partition-table-id=55
–managed=true
–enabled=true
–root-password="password" \

–interface="primary=true,provision=true,compute_name=eth0,compute_network=9e3e644b-eb09-44f2-954f-bd614f149703,type=Nic::Managed,managed=1,_destroy=0,name=hammer02,virtual=0"
–subnet-id=2
–domain-id=2
–mac=00:11:22:33:44:a1

Thanks,

··· On Wednesday, January 6, 2016 at 3:30:57 PM UTC-5, Dwight Beaver wrote: > > Hi, > > I'm trying to generate a new VM using hammer-cli. In my setup, I have a > an Ubuntu 14.04 host that is running Foreman 1.10 and I use Ovirt 3.5 for > virtualization. When I attempt to create the VM using the following > command: > > hammer -d -v host create --hostgroup="CentOS7" > --compute-resource="XMEOW-Ovirt" --compute-profile="1-Test-Small" > --interface="primary=true,provision=true,compute_name=eth0,compute_network=test,type=interface" > --name="hammertime6" > > > I receive the following error: > > [DEBUG 2016-01-06 11:50:29 API] Headers: {} > [DEBUG 2016-01-06 11:50:34 API] 422 Unprocessable Entity > { > "error" => { > "id" => nil, > "errors" => { > "base" => [ > [0] "Failed to create a compute XMEOW-Ovirt (oVirt) > instance hammertime6.test.xmeow.org: \n " > ] > }, > "full_messages" => [ > [0] "Failed to create a compute XMEOW-Ovirt (oVirt) instance > hammertime6.test.xmeow.org: \n " > ] > } > } > [ERROR 2016-01-06 11:50:34 Exception] Failed to create a compute > XMEOW-Ovirt (oVirt) instance hammertime6.test.xmeow.org: > > > I feel like I'm missing something, but I'm not sure what. I've attached > the full hammer output as well as foreman's production.log. Any help or > suggestions would be appreciated. > > Thank you, > >