Skip to content

How do I grant the same network access to the Mac VM as the underlying Arch Linux Host #177

@Buzz-Lightyear

Description

@Buzz-Lightyear

When I docker run using the following command:

docker run -it \
    -d \
    --name sosumi \
    --network host \
    --device /dev/kvm \
    -e NETWORKING=vmxnet3 \
    -e RAM=64 \
    -e CPU=60 \
    -e SMP=60 \
    -v "${PWD}/mac_hdd_ng.img:/image" \
    sickcodes/docker-osx:naked

I can ensure that the Arch Linux container has the same network access as my host machine. However, the Mac VM does not share the same network access. How can I resolve this? I verified that ipv4 forward is already set to 1:

$ cat /etc/sysctl.conf | grep 'net.ipv4.ip_forward'
net.ipv4.ip_forward = 1
NAME="CentOS Linux"
PRETTY_NAME="CentOS Linux 7 (Core)"
CPE_NAME="cpe:/o:centos:centos:7"

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda6       845G  207G  596G  26% /export

              total        used        free      shared  buff/cache   available
Mem:           125G         12G         27G        4.0G         86G        104G
Swap:           63G          0B         63G

$ nproc
64

egrep -c '(svm|vmx)' /proc/cpuinfo
64

$ ls -lha /dev/kvm
crw-rw---- 1 kvm kvm 10, 232 Mar 11 18:11 /dev/kvm

root      8253  0.0  0.0 2982776 73696 ?       Ssl  Mar04   5:32 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

$ whoami
smuthu

$ grep "docker\|kvm\|virt" /etc/group
kvm:x:2147483578:tester
docker:x:2147410894:smuthu

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions