kubevirt: Unable to start a VirtualMachineInstance on Mac Apple Silicon.

What happened: It is impossible to run a VM on a MacBook Pro M1 Pro (Apple Silicon/aarch64). When doing a kubectl get vmi -o yaml I get the following error:

- lastProbeTime: null lastTransitionTime: "2024-05-14T15:29:49Z" message: 'server error. command SyncVMI failed: "LibvirtError(Code=67, Domain=10, Message=''unsupported configuration: CPU mode ''host-passthrough'' for aarch64 qemu domain on aarch64 host is not supported by hypervisor'')"' reason: Synchronizing with the Domain failed.

What you expected to happen: The VM should start properly.

How to reproduce it (as minimally and precisely as possible): As suggested in kubevirt/kubevirt#10055, I enabled SW Emulation. Moreover, I’m trying to run an ARM64 vm. I used the following config for the virtual machine instance:

apiVersion: kubevirt.io/v1
kind: VirtualMachineInstance
metadata:
  name: testvm
spec:
  domain:
    machine:
      type: virt
    cpu:
      model: host-passthrough
    devices:
      disks:
        - disk:
            bus: virtio
          name: harddisk
      interfaces:
      - name: default
        masquerade: {}
    resources:
      requests:
        memory: 64M
  networks:
  - name: default
    pod: {}
  volumes:
    - name: harddisk
      persistentVolumeClaim:
        claimName: arm-dv

I found one with the same problem here.

Additional context: No other things to report.

Environment:

  • KubeVirt version (use virtctl version): 1.2.0
  • Kubernetes version (use kubectl version): v1.29.2
  • VM or VMI specifications: N/A
  • Cloud provider or hardware configuration: MacBook Pro M1 Pro
  • OS (e.g. from /etc/os-release): Sonoma 14.5 (MacOS)
  • Kernel (e.g. uname -a): Darwin
  • Install tools: brew
  • Others: N/A

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 3
  • Comments: 25 (19 by maintainers)

Most upvoted comments

I have exactly the same issue when I try to run Kubevirt on an M1 MacBook:

Message='unsupported configuration: CPU mode 'host-passthrough' for aarch64 qemu domain on aarch64 host is not supported by hypervisor')"

Relevant logs:

$ cat testvm.yaml
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
  name: testvm
spec:
  running: false
  template:
    metadata:
      labels:
        kubevirt.io/size: small
        kubevirt.io/domain: testvm
    spec:
      domain:
        cpu:
          model: host-passthrough
        devices:
          disks:
            - name: containerdisk
              disk:
                bus: virtio
            - name: cloudinitdisk
              disk:
                bus: virtio
          interfaces:
          - name: default
            masquerade: {}
        resources:
          requests:
            memory: 64M
      networks:
      - name: default
        pod: {}
      volumes:
        - name: containerdisk
          containerDisk:
            image: quay.io/kubevirt/cirros-container-disk-demo
        - name: cloudinitdisk
          cloudInitNoCloud:
            userDataBase64: SGkuXG4=
$ kubectl describe vm testvm
Name:         testvm
Namespace:    default
Labels:       <none>
Annotations:  kubevirt.io/latest-observed-api-version: v1
              kubevirt.io/storage-observed-api-version: v1
API Version:  kubevirt.io/v1
Kind:         VirtualMachine
Metadata:
  Creation Timestamp:  2024-06-01T13:34:57Z
  Finalizers:
    kubevirt.io/virtualMachineControllerFinalize
  Generation:        2
  Resource Version:  3483
  UID:               0fa843e5-4cf3-4665-9597-735dcbb023b3
Spec:
  Running:  true
  Template:
    Metadata:
      Creation Timestamp:  <nil>
      Labels:
        kubevirt.io/domain:  testvm
        kubevirt.io/size:    small
    Spec:
      Architecture:  arm64
      Domain:
        Cpu:
          Model:  host-passthrough
        Devices:
          Disks:
            Disk:
              Bus:  virtio
            Name:   containerdisk
            Disk:
              Bus:  virtio
            Name:   cloudinitdisk
          Interfaces:
            Masquerade:
            Name:  default
        Machine:
          Type:  virt
        Resources:
          Requests:
            Memory:  64M
      Networks:
        Name:  default
        Pod:
      Volumes:
        Container Disk:
          Image:  quay.io/kubevirt/cirros-container-disk-demo
        Name:     containerdisk
        Cloud Init No Cloud:
          userDataBase64:  SGkuXG4=
        Name:              cloudinitdisk
Status:
  Conditions:
    Last Probe Time:       2024-06-01T13:35:09Z
    Last Transition Time:  2024-06-01T13:35:09Z
    Message:               Guest VM is not reported as running
    Reason:                GuestNotRunning
    Status:                False
    Type:                  Ready
    Last Probe Time:       <nil>
    Last Transition Time:  <nil>
    Status:                True
    Type:                  LiveMigratable
    Last Probe Time:       <nil>
    Last Transition Time:  2024-06-01T13:35:15Z
    Message:               server error. command SyncVMI failed: "LibvirtError(Code=67, Domain=10, Message='unsupported configuration: CPU mode 'host-passthrough' for aarch64 qemu domain on aarch64 host is not supported by hypervisor')"
    Reason:                Synchronizing with the Domain failed.
    Status:                False
    Type:                  Synchronized
  Created:                 true
  Desired Generation:      2
  Observed Generation:     2
  Printable Status:        Starting
  Run Strategy:            Always
  Volume Snapshot Statuses:
    Enabled:  false
    Name:     containerdisk
    Reason:   Snapshot is not supported for this volumeSource type [containerdisk]
    Enabled:  false
    Name:     cloudinitdisk
    Reason:   Snapshot is not supported for this volumeSource type [cloudinitdisk]
Events:
  Type    Reason            Age    From                       Message
  ----    ------            ----   ----                       -------
  Normal  SuccessfulCreate  2m18s  virtualmachine-controller  Started the virtual machine by creating the new virtual machine instance testvm