I have Docker on a CoreOS VM which runs on top of KVM.

VM Networking:

$ virsh net-edit libvirt

<network ipv6='yes'>
  <name>libvirt</name>
  <uuid></uuid>
  <forward mode='nat'/>
  <bridge name='virbr1' stp='on' delay='0'/>
  <mac address=''/>
  <domain name='testbed.net' localOnly='yes'/>
  <dns>
    <host ip='192.168.121.104'>
      <hostname>m00.testbed.net</hostname>
    </host>
  </dns>
  <ip address='192.168.121.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.121.100' end='192.168.121.254'/>
      <host mac='' name='m00.net' ip='192.168.121.104'/>
      <bootp file='/pxelinux.0' server='192.168.121.2'/>
    </dhcp>
  </ip>
</network>

docker.conf:

[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network.target docker.socket
Requires=docker.socket
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --dns x.x.x.x
Environment="https_proxy=http://x.x.x.x:9080" "http_proxy=http://x.x.x.x:9080" "no_proxy=localhost,127.0.0.1"
LimitNOFILE=1048576
LimitNPROC=1048576
TasksMax=1048576
[Install]
Also=docker.socket

As soon as I run a docker container on the VM, I have no internet access on the host machine anymore.

$ sudo apt update
0% [Connecting to proxy (x.x.x.x)] [Connecting to proxy(x.x.x.x)] 

Any suggestion?

Thanks

  • How did you set up the VM networking? – Michael Hampton Feb 1 at 17:51
  • @MichaelHampton I updated my question with VM networking setup. – encodeflush Feb 2 at 8:45

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.