apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
  name: notboot-centosstream9
spec:
  dataVolumeTemplates:
    - metadata:
        name: notboot-centosstream9-volume
      spec:
        sourceRef:
          kind: DataSource
          name: centos-stream9
          namespace: openshift-virtualization-os-images
        storage:
          resources:
            requests: {}
  instancetype:
    kind: virtualmachineclusterinstancetype
    name: u1.medium
  preference:
    kind: virtualmachineclusterpreference
    name: centos.9.stream
  running: true
  template:
    spec:
      accessCredentials:
        - sshPublicKey:
            propagationMethod:
              qemuGuestAgent:
                users:
                  - cloud-user
            source:
              secret:
                secretName: authorized-keys
      domain:
        devices:
          disks:
            - disk:
                bus: virtio
              name: notboot-centosstream9-disk
            - disk:
                bus: virtio
              name: cloudinitdisk
        machine:
          type: pc-q35-rhel9.2.0
        resources: {}
      volumes:
        - dataVolume:
            name: notboot-centosstream9-volume
          name: notboot-centosstream9-disk
        - cloudInitConfigDrive:
            userData: |
              #cloud-config
              user: centos
              password: n3uh-x8ml-co0u
              chpasswd:
                expire: false
          name: cloudinitdisk
---
apiVersion: v1
kind: Secret
metadata:
  name: authorized-keys
data:
  # base64 -w 0 < ~/.ssh/id_rsa.pub
  key: c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFCQVFDMU0rTDNSMUh4YjI3bFdjdjBJU01nYzhQcHVTcG1XUnRNTWFoR3BtRU5xQk5SSkZXbVhnMVlkeTFxRTNOSXJ4VzdGZmxZelRyOXlnRXZvZDhVNDBmVkNpMnRybnhEd2g5UHJUNzBCS29TcHZLazlTSzZ6ME10SWgxUEk5SDM0ME5YSW5DRGdwZkFFK200eVcwaFlQUWtkZzFZajRQOElVZEczV3pvOHZxK0dmM0M2aHVCVG5HNmpNekZVZEFGcUxrd0hEY3hRc0RjcXl2UFdvU0NzREg1OTM3aWRVZDE0MTRXRlU3bW5xOTBIRXRZbjFYcmt5SUpPSzFtOVk3K3RkSW1jNWJDcjNhN2J3WXVBRWZ6M2pZOGh5NVFYZDdWb29RaXg4UW5vMCtsOE9TWFZBWExaOW1lVGdkRUwxcEJ4Y2hUY2ZsZWU0ekhjQk5RMXdEZnNUSnYgZG9taW5pa0B0NDYwcAo=

