My end goal is for a non-root user to import a .qcow2 image in order to create a VM as part of a CI/CD pipeline.
I'm currently trying to use the Ansible proxmox_kvm module. Unsurprisingly, I'm hitting the following error due to permissions issues:
Here are the contents of `create_proxmox_vm.yaml` with the sensitive data removed:
The error message "Only root can pass arbitrary filesystem paths" seems to indicate that there is a non-arbitrary filesystem path that I might be able to point this to. Where would that location be? Does such a location exist?
Thank you!
I'm currently trying to use the Ansible proxmox_kvm module. Unsurprisingly, I'm hitting the following error due to permissions issues:
Code:
$ ansible-playbook -i inventory.yaml create_proxmox_vm.yaml -v
No config file found; using defaults
PLAY [Create a VM in proxmox from a .qcow2 file] ***********************************************************************************************************
TASK [Gathering Facts] *************************************************************************************************************************************
ok: [localhost]
TASK [Create new container with minimal options] ***********************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "creation of qemu VM ansible-vm-test with vmid 1000 failed with exception=500 Internal Server Error: Only root can pass arbitrary filesystem paths. at /usr/share/perl5/PVE/Storage.pm line 542.", "vmid": 1000}
PLAY RECAP *************************************************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Here are the contents of `create_proxmox_vm.yaml` with the sensitive data removed:
Code:
- name: Create a VM in proxmox from a .qcow2 file
hosts: localhost
tasks:
- name: Create new container with minimal options
community.general.proxmox_kvm:
vmid: 1000
node: test1
api_host: test1.test.com
api_user: <api_user_here>
api_password: <password_here>
name: ansible-vm-test
sata:
sata0: local:0,import-from=/home/josh/myimage.qcow2,format=qcow2
bootdisk: sata0
The error message "Only root can pass arbitrary filesystem paths" seems to indicate that there is a non-arbitrary filesystem path that I might be able to point this to. Where would that location be? Does such a location exist?
Thank you!