Create host using hammer cli

Problem:
Failed to generate ISO image for instance testvm.local: undefined method `bootdisk_raise’ for #Host::Managed:0x007f60bd060fe8
Expected outcome:
create a new vm on vmware
Foreman and Proxy versions:
1.16.1
Foreman and Proxy plugin versions:

Other relevant data:

[DEBUG 2018-05-31T11:14:59 API] Headers: {}
[DEBUG 2018-05-31T11:14:59 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[ERROR 2018-05-31T11:15:02 API] 422 Unprocessable Entity
[DEBUG 2018-05-31T11:15:02 API] {
    "error" => {
                   "id" => nil,
               "errors" => {
                       "conflict" => [],
            "interfaces.conflict" => [],
                           "base" => [
                [0] "Failed to generate ISO image for instance valvcs001vm.val.vlss.local: undefined method `bootdisk_raise' for #<Host::Managed:0x007f60bd060fe8>"
            ]
        },
        "full_messages" => [
            [0] "Failed to generate ISO image for instance valvcs001vm.val.vlss.local: undefined method `bootdisk_raise' for #<Host::Managed:0x007f60bd060fe8>"
        ]
    }
}
[DEBUG 2018-05-31T11:15:02 Exception] Using exception handler HammerCLIForeman::ExceptionHandler#handle_unprocessable_entity
[ERROR 2018-05-31T11:15:02 Exception] Failed to generate ISO image for instance valvcs001vm.val.vlss.local: undefined method `bootdisk_raise' for #<Host::Managed:0x007f60bd060fe8>

On vmware i can see it trying to create and deleting the instance immediately.

Hello,

this seems like you’re using bootdisk plugin. The error has been fixed in foreman_bootdisk 12.0.0, which has landed to our nightly repos. @lzap is there a plan to cherry-pick this to older versions of bootdisk? With Foreman 1.16, there was bootdisk 10.0.2.

More details can be found at

https://github.com/theforeman/foreman_bootdisk/commit/71cfdece3de74881cca9a7a17ccdb1d44ab2f3eb

I currently don’t have plans, the workaround should be pretty easy, just replace bootdisk_raise with raise in both bootdisk templates and you will see the error which prevents you from generating the image.