utmapp / UTM

Virtual machines for iOS and macOS
https://getutm.app
Apache License 2.0
27.02k stars 1.35k forks source link

Error: qemu-aarch64-softmmu: -netdev vmnet-shared,id=net0: cannot create vmnet interface: general failure (possibly not enough privileges) #3959

Closed 3DCoded closed 2 years ago

3DCoded commented 2 years ago

Describe the issue When booting a VM that used to work on v3.1.5, it gives me the error: qemu-aarch64-softmmu: -netdev vmnet-shared,id=net0: cannot create vmnet interface: general failure (possibly not enough privileges)

Configuration

Crash log If the app crashed, you need a crash log. To get your crash log, open Console.app, go to Crash Reports, and find the latest entry for either QEMU, QEMUHelper, or qemu-*. Right click and choose Reveal in Finder. Attach the report here.

Debug log For all issues, including crashes, you should attach a debug log. Open UTM, and open the settings for the VM you wish to launch. Near the top of the QEMU page is Debug Log. Turn it on and save the VM. After you experience the issue, open the VM settings again and select Export Log... and attach it here.

Running:  -L /Applications/UTM.app/Contents/Resources/qemu -S -qmp tcp:127.0.0.1:4000,server,nowait -nodefaults -vga none -spice unix=on,addr=(null),disable-ticketing=on,image-compression=off,playback-compression=off,streaming-video=off,gl=off -device virtio-ramfb -cpu host -smp cpus=4,sockets=1,cores=4,threads=1 -machine virt,highmem=off -accel hvf -accel tcg,tb-size=2048 -drive if=pflash,format=raw,unit=0,file=/Applications/UTM.app/Contents/Resources/qemu/edk2-aarch64-code.fd,readonly=on -drive "if=pflash,unit=1,file=/Users/christophermattar/Library/Containers/com.utmapp.UTM/Data/Documents/Ubuntu 22.utm/Images/efi_vars.fd" -boot menu=on -m 8192 -device intel-hda -device hda-duplex -name "Ubuntu 22" -device nec-usb-xhci,id=usb-bus -device usb-tablet,bus=usb-bus.0 -device usb-mouse,bus=usb-bus.0 -device usb-kbd,bus=usb-bus.0 -device qemu-xhci,id=usb-controller-0 -chardev spicevmc,name=usbredir,id=usbredirchardev0 -device usb-redir,chardev=usbredirchardev0,id=usbredirdev0,bus=usb-controller-0.0 -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=usb-controller-0.0 -chardev spicevmc,name=usbredir,id=usbredirchardev2 -device usb-redir,chardev=usbredirchardev2,id=usbredirdev2,bus=usb-controller-0.0 -device usb-storage,drive=cdrom0,removable=true,bootindex=0,bus=usb-bus.0 -drive if=none,media=cdrom,id=cdrom0 -device virtio-blk-pci,drive=drive0,bootindex=1 -drive "if=none,media=disk,id=drive0,file=/Users/christophermattar/Library/Containers/com.utmapp.UTM/Data/Documents/Ubuntu 22.utm/Images/data.qcow2,discard=unmap,detect-zeroes=unmap" -device virtio-net-pci,mac=46:83:96:1F:E2:15,netdev=net0 -netdev vmnet-shared,id=net0 -device virtio-serial -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 -chardev spicevmc,id=vdagent,debug=0,name=vdagent -device virtserialport,chardev=charchannel1,id=channel1,name=org.spice-space.webdav.0 -chardev spiceport,name=org.spice-space.webdav.0,id=charchannel1 -uuid 5436B164-CAD6-4ED2-9406-AA3837D7E0CD -device virtio-rng-pci
qemu-aarch64-softmmu: -netdev vmnet-shared,id=net0: cannot create vmnet interface: general failure (possibly not enough privileges)

Upload VM (Optional) If possible, upload the config.plist inside the .utm. If you do not have this, you can upload the entire .utm but note this contains your personal data. Since Github has an attachment size limit, you may want to upload to another service such as Google Drive. Link it here. config.plist.zip

osy commented 2 years ago
  1. Has it worked on 3.1.5?
  2. Do you have anything in your network setup that is unusual? (Like an external adapter or some internet sharing setup or something)
3DCoded commented 2 years ago

It has worked in 3.1.5 and my network setup doesn't have anything unusual.

3DCoded commented 2 years ago

This only happens when I try to build UTM myself.

osy commented 2 years ago

Ah in that case, it's expected. You need to have the special Apple entitlements for it to work (hence the error "possibly not enough privileges"

3DCoded commented 2 years ago

How do I set these entitlements?

osy commented 2 years ago

You need to have a paid developer account and email Apple technical support and request Hypervisor entitlements. They will ask you about your use case and after at most a few back and forth and a few weeks of waiting, your account will have access to them. Then you can follow the instructions in https://github.com/utmapp/UTM/blob/master/Documentation/MacDevelopment.md

3DCoded commented 2 years ago

OK. I will try an unsigned one for now. Thank you.

grantjanssen commented 2 years ago

