VMware Cloud Community
jediller
Contributor
Contributor

How to use Docker in VMWare

I have successfully migrated virtual machine into VMWare

However I am running docker, and do not see a docker interface

How can I edit the settings of my virtual machine to get this interface?

ifconfig from VMware image

$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0c:29:66:05:92
          inet addr:10.243.12.183  Bcast:10.243.15.255  Mask:255.255.240.0
          inet6 addr: fd55:faaf:e1ab:2021:20c:29ff:fe66:592/64 Scope:Global
          inet6 addr: fe80::20c:29ff:fe66:592/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12491 errors:0 dropped:0 overruns:0 frame:0
          TX packets:309 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:940156 (940.1 KB)  TX bytes:41251 (41.2 KB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Previously running my virtual machine I see a docker interface

ifconfig
docker0   Link encap:Ethernet  HWaddr 02:42:c8:81:99:34
          inet addr:172.17.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr 52:54:00:12:34:56
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::5054:ff:fe12:3456/64 Scope:Link
          inet6 addr: fec0::5054:ff:fe12:3456/64 Scope:Site
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:151 errors:36 dropped:0 overruns:0 frame:36
          TX packets:143 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:15898 (15.8 KB)  TX bytes:14943 (14.9 KB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

0 Kudos
4 Replies
daphnissov
Immortal
Immortal

You should also be seeing the Docker bridge adapter. If you don't see that you may need to reinstall the engine.

0 Kudos
jediller
Contributor
Contributor

>>> You should also be seeing the Docker bridge adapter. If you don't see that you may need to reinstall the engine.

I am unsure what you are suggesting I try. Reinstall what engine? docker?

I converted one image that I could run with qemu to another that now runs with vmware

qemu-img convert -f qcow2 image.qcow2 -O vmdk -o adapter_type=lsilogic,subformat=streamOptimized,compat6 image.qcow2 image.vmdk

I use qemu to run the original image on my Windows 10 machine. When I run this image I do not need to install anything, docker and the docker interface are already present.

When I create a new VMware machine with my image.vmdk,  It will start for me, but I do not get any networking for the docker portion.

docker ps -a  (for instance, gives me on VMware)

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

----

I will try reinstalling the engine, if I understand what specific command(s) I run to do that.

However, I suspect I need to change the settings on my new VMWare machine so some network is available to assign to docker

0 Kudos
daphnissov
Immortal
Immortal

I don't know how this plays into conversion from qemu format, but it shouldn't matter. I would reinstall the Docker engine. The bridge adapter is a logical interface that gets created as part of the engine installation. There's nothing you need to configure or enable from a VMware or ESXi perspective to "fix" or enable this.

0 Kudos
jediller
Contributor
Contributor

Thank you for the clarification now I have something to try.

Since I originally posted the question I found my file system is Read-Only,

I am still working to figure out why it is read-only, and more important how to correct it.

When I have that problem solved, I'm hopeful docker will just work correctly.

However, it does not then I should be able to try your suggestion and re-install the docker engine

0 Kudos