Skip to content

Userdata scripts are not executed when using Config drive on XCPNG #10925

Closed
@vladimirpetrov

Description

@vladimirpetrov

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

  1. Create Isolated network offering with ConfigDrive support for userdata and a network using this offering.
  2. Prepare some userdata script(s).
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions