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: unable to mount cloudinit drive #9593

Open
1 task done
drhirn opened this issue Jan 21, 2025 · 2 comments
Open
1 task done

proxmox_kvm: unable to mount cloudinit drive #9593

drhirn opened this issue Jan 21, 2025 · 2 comments
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type)

Comments

@drhirn
Copy link

drhirn commented Jan 21, 2025

Summary

I am trying to clone a template and add a cloudinit ide drive afterwards. Cloning works fine, but the cloudinit-drive is not added to the virtual machine.

Issue Type

Bug Report

Component Name

proxmox_kvm

Ansible Version

ansible [core 2.18.1]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /root/.local/pipx/venvs/ansible/lib/python3.11/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /root/.local/bin/ansible
  python version = 3.11.2 (main, Aug 26 2024, 07:20:54) [GCC 12.2.0] (/root/.local/pipx/venvs/ansible/bin/python)
  jinja version = 3.1.4
  libyaml = True

Community.general Version

community.general 10.1.0

Configuration

No response

OS / Environment

Debian GNU/Linux 12 (bookworm)

Steps to Reproduce

--
- name: Clone a Windows-VM from a template

  hosts: 'proxmox'
  tasks:
    - name: Create Container
      community.general.proxmox_kvm:
        api_host: 'proxmox.example.com'
        api_user: 'user@pam'
        api_token_id: 'id'
        api_token_secret: 'token'
        node: 'proxmox'

        clone: 'vmname'
        full: 'false'
        name: 'ansible-test-vm'
        description: "a cloned vm"
        nameservers: '192.0.2.251'
        agent: true

        cores: 1
        sockets: 1
        cpu: x86-64-v2-AES
        ipconfig:
          ipconfig0: 'gw=192.0.2.254, ip=192.0.2.211/24'
        onboot: false
        ostype: 'win10'

        memory: '512'
        scsi:
          scsi0: 'zfs-ssd:40,format=raw'
        ide: '{"ide0":"local:cloudinit"}'
#  Tried this ones too
#        ide:
#          ide0: 'local:cloudinit'
#          ide1: 'local:cloudinit,format=qcow2'
#          ide2: 'local:vm-110-cloudinit,media=cdrom'
        newid: 110
        ciuser: 'username'
        cipassword: 'supersecret'
        citype: "configdrive2"
        searchdomains: 'example.com'

        state: 'present'

Expected Results

Expected to have a cloudinit drive attached to the vm config. But no matter which "ide"-definition I use, there is no cdrom added to the virtual machine.

Actual Results

Resulting config:

agent: 1
boot: order=virtio0;net0
cores: 2
cpu: x86-64-v2-AES
machine: pc-i440fx-9.0
memory: 2048
meta: creation-qemu=9.0.2,ctime=1736858987
name: ansible-test-vm
net0: virtio=BC:24:11:02:D3:EF,bridge=vmbr0,firewall=1
numa: 0
ostype: win10
scsihw: virtio-scsi-pci
smbios1: uuid=7b2c793f-58ab-4990-b641-6afd77fb68c1
sockets: 1
tags: cloudinit;windows
virtio0: zfs-ssd:base-9003-disk-0/vm-110-disk-0,backup=0,iothread=1,size=20G
vmgenid: 1d811bdc-68bd-4d42-9b35-70ef3443c265

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, 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 bug This issue/PR relates to a bug module module plugins plugin (any type) labels Jan 21, 2025
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 module module plugins plugin (any type)
Projects
None yet
Development

No branches or pull requests

2 participants