kvm icon indicating copy to clipboard operation
kvm copied to clipboard

Container VM Connection

Open segator opened this issue 8 years ago • 2 comments
trafficstars

I need the container have connection because I am trying to add the SMB feature of KVM to bypass docker volume to SMB Service inside the Guest VM, is a way to simulate the Docker volume inside the VM's

But It seems doesn't work because the container it's not visible from the VM Guest

segator avatar Jul 06 '17 13:07 segator

One of the main premises in this project was to to attach the VM to the container network as transparently as possible. Hence, what you try to achieve goes just in the opposite direction. It's not wrong, it's just another way of using a container with kvm/qemu.

Said that, you could try to set ENABLE_DHCP='N' and then configure manually the IPs for the VM. This way you will be able to communicate between the container and the VM.

Also, you can play around with the flag AUTO_ATTACH='N' and the variable ATTACH_IFACES to specify which interfaces you want to attach from the container to the VM. Then, use one of the interfaces to communicate between them.

methadata avatar Jul 11 '17 13:07 methadata

I agree with you but if you want to reproduce the same docker logic inside the VM I need to connect docker volume with the VM for this we need container and VM communication to share via SMB the docker volume inside the GUEST.

I finally solved the problem by not using docker IP container inside VM, VM have always 20.20.20.21 and a bridge is created with 20.20.20.20 exposing VM IP with dhcp and VM is able to see Docker volume's via windows shared folder at \20.20.20.20<volName> , also using port forwarding I am able to use docker port mapping so I can access whatever port I want inside THE VM, RDP, IIS.. and also I have VNC and noVNC(Outside the VM), Only point I need to fix now is to passthru docker DNS(--link) to inside VM, so VM can access using alias to other containers or backward

segator avatar Jul 11 '17 14:07 segator