Description of problem:
Provisioning a new VMware based VM from an image using hammer ignores the parameter --image-id, the image from the compute profile is taken.
Version-Release number of selected component (if applicable):
Satellite 6.2.12
How reproducible:
always
Steps to Reproduce:
1. Attach Satellite to vCenter
2. Store templates
3. Provision new machine
hammer host create \
--name "${vm_hostname}" \
--ip "${vm_ip}" \
--organization-id "${orgid}" \
--domain "${vm_domain}" \
--subnet "${SubnetName}" \
--location "${SubnetLocation}" \
--hostgroup "${vm_hostgroup}" \
--compute-resource-id "${compute_resource_id}" \
--compute-profile-id "${compute_profile_id}" \
--provision-method "image" --image-id "${vm_image_id}" --build true \
--enabled true --managed true \
--compute-attributes="cpus=${cpus},\
corespersocket=${corespersocket},\
cluster=${cluster},\
memory_mb=${memory_mb},\
guest_id=${ostype},\
scsi_controller_type=${scsi_controller_type},\
start=1" \
--interface="managed=true,primary=true,provision=true,compute_name=eth0,\
compute_type=${compute_type},\
compute_network=${compute_network},\
ip=${vm_ip}" \
--volume="datastore=${datastore},\
size_gb=${disksize_gb},\
bootable=true,\
name='Hard Disk'"
Actual results:
--image-id is ignored, image from --compute-profile-id is taken
Expected results:
--image-id is considered
Additional info:
*** Bug 1755146 has been marked as a duplicate of this bug. ***
Comment 13Lukáš Hellebrandt
2020-02-28 12:47:59 UTC
Verified with Sat 6.7 snap 13.
Used reproducer from OP. Created a compute profile with image1, used hammer command with that compute profile and specified image2, image2 was used.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2020:1455
Description of problem: Provisioning a new VMware based VM from an image using hammer ignores the parameter --image-id, the image from the compute profile is taken. Version-Release number of selected component (if applicable): Satellite 6.2.12 How reproducible: always Steps to Reproduce: 1. Attach Satellite to vCenter 2. Store templates 3. Provision new machine hammer host create \ --name "${vm_hostname}" \ --ip "${vm_ip}" \ --organization-id "${orgid}" \ --domain "${vm_domain}" \ --subnet "${SubnetName}" \ --location "${SubnetLocation}" \ --hostgroup "${vm_hostgroup}" \ --compute-resource-id "${compute_resource_id}" \ --compute-profile-id "${compute_profile_id}" \ --provision-method "image" --image-id "${vm_image_id}" --build true \ --enabled true --managed true \ --compute-attributes="cpus=${cpus},\ corespersocket=${corespersocket},\ cluster=${cluster},\ memory_mb=${memory_mb},\ guest_id=${ostype},\ scsi_controller_type=${scsi_controller_type},\ start=1" \ --interface="managed=true,primary=true,provision=true,compute_name=eth0,\ compute_type=${compute_type},\ compute_network=${compute_network},\ ip=${vm_ip}" \ --volume="datastore=${datastore},\ size_gb=${disksize_gb},\ bootable=true,\ name='Hard Disk'" Actual results: --image-id is ignored, image from --compute-profile-id is taken Expected results: --image-id is considered Additional info: