mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-03-26 19:03:16 +00:00
Add examples that show how to use the collection with stopped VMs. Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
30 lines
805 B
YAML
30 lines
805 B
YAML
---
|
|
- name: Playbook creating a stopped virtual machine
|
|
hosts: localhost
|
|
tasks:
|
|
- name: Create VM
|
|
kubevirt.core.kubevirt_vm:
|
|
state: present
|
|
name: testvm-stopped
|
|
namespace: default
|
|
running: false
|
|
instancetype:
|
|
name: u1.medium
|
|
preference:
|
|
name: fedora
|
|
spec:
|
|
domain:
|
|
devices: {}
|
|
volumes:
|
|
- containerDisk:
|
|
image: quay.io/containerdisks/fedora:latest
|
|
name: containerdisk
|
|
- cloudInitNoCloud:
|
|
userData: |-
|
|
#cloud-config
|
|
# The default username is: fedora
|
|
ssh_authorized_keys:
|
|
- ssh-ed25519 AAAA...
|
|
name: cloudinit
|
|
wait: true
|