File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ if is_macos; then
2+ edit_qemu_conf_property () {
3+ local file_path=" $1 "
4+ local prop_name=" $2 "
5+ local prop_value=" $3 "
6+
7+ if ! egrep -i " ^${prop_name} =.*" " $file_path " ; then
8+ sudo sed -i " s/#${prop_name} = .*/${prop_name} = ${prop_value} /g" " $conf_file "
9+ fi
10+ }
11+
12+ conf_file=" $( brew --prefix) /etc/libvirt/qemu.conf"
13+ if test -f " $conf_file " ; then
14+ edit_qemu_conf_property " $conf_file " " user" " root"
15+ edit_qemu_conf_property " $conf_file " " group" " root"
16+ # Drop unsuuported features on macOS
17+ # - https://www.naut.ca/blog/2020/08/26/ubuntu-vm-on-macos-with-libvirt-qemu/
18+ # -- https://gitlab.com/libvirt/libvirt/-/issues/241
19+ edit_qemu_conf_property " $conf_file " " security_driver" " none"
20+ edit_qemu_conf_property " $conf_file " " dynamic_ownership" " 0"
21+ edit_qemu_conf_property " $conf_file " " remember_owner" " 0"
22+ # FIXME: Networking:
23+ # - https://gist.github.com/davidandreoletti/af2a17ea095af9476ad012b4a2365a40
24+ # - https://gitlab.com/libvirt/libvirt/-/issues/75
25+ fi
26+ fi
You can’t perform that action at this time.
0 commit comments