Example: Post-provision cloud script
This example shows a cloud script that runs after a user provisions a virtual machine.
Avant de commencer
- Role required: cloud_admin
- OS resource profile that is mapped to an image template. The user provisions a resource using the profile. You must add basic authentication credentials to the image.
- Compute resource profile that is mapped to a hardware type.
Pourquoi et quand exécuter cette tâche
Procédure
- Create a cloud script template and a cloud script that refers to the template.
-
Open the virtual server resource block, and then follow these steps:
- Publish the virtual server resource block, and use it in a blueprint that in turn is published to a catalog item.
- Launch a new stack to provision a VM and specify the OS profile and Compute profile that you created as a prerequisite.