I've not run UTM before, but wanted a local linux VM. This is UTM Version 3.2.4 (58), and I get this netdev/insufficient privileges error too.

grant@grants-EFILM-MacBookPro-M1:~[20220528-23:03][#330582]% hinv
kernel architecture is set to default
Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro18,2
      Chip: Apple M1 Max
      Total Number of Cores: 10 (8 performance and 2 efficiency)
      Memory: 64 GB
      System Firmware Version: 7459.121.3
      OS Loader Version: 7459.121.3
      Serial Number (system): GKVF79924N
      Hardware UUID: DD58F9EE-1E49-59A7-BBC8-1FF6ED983675
      Provisioning UDID: 00006001-000861090102801E
      Activation Lock Status: Disabled

Software:

    System Software Overview:

      System Version: macOS 12.4 (21F79)
      Kernel Version: Darwin 21.5.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Computer Name: grants-EFILM-MacBookPro-M1
      User Name: Grant Janssen (grant)
      Secure Virtual Memory: Enabled
      System Integrity Protection: Disabled
      Time since boot: 11 days 13:53

Graphics/Displays:

    Apple M1 Max:

      Chipset Model: Apple M1 Max
      Type: GPU
      Bus: Built-In
      Total Number of Cores: 32
      Vendor: Apple (0x106b)
      Metal Family: Supported, Metal GPUFamily Apple 7
      Displays:
        Thunderbolt Display:
          Resolution: 2560 x 1440 (QHD/WQHD - Wide Quad High Definition)
          UI Looks like: 2560 x 1440 @ 60.00Hz
          Main Display: Yes
          Mirror: Off
          Online: Yes
          Rotation: Supported
          Automatically Adjust Brightness: Yes
        Color LCD:
          Display Type: Built-in Liquid Retina XDR Display
          Resolution: 3456 x 2234 Retina
          Mirror: Off
          Online: Yes
          Automatically Adjust Brightness: Yes
          Connection Type: Internal

grant@grants-EFILM-MacBookPro-M1:~[20220528-23:03][#331582]%
grantjanssen commented 2 years ago

My debug log:

grant@grants-EFILM-MacBookPro-M1:~/Downloads[20220531-11:06][#322582]% more 20220531.debug.log
Running:  -L /Applications/UTM.app/Contents/Resources/qemu -S -qmp tcp:127.0.0.1:4000,server,nowait -nodefaults -vga none -spice "unix=on,addr=/Users/grant/Library/Group Containers/WDNLXAD4W8.com.utmapp.UTM/BBC144DA-140F-40D9-9FE6-7148A5C5998E.spice,disable-ticketing=on,image-compression=off,playback-compression=off,streaming-video=off,gl=off" -device virtio-ramfb -cpu host -smp cpus=2,sockets=1,cores=2,threads=1 -machine virt, -accel hvf -accel tcg,tb-size=1024 -drive if=pflash,format=raw,unit=0,file=/Applications/UTM.app/Contents/Resources/qemu/edk2-aarch64-code.fd,readonly=on -drive if=pflash,unit=1,file=/Users/grant/Library/Containers/com.utmapp.UTM/Data/Documents/Linux.utm/Images/efi_vars.fd -boot menu=on -m 4096 -device intel-hda -device hda-duplex -name Linux -device nec-usb-xhci,id=usb-bus -device usb-tablet,bus=usb-bus.0 -device usb-mouse,bus=usb-bus.0 -device usb-kbd,bus=usb-bus.0 -device qemu-xhci,id=usb-controller-0 -chardev spicevmc,name=usbredir,id=usbredirchardev0 -device usb-redir,chardev=usbredirchardev0,id=usbredirdev0,bus=usb-controller-0.0 -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=usb-controller-0.0 -chardev spicevmc,name=usbredir,id=usbredirchardev2 -device usb-redir,chardev=usbredirchardev2,id=usbredirdev2,bus=usb-controller-0.0 -device usb-storage,drive=cdrom0,removable=true,bootindex=0,bus=usb-bus.0 -drive if=none,media=cdrom,id=cdrom0 -device virtio-blk-pci,drive=drive0,bootindex=1 -drive if=none,media=disk,id=drive0,file=/Users/grant/Library/Containers/com.utmapp.UTM/Data/Documents/Linux.utm/Images/data.qcow2,discard=unmap,detect-zeroes=unmap -device virtio-net-pci,mac=D6:63:BD:C1:1A:B1,netdev=net0 -netdev vmnet-shared,id=net0 -device virtio-serial -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 -chardev spicevmc,id=vdagent,debug=0,name=vdagent -device virtserialport,chardev=charchannel1,id=channel1,name=org.spice-space.webdav.0 -chardev spiceport,name=org.spice-space.webdav.0,id=charchannel1 -uuid BBC144DA-140F-40D9-9FE6-7148A5C5998E -device virtio-rng-pci
qemu-aarch64-softmmu: -netdev vmnet-shared,id=net0: cannot create vmnet interface: general failure (possibly not enough privileges)
grant@grants-EFILM-MacBookPro-M1:~/Downloads[20220531-11:07][#323582]%