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

proxmox_kvm: VM created with OVMF BIOS are invalid #1638

Closed
jqueuniet opened this issue Jan 14, 2021 · 3 comments · Fixed by #4106
Closed

proxmox_kvm: VM created with OVMF BIOS are invalid #1638

jqueuniet opened this issue Jan 14, 2021 · 3 comments · Fixed by #4106
Labels
bug This issue/PR relates to a bug cloud module module needs_triage plugins plugin (any type) python3

Comments

@jqueuniet
Copy link

SUMMARY

EFI virtual machines created with proxmox_kvm don't work, the EFI disk is missing and the boot order is missing the disks.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

proxmox_kvm

ANSIBLE VERSION
ansible 2.10.4
  config file = /home/johann/blade/ansible/ansible.cfg
  configured module search path = ['/home/johann/blade/ansible/library/modules', '/home/johann/blade/ansible/.imported_roles/lae.proxmox/library']
  ansible python module location = /home/johann/.local/lib/python3.9/site-packages/ansible
  executable location = /home/johann/.local/bin/ansible
  python version = 3.9.1+ (default, Jan 10 2021, 15:42:50) [GCC 10.2.1 20201224]

❯ ansible-galaxy collection list

# /home/johann/blade/ansible/.imported_collections/ansible_collections
Collection           Version
-------------------- -------
ansible.netcommon    1.4.1  
ansible.posix        1.1.1  
community.general    1.3.3  
community.kubernetes 1.1.1  
google.cloud         1.0.1  
netbox.netbox        1.2.0  
CONFIGURATION
CACHE_PLUGIN(/home/johann/blade/ansible/ansible.cfg) = jsonfile
CACHE_PLUGIN_CONNECTION(/home/johann/blade/ansible/ansible.cfg) = /tmp/facts_cache
CACHE_PLUGIN_TIMEOUT(/home/johann/blade/ansible/ansible.cfg) = 7200
COLLECTIONS_PATHS(/home/johann/blade/ansible/ansible.cfg) = ['/home/johann/blade/ansible/.imported_collections', '/home/johann/.ansible/coll>
COMMAND_WARNINGS(/home/johann/blade/ansible/ansible.cfg) = True
DEFAULT_BECOME(/home/johann/blade/ansible/ansible.cfg) = False
DEFAULT_FILTER_PLUGIN_PATH(/home/johann/blade/ansible/ansible.cfg) = ['/home/johann/blade/ansible/library/filters']
DEFAULT_FORKS(/home/johann/blade/ansible/ansible.cfg) = 10
DEFAULT_GATHERING(/home/johann/blade/ansible/ansible.cfg) = smart
DEFAULT_LOOKUP_PLUGIN_PATH(/home/johann/blade/ansible/ansible.cfg) = ['/home/johann/blade/ansible/library/lookup']
DEFAULT_MODULE_PATH(/home/johann/blade/ansible/ansible.cfg) = ['/home/johann/blade/ansible/library/modules', '/home/johann/blade/ansible/.im>
DEFAULT_MODULE_UTILS_PATH(/home/johann/blade/ansible/ansible.cfg) = ['/home/johann/blade/ansible/.imported_roles/lae.proxmox/module_utils']
DEFAULT_ROLES_PATH(/home/johann/blade/ansible/ansible.cfg) = ['/home/johann/blade/ansible/.imported_roles', '/home/johann/blade/ansible/role>
DEPRECATION_WARNINGS(/home/johann/blade/ansible/ansible.cfg) = True
HOST_KEY_CHECKING(/home/johann/blade/ansible/ansible.cfg) = False
INTERPRETER_PYTHON(/home/johann/blade/ansible/ansible.cfg) = auto_legacy_silent
SYSTEM_WARNINGS(/home/johann/blade/ansible/ansible.cfg) = True
TRANSFORM_INVALID_GROUP_CHARS(/home/johann/blade/ansible/ansible.cfg) = silently
OS / ENVIRONMENT

Targeted Proxmox server is running 6.3-3

STEPS TO REPRODUCE
- name: Create KVM instances
  proxmox_kvm:
    api_host: "{{ proxmox.api_host }}"
    api_user: "root@pam"
    api_password: "{{ proxmox.password }}"
    state: present
    name: "{{ item.name }}"
    description: "{{ item.description }}"
    node: "{{ item.node }}"
    boot: "cn"
    ostype: "{{ item.ostype }}"
    cores: "{{ item.cpu_cores }}"
    memory: "{{ item.memory }}"
    balloon: 0
    net: "{{ item.net | items2dict }}"
    scsi: "{{ item.disks }}"
    scsihw: virtio-scsi-pci
    agent: yes
    bios: ovmf
    machine: q35
    vga: qxl
    serial: '{"serial0": "socket"}'
    cpu: "{{ proxmox.cpu_type }}"
    cpuunits: 1000
    kvm: yes
    acpi: yes
    autostart: yes
  loop: "{{ proxmox_admin_kvm }}"
proxmox:
  api_user: automation@pve
  api_password: YYYYYYYYYY
  api_host: XXXXXXXXXXXXX
  node: XXXX
  searchdomain: "{{ ansible_domain }}"
  password: ZZZZZZZZZZZZ
  cpu_type: EPYC

proxmox_admin_kvm:
- name: smtp1
  description: SMTP relay
  ostype: l26
  node: XXXX
  cpu_cores: 1
  memory: 1024
  net:
    - key: net0
      value: virtio,bridge=vmbr101
  disks: {"scsi0": "local:15,format=qcow2"}

I stripped the bootstrap part, but short story, we're using qemu args to start debian-installer images with direct boot and preseed parameters.

EXPECTED RESULTS

VM is created with a valid specification

ACTUAL RESULTS

The VM specification has two issues:

  • The Proxmox EFI disk used to store EFI vars for the VM is missing, should be added before bootstrap (creation should be required if ovmf is chosen as bios, the web UI won't let you proceed without one)
  • The boot order is missing the disks, mentionning only the network cards. I need to manually enable scsi0 and put it at the top of the list or the VM won't start after bootstraping.
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added affects_2.10 bug This issue/PR relates to a bug cloud module module needs_triage plugins plugin (any type) python3 labels Jan 14, 2021
@ansibullbot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug cloud module module needs_triage plugins plugin (any type) python3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants