diff --git a/ubuntu-vm-2/ubuntu/ubuntu-vm.yaml b/ubuntu-vm-2/ubuntu/ubuntu-vm.yaml index fa99bf6..78e909a 100644 --- a/ubuntu-vm-2/ubuntu/ubuntu-vm.yaml +++ b/ubuntu-vm-2/ubuntu/ubuntu-vm.yaml @@ -1,22 +1,3 @@ ---- -apiVersion: cdi.kubevirt.io/v1beta1 -kind: DataVolume -metadata: - name: ubuntu-dv-2 - namespace: kubevirt-vms -spec: - source: - http: - url: "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img" - contentType: kubevirt - pvc: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 40Gi - storageClassName: standard ---- apiVersion: kubevirt.io/v1 kind: VirtualMachine metadata: @@ -34,13 +15,34 @@ spec: cores: 2 devices: disks: - - name: rootdisk - disk: + - disk: bus: virtio + name: containerdisk + - disk: + bus: virtio + name: cloudinitdisk resources: requests: memory: 2Gi + cpu: 1 + limits: + memory: 2Gi + cpu: 2 + memory: + guest: 2Gi volumes: - - name: rootdisk - persistentVolumeClaim: - claimName: ubuntu-dv-2 \ No newline at end of file + - name: containerdisk + containerDisk: + image: quay.io/containerdisks/ubuntu:22.04 + - name: cloudinitdisk + cloudInitNoCloud: + userData: | + #cloud-config + hostname: ubuntu-vm-2 + ssh_pwauth: True + users: + - name: ubuntu + ssh-authorized-keys: + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPqlhZW/pPLK8zENt3o6tgl0QVinhGAF1sHvajqq3UvI ubuntu + sudo: ['ALL=(ALL) NOPASSWD:ALL'] + shell: /bin/bash \ No newline at end of file