github.com/Equinix-Metal/virtlet@v1.5.2-0.20210807010419-342346535dc5/examples/ubuntu-vm-with-libvirt-cpusetting.yaml (about)

     1  # This example is ubuntu-vm.yaml one extended with cpu setting by libvirt domain definition
     2  apiVersion: v1
     3  kind: Pod
     4  metadata:
     5    name: ubuntu-vm-with-nested-virtualization
     6    annotations:
     7      kubernetes.io/target-runtime: virtlet.cloud
     8      VirtletSSHKeys: |
     9        ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCaJEcFDXEK2ZbX0ZLS1EIYFZRbDAcRfuVjpstSc0De8+sV1aiu+dePxdkuDRwqFtCyk6dEZkssjOkBXtri00MECLkir6FcH3kKOJtbJ6vy3uaJc9w1ERo+wyl6SkAh/+JTJkp7QRXj8oylW5E20LsbnA/dIwWzAF51PPwF7A7FtNg9DnwPqMkxFo1Th/buOMKbP5ZA1mmNNtmzbMpMfJATvVyiv3ccsSJKOiyQr6UG+j7sc/7jMVz5Xk34Vd0l8GwcB0334MchHckmqDB142h/NCWTr8oLakDNvkfC1YneAfAO41hDkUbxPtVBG5M/o7P4fxoqiHEX+ZLfRxDtHB53 me@localhost
    10      # Set VirtletCPUModel to host-model to enable nested virtualization
    11      VirtletCPUModel: host-model
    12      # Set VirtletLibvirtCPUSetting to directly use cpu definition of libvirt
    13      # for "mode": host-model, host-passthrough,custom
    14      # for "model": Westmere, SandyBridge, etc.  see file: /usr/local/share/libvirt/cpu_map.xml
    15      # The VirtletLibvirtCPUSetting take precedence over VirtletCPUModel.
    16      VirtletLibvirtCPUSetting: |
    17        mode: custom
    18        model:
    19          value: Westmere
    20        features:
    21        - name: avx
    22          policy: disable
    23  spec:
    24    nodeSelector:
    25      extraRuntime: virtlet
    26  
    27    # This is the number of seconds Virtlet gives the VM to shut down cleanly.
    28    # The default value of 30 seconds is ok for containers but probably too
    29    # low for VM, so overriding it here is strongly advised.
    30    terminationGracePeriodSeconds: 120
    31    containers:
    32    - name: ubuntu-vm
    33      image: virtlet.cloud/cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
    34      imagePullPolicy: IfNotPresent
    35      # tty and stdin required for `kubectl attach -t` to work
    36      tty: true
    37      stdin: true