-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exposed ports? #5
Comments
I also doesn't work with the container ip.
|
Looks like the ip isn't bind to the VM?
The container ip is bind to the eth0 interface inside of the container and should be moved to the VM, right? |
What the startvm (entrypoint) does is just "steal" the container IP and give it to the internal dhcp (dnsmasq), which serves that IP to the VM. Also, the VM image OS needs to be configured to get its IP via DCHP. If everything is working right, you should be able to access to the guest VM using the initial docker comtainer IP, using any allowed method by the VM (ssh, rdp...) from the docker host. |
I don't know how I could verify the packet flow to the VM. It looks like the IP is just in use by the container itself and not the VM. docker host
kvm container
kvm container
If the IP is used by the VM I should see another mac address, right? |
First things first: If you see an IP address configured in eth0 interface and none configured in the macvlan device, then something failed. IMHO this could be due to the dnsmasq bug specified in #4 . It should be already gone with the fix I published some minutes ago. I have added some debug info when launching startvm script, so you should be able to see if the IP is being correctly configured in dnsmasq. If so, the guest OS should be getting that IP. Please, try again with the latest release and write back with feedback if needed. I will try it also from my side and I will close this issue if all my test succeed. |
Pulled latest again and it looks like the dnsmasq bug is fixed!
IP is moved to macvlan0
Ping from host
So the bug should be fixed, but can't reach the exposed ports / vm ip. |
Exposed ports are still a problem with the macvlan docker network and AUTO_ATTACH=y via docker bridge. With the macvlan setup I connected a notebook with a simple alpine container
Ping works fine Replaced the alpine container with a KVM container and the connection doesn't work. Also exposed ports (docker host ip) are not available. Is it a bug or am I missing something? |
Hi, Probably, the guest VM is not booting at all, because it hasn't a VGA adapter. We experienced this problem today with a Centos VM, and we managed to get it working adding some missing parameters to qemu/kvm when launching the guest VM. Until now, we only used this container to launch a special VM that only needed a serial console, thus this problem was hidden to us. I've created issue #10 to track this new feature, that will be added in less than one day. Stay tuned! |
Tested with latest release today. VM seems to boot up. RAM usage increases from 0 to 725MB, but exposed ports / VM via container ip is still not available. |
I have network problems with alpine and centos based versions. Any hint how to debug it inside the container? |
Hi @ahoeg Try to configure your host VM to use serial port as console. Then you will be able to access it directly from the container in interactive (-ti) mode. We have tested this method with CentOS and works perfectly. Also check that your qcow is configured to get its IP via dhcp. |
Hi @methadata, qcow is configured to get its IP via dhcp. Could you share your prepared CentOS qcow to test it and see how the serial configuration is done? |
Hi @ahoeg, I will prepare a lightweight cirros or similar VM to share it with you. Meanwhile I suggest you to launch the Alpine version with Example:
|
I tested it with alpine / -curses, but output stops because of a boot splash image (graphical mode) I think... Awesome work with this project! I love it! |
Looks like the network problem is RancherOS related. Networking and exposed ports working fine with a centos docker host. A virt-builder generated centos-7.2 and my own qcow image boot up with network connected. Also serial output is prepared with a virt-builder image. Would be great to use it with RancherOS too. But no idea what's wrong running your image at a RancherOS host... |
I have just released an update related to this that fixes DHCP problems with some guest VMs (see #13 for further info). Please notice that:
I will close this issue now. Feel free to open this issue again if something related with it fails. |
Hi,
I tried to use it with exposed ports to reach the VM (
-p 2222:22 -p 8080:8080 -p 5900:5900
), but it doesn't work. So I can't reach / enter the VM.Any hints how to reach the VM ports from outside?
The text was updated successfully, but these errors were encountered: