| --- |
| apiVersion: kubevirt.io/v1 |
| kind: VirtualMachine |
| metadata: |
| labels: |
| kubevirt.io/vm: cirros-volumes |
| name: cirros-volumes |
| spec: |
| running: false |
| template: |
| metadata: |
| labels: |
| kubevirt.io/vm: cirros-volumes |
| spec: |
| domain: |
| devices: |
| disks: |
| - disk: |
| bus: virtio |
| name: containerdisk |
| - disk: |
| bus: virtio |
| name: cloudinitdisk |
| - disk: |
| bus: virtio |
| name: host-disk |
| - disk: |
| bus: virtio |
| name: metrics |
| - disk: |
| bus: virtio |
| name: mypvcdisk |
| resources: |
| requests: |
| memory: 128Mi |
| terminationGracePeriodSeconds: 0 |
| volumes: |
| - containerDisk: |
| image: docker.io/jumpojoy/kubevirt-cirros:0.6.2 |
| name: containerdisk |
| - name: mypvcdisk |
| persistentVolumeClaim: |
| claimName: cirros-volumes |
| - hostDisk: |
| capacity: 1Gi |
| path: /data/disk.img |
| type: DiskOrCreate |
| name: host-disk |
| - name: metrics |
| downwardMetrics: {} |
| - cloudInitNoCloud: |
| userData: | |
| #!/bin/sh |
| echo 'printed from cloud-init userdata' |
| name: cloudinitdisk |