lima-vm / vde_vmnet

[DEPRECATED] vmnet.framework support for unmodified rootless QEMU (with VDE)
https://github.com/lima-vm/lima/blob/master/docs/network.md
Apache License 2.0
70 stars 9 forks source link

Installing vde via brew doesn't work #10

Closed jandubois closed 3 years ago

jandubois commented 3 years ago

Or at least it didn't work for me.

I believe it is due to being installed as a symlink owned by my user instead of by root:

# ls -l vde_switch
lrwxr-xr-x  1 jan  admin  36 14 May 16:00 vde_switch -> ../Cellar/vde/2.3.2_1/bin/vde_switch

launchd refuses to load it:

(io.github.virtualsquare.vde-2.vde_switch.plist[5719]): Could not find and/or execute program specified by service: 13: Permission denied: /usr/local/bin/vde_switch

It started working after I replaced the symlink with the file itself:

# ls -l vde_switch
-r-xr-xr-x  1 root  staff  94904 29 Jul 10:48 vde_switch

Could probably have just changed the owner of the symlink itself, but didn't test it yet.

jandubois commented 3 years ago

Could probably have just changed the owner of the symlink itself, but didn't test it yet.

Nope, this didn't work:

# chown -h root:staff vde_switch
# chmod -h 555 vde_switch
# ls -l vde_switch
lr-xr-xr-x  1 root  staff     36 14 May 16:00 vde_switch -> ../Cellar/vde/2.3.2_1/bin/vde_switch

Only worked after

# cp ../Cellar/vde/2.3.2_1/bin/vde_switch .
# ls -l vde_switch
-r-xr-xr-x  1 root  staff  94904 29 Jul 11:58 vde_switch
AkihiroSuda commented 3 years ago

Thanks for reporting, but both CI (macOS 10.15) and my laptop (macOS 11.5) installs vde via brew…

https://github.com/AkihiroSuda/vde_vmnet/blob/db729b7776ed50dfc7ddd3faa3c385e93aa7b9bc/.github/workflows/test.yml#L25

AkihiroSuda commented 3 years ago

FYI my host info

$ ls -l /usr/local/bin/vde_switch 
lrwxr-xr-x  1 suda  admin  36 11 24  2020 /usr/local/bin/vde_switch@ -> ../Cellar/vde/2.3.2_1/bin/vde_switch

$ ls -l /usr/local/Cellar/vde/2.3.2_1/bin/vde_switch 
-r-xr-xr-x  1 suda  staff  94904 11 24  2011 /usr/local/Cellar/vde/2.3.2_1/bin/vde_switch*

$ launchctl version
Darwin Bootstrapper Version 7.0.0: Thu Jun 17 18:37:42 PDT 2021; root:libxpc_executables-2038.120.1~154/launchd/RELEASE_X86_64

$ sw_vers 
ProductName:    macOS
ProductVersion: 11.5.1
BuildVersion:   20G80

The default launchd files of vde_vmnet v0.3.0 works for me.

jandubois commented 3 years ago

Closing this, as we don't want to use the brew formula installing into /usr/local/bin anyways.