cancel
Showing results for 
Search instead for 
Did you mean: 
smunirat
Cadet
Cadet
  • 606 Views

How we can configure the VM with additional software on boot in Openshift Virtualization

Jump to solution

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

Labels (4)
1 Solution

Accepted Solutions
Fran_Garcia
Starfighter Starfighter
Starfighter
  • 588 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.

 

View solution in original post

1 Reply
Fran_Garcia
Starfighter Starfighter
Starfighter
  • 589 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.

 

Join the discussion
You must log in to join this conversation.