Skip to content
This repository has been archived by the owner on May 1, 2021. It is now read-only.

oci_image provides wrong launch_options. The instance won't start from the created image. #98

Closed
skydreamerr opened this issue Feb 15, 2020 · 2 comments

Comments

@skydreamerr
Copy link

skydreamerr commented Feb 15, 2020

Issue Report

Describe the issue

When I create a custom image from Oracle provided image https://docs.cloud.oracle.com/en-us/iaas/images/image/0a72692a-bdbb-46fc-b17b-6e0a3fedeb23/
on standard VM.Standard2.1 shape

The custom image gets different launch options comparing to Oracle provided image.

Custom image:
"launch_mode": "NATIVE", "launch_options": {"boot_volume_type": "ISCSI", "firmware": "UEFI_64", "is_consistent_volume_naming_enabled": false, "is_pv_encryption_in_transit_enabled": false, "network_type": "VFIO", "remote_data_volume_type": "PARAVIRTUALIZED"}

Oracle provided has

"launch-mode": "NATIVE",
    "launch-options": {
      "boot-volume-type": "PARAVIRTUALIZED",
      "firmware": "UEFI_64",
      "is-consistent-volume-naming-enabled": true,
      "is-pv-encryption-in-transit-enabled": false,
      "network-type": "PARAVIRTUALIZED",
      "remote-data-volume-type": "PARAVIRTUALIZED"
    },

cli works fine
oci compute image create -c ocid1.compartment... --instance-id ocid1.instance.oc1.phx... --region us-phoenix-1

  "launch-mode": "NATIVE",
    "launch-options": {
      "boot-volume-type": "PARAVIRTUALIZED",
      "firmware": "UEFI_64",
      "is-consistent-volume-naming-enabled": true,
      "is-pv-encryption-in-transit-enabled": false,
      "network-type": "PARAVIRTUALIZED",
      "remote-data-volume-type": "PARAVIRTUALIZED"
    },
    "lifecycle-state": "PROVISIONING",
    "operating-system": "Oracle Linux",
    "operating-system-version": "7.7",

this cli command produce the same result as Ansible
oci compute image create -c ocid1.compartment... --instance-id ocid1.instance.oc1.phx... --region us-phoenix-1 --launch-mode NATIVE

"launch-mode": "NATIVE",
    "launch-options": {
      "boot-volume-type": "ISCSI",
      "firmware": "UEFI_64",
      "is-consistent-volume-naming-enabled": false,
      "is-pv-encryption-in-transit-enabled": false,
      "network-type": "VFIO",
      "remote-data-volume-type": "PARAVIRTUALIZED"
    },

Expected behavior

Bootable instance from custom image.

Environment

  • OS version:

  • Ansible version:

    ansible 2.9.5
    config file = /Users/annazaro/ansible/mach5/ansible.cfg
    configured module search path = ['/Users/annazaro/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
    ansible python module location = /Users/annazaro/.pyenv/versions/3.8.1/lib/python3.8/site-packages/ansible
    executable location = /Users/annazaro/.pyenv/versions/3.8.1/bin/ansible
    python version = 3.8.1 (default, Feb 14 2020, 11:19:11) [Clang 11.0.0 (clang-1100.0.33.16)]

  • OCI Python SDK version:

    2.10.4

  • OCI Ansible Modules version:

    1.15.0

Ansible playbook to reproduce the issue

- name: Create a new image from a specified instance
    oci_image:
      name: "{{ name }}"
      region: "{{ region }}"
      compartment_id: "{{ compartment }}"
      instance_id: "{{ instance_id }}"
      #launch_mode: "{{ images[region][image].launch_mode | default('NATIVE') }}"
    register: result
    tags: create_image
  - debug:
      var: result
@AmeyaLokre
Copy link
Member

hello @skydreamerr, thank you for bringing this to our attention. A fix for this bug will be coming in the next release. In the meanwhile, the oci_image can be created with same launch_options as the Oracle provided image when the launch_mode is set to PARAVIRTUALIZED.

@AmeyaLokre
Copy link
Member

hello @skydreamerr , this has been fixed in the new release of the oci-ansible-modules.
https://github.com/oracle/oci-ansible-modules/releases/tag/v1.17.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants