cloud-init : Cannot read properties of undefined (reading 'forEach')
-
Hi all,
I have the following cloud-config template:
#cloud-config users: - name: userx groups: - sudo sudo: - ALL=(ALL) NOPASSWD:ALL shell: /bin/bash ssh_authorized_keys: - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5fdsafdasfasfdasfdsafmDSqIko2UD8o userx@clientx.local"code_text
Creating a vm int he XO webinterface failes with the error "Cannot read properties of undefined (reading 'forEach')" when I use this cloud-init template.
I can run the xo-cli command with the same template without any problem:
xo-cli vm.create bootAfterCreate=true cloudConfig="$(cat /root/user.yaml)" clone=true name_label="Test VM" template=afde76ab-bfc5-ebd1-3bab-21116e77fc97 hvmBootFirmware=uefi efd54d95-32ad-39b7-3d20-55b74b9211fb root@a5820ee6bc16:~# cat user.yaml #cloud-config users: - name: userx groups: - sudo sudo: - ALL=(ALL) NOPASSWD:ALL shell: /bin/bash ssh_authorized_keys: - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5fdsafdasfasfdasfdsafmDSqIko2UD8o userx@clientx.local"
I am runningen XO in a docker container: image: ronivay/xen-orchestra:latest
Thanks in advance,
Carlo -
@carloum70 What is your current commit? Can you show us the complete error log (check under Settings > Logs)?
-
@Danp commit: https://github.com/vatesfr/xen-orchestra/commit/a62ac1ab8205ac36d2d60710c6475db41322c2d9
There is no logging.
-
After updating the docker image to the latest version ( commit 82891 )I can create a VM without any problem. Thank you for pointing me in the right direction.
-
@carloum70 You're welcome! It's always best to test using the latest source to avoid reporting an issue that has already been fixed.
-
Indeed, and it's clearly stated at https://docs.xen-orchestra.com/community