Image-Based Provisioning on Libvirt

I'm trying to provision VMs with hammer based from an image on a
compute-resource using QCOW2. I've gotten it to work using the GUI,
however doing it through hammer or the API results in a VM that's not
bootable.

Here's the string I'm using:

hammer -u <user> -p <pass> host create --environment-id 7 --architecture-id
1 --domain-id 1 --puppet-proxy-id 1 --operatingsystem-id 6
–partition-table-id 11
–interface="ip=172.16.0.70,type=interface,managed=true,primary=true,provision=true,compute_type=bridge,compute_bridge='br1.115',compute_model='virtio'"
–name hammer-test-100 --compute-resource-id 3 --provision-method image
–image-id 5

Thanks!

Hello

Do you see any error? Does the VM have some HDD? How does it differ from a VM
that's created from UI? Usually it's caused by some parameters missing in
hammer command, in web UI they are always there in a form, so answers to
questions above might give you some clues.

Hope this helps

··· On Monday 14 of March 2016 13:32:17 Cameron Jeffries wrote: > I'm trying to provision VMs with hammer based from an image on a > compute-resource using QCOW2. I've gotten it to work using the GUI, > however doing it through hammer or the API results in a VM that's not > bootable. > > > > Here's the string I'm using: > > > hammer -u -p host create --environment-id 7 --architecture-id > 1 --domain-id 1 --puppet-proxy-id 1 --operatingsystem-id 6 > --partition-table-id 11 > --interface="ip=172.16.0.70,type=interface,managed=true,primary=true,provisi > on=true,compute_type=bridge,compute_bridge='br1.115',compute_model='virtio'" > --name hammer-test-100 --compute-resource-id 3 --provision-method image > --image-id 5 > > > Thanks!


Marek

I ended not being able to figure out how to add all differences found in
the production logs. I was able to solve this problem, however, by
creating a default image in a compute profile and creating a new VM using
that.

Hi,

I've hit the similar issue some time ago
Bug #14211: Host image_id has not effect on the actual image to be used when provisioning - Foreman, the workaround should be
to use --compute-attributes=&#39;image_id=YOUR_IMAGE_ID - just note that
YOUR_IMAGE_ID should be based on
the external indentifier of the image, not the Foreman's integer id.

– Ivan

··· On Mon, Apr 4, 2016 at 9:29 PM, Cameron Jeffries wrote:

I ended not being able to figure out how to add all differences found in
the production logs. I was able to solve this problem, however, by
creating a default image in a compute profile and creating a new VM using
that.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.