
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,373 Views
Would it be possible to point to how we can configure the VM with additional software on boot , like some set of installations on start of the VM or run a set of commands
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,355 Views
You can see an example on 7.4.2.3.4 -> https://docs.redhat.com/en/documentation/openshift_container_platform/4.15/html-single/virtualizatio...
--
- cloudInitNoCloud: 1
userData: |-
#cloud-config
runcmd:
- [ setsebool, -P, virt_qemu_ga_manage_ssh, on ]
- [ 'sh', '-c', '/bin/yourverylongcommandhere --options --whatever --force']
--
Add as many lines under "runcmd:" as you need with the specific commands to configure your instance. However, before getting too crazy you probably want to use something else like Ansible (or Ansible Automation Platform) to perform your operating system configuration, rather than something embedded into the VM creation process.
In this step you want to configure the bare minimum to make your VM reachable on the net, and manageable by your existing tools (create users, inject SSH keys, configure networking, etc). Anything beyond that usually belongs to Ansible Automation Platform.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,356 Views
You can see an example on 7.4.2.3.4 -> https://docs.redhat.com/en/documentation/openshift_container_platform/4.15/html-single/virtualizatio...
--
- cloudInitNoCloud: 1
userData: |-
#cloud-config
runcmd:
- [ setsebool, -P, virt_qemu_ga_manage_ssh, on ]
- [ 'sh', '-c', '/bin/yourverylongcommandhere --options --whatever --force']
--
Add as many lines under "runcmd:" as you need with the specific commands to configure your instance. However, before getting too crazy you probably want to use something else like Ansible (or Ansible Automation Platform) to perform your operating system configuration, rather than something embedded into the VM creation process.
In this step you want to configure the bare minimum to make your VM reachable on the net, and manageable by your existing tools (create users, inject SSH keys, configure networking, etc). Anything beyond that usually belongs to Ansible Automation Platform.