ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
832 stars 1.53k forks source link

Proxmox_kvm module ignores `storage` parameter when restore VM from backup #7520

Open NikolayShakin opened 1 year ago

NikolayShakin commented 1 year ago

Summary

When I create VM like this:

  - name: Create vm
    community.general.proxmox_kvm:
      api_user: "{{ api_user  }}"
      api_password: "{{ api_password }}"
      api_host: "{{ api_host }}"
      storage: local-zfs-nvme
      archive: nas:backup/debian-12.vma.zst
      name: test
      node: node1
      vmid: 11111
      onboot: true
      cpu: x86-64-v3
      cores: 4
      sockets: 1
      memory: 1024

I get VM but it's located on local-lvm looks like storage parameter wasn't considered

Issue Type

Bug Report

Component Name

proxmox_kvm

Ansible Version

ansible [core 2.15.5]
  config file = /Users/---/Documents/deployment/ansible.cfg
  configured module search path = ['/Users/---/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/---/.ansible/collections:/usr/share/ansible/collections
  executable location = /Library/Frameworks/Python.framework/Versions/3.10/bin/ansible
  python version = 3.10.5 (v3.10.5:f377153967, Jun  6 2022, 12:36:10) [Clang 13.0.0 (clang-1300.0.29.30)] (/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10)
  jinja version = 3.1.2
  libyaml = True

Community.general Version

Collection        Version
----------------- -------
community.general 8.0.0  

Configuration

DEFAULT_HOST_LIST(/Users/---/Documents/deployment/ansible.cfg) = ['/Users/---/Documents/deployment/inventory']
DEFAULT_PRIVATE_KEY_FILE(/Users/---/Documents/deployment/ansible.cfg) = /Users/---/.ssh/ansible
DEFAULT_ROLES_PATH(/Users/---/Documents/deployment/ansible.cfg) = ['/Users/---/Documents/deployment/roles']
DEFAULT_STDOUT_CALLBACK(/Users/---/Documents/deployment/ansible.cfg) = yaml
HOST_KEY_CHECKING(/Users/---/Documents/deployment/ansible.cfg) = False

OS / Environment

macOS 12.6

Steps to Reproduce

  - name: Create vm
    community.general.proxmox_kvm:
      api_user: "{{ api_user  }}"
      api_password: "{{ api_password }}"
      api_host: "{{ api_host }}"
      storage: local-zfs-nvme
      archive: nas:backup/debian-12.vma.zst
      name: test
      node: node1
      vmid: 11111
      onboot: true
      cpu: x86-64-v3
      cores: 4
      sockets: 1
      memory: 1024

Expected Results

VM deployed on storage: local-zfs-nvme

Actual Results

VM deployed on `local-lvm`

Code of Conduct

ansibullbot commented 1 year ago

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 commented 1 year ago

cc @Ajpantuso @Thulium-Drake @UnderGreen @helldorado @joshainglis @karmab click here for bot help

ansibullbot commented 9 months ago

cc @krauthosting click here for bot help