Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug after cloning a VM/Template with advanced settings and vapp properties since VMWare version 8.0.3d. #2259

Open
Kronk74 opened this issue Nov 29, 2024 · 0 comments

Comments

@Kronk74
Copy link

Kronk74 commented Nov 29, 2024

SUMMARY

Advanced setting seems doesn't properly when deploying a template or clone VM.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

vmware_guest

ANSIBLE VERSION
ansible-core>=2.17.0
COLLECTION VERSION
- name: community.vmware
  version: 5.1.0
OS / ENVIRONMENT

quay.tpg.ch/external/rockylinux:9.3

STEPS TO REPRODUCE

I experienced this issue deploying Openshift OVF templates. Machine didn't like clonage with vapp properties and advanced seettings since new VMWare version 8.0.3d.
My playbook was working well until this update.

- name: "Create virtual machine : {{ vm.name }}"
  community.vmware.vmware_guest:
    username: "{{ vcenter.username }}"
    password: "{{ vcenter.password }}"
    folder: "{{ vm.folder }}"
    hostname: "{{ vcenter.url }}"
    datacenter: "{{ vm.datacenter }}"
    cluster: "{{ vm.cluster | default(omit) }}"
    name: "{{ vm.name }}"
    state: "{{ vm.state }}"
    template: "{{ vm.template }}"
    datastore: "{{ datastore_selected_name | default(omit)}}"
    hardware:
      memory_mb: "{{ vm.hardware.memory_mb }}"
      num_cpus: "{{ vm.hardware.num_cpus }}"
      hotadd_cpu: "{{ vm.hardware.hotadd_cpu }}"
      hotadd_memory: "{{ vm.hardware.hotadd_memory }}"
      hotremove_cpu: "{{ vm.hardware.hotremove_cpu }}"
    networks: "{{ vm.networks }}"
    vapp_properties:
      - id: guestinfo.ignition.config.data
        value: "{{ lookup('ansible.builtin.file', installer_working_dir + '/' + vm.name + '-first-boot.ign', errors='ignore') | b64encode | default(null) }}"
      - id: guestinfo.ignition.config.data.encoding
        value: base64
    advanced_settings:
      - key: guestinfo.afterburn.initrd.network-kargs
        value: "ip={{ vm.networks[0].ip }}::{{ vm.networks[0].gateway }}:{{ vm.networks[0].netmask }}:{{ vm.name }}:ens192:none{% for dns_srv in vm.networks[0].dns_servers -%}:{{ dns_srv }}{% endfor -%}"
      - key: disk.EnableUUID
        value: "TRUE"
  register: deployed_vm
EXPECTED RESULTS

I'll not explain in detail OpenShift bootstrap process but OS used is CoreOS. Ignition phase will get its configuration from a web server and start ignition phase. The VM should configure its IP from its advanced setings configured and boot as usual.

ACTUAL RESULTS

After this ignition phase, the machine reboot and then lose their IPs.

Using GOVC command and vmware.vmwre_rest collection I don't have this issue anymore. But I really appreciate community.vmware collection and I'd like to know if someone already had this issue.

There's a reddit thread openned concerning this issue for more information : https://www.reddit.com/r/openshift/comments/1grtlpg/strange_behavior_during_openshift_installation/

Best regards

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

No branches or pull requests

1 participant