Closed
Description
problem
While testing #10912 I tried to start a VM with the following script in the userdata:
## template: jinja
#cloud-config
runcmd:
- echo 'TEST' >> /tmp/test1
After the VM was started, the file /tmp/test1 was missing, meaning that the script didn't execute.
versions
I used a CentOS 7 template with cloud-init, on a isolated network with ConfigDrive for userdata enabled. The same scenario works with KVM. Tested on CloudStack version 4.19.
The steps to reproduce the bug
- Create Isolated network offering with ConfigDrive support for userdata and a network using this offering.
- Prepare some userdata script(s).
- Deploy a VM from a template with cloud-init installed, on the network we prepared in step 1, using the userdata prepared in step 2.
Expected result: The script must be executed on the VM start.
Actual result: The script is not executed.
What to do about it?
Improve XCPNG (XenServer) handling of ConfigDrive.