Skip to content

Instantly share code, notes, and snippets.

@ams0
Last active October 2, 2020 08:32
Show Gist options
  • Save ams0/9a140582c5c3ede01278e800dcbd90ac to your computer and use it in GitHub Desktop.
Save ams0/9a140582c5c3ede01278e800dcbd90ac to your computer and use it in GitHub Desktop.
kubectl apply -f - <<EOF
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachine
metadata:
generation: 1
labels:
kubevirt.io/os: windows
name: vm1
spec:
running: true
template:
metadata:
labels:
kubevirt.io/domain: vm1
spec:
nodeSelector: #nodeSelector matches nodes where performance key has high as value.
nested: "true"
domain:
cpu:
cores: 2
devices:
disks:
- cdrom:
bus: sata
bootOrder: 1
name: iso
- disk:
bus: virtio
name: harddrive
- cdrom:
bus: sata
readonly: true
name: virtio-drivers
machine:
type: q35
resources:
requests:
memory: 4096M
volumes:
- name: harddrive
persistentVolumeClaim:
claimName: winhd
- name: iso
containerDisk:
image: <registry>/<repo>/w2k9_iso:sep2020
- name: virtio-drivers
containerDisk:
image: kubevirt/virtio-container-disk
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment