networking - Assign IPs to Docker containers hosted on VM -


i have server connected router eth0 interface. on server have installed kimchi (gui kvm). using gui able create macvtap network interface attached eth0 , assign lan ips virtual machines. gate 192.168.0.1, host 192.168.0.80.

on server i'm creating docker1 vm ip 192.168.0.100. on vm there docker installed.

i'm following how-to - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/virtualization_host_configuration_and_guest_installation_guide/app_macvtap.html connect host guests (creating isolated network).

i want each container have separate ip (192.168.0.101, 192.168.0.102, ...). have tried different approaches , still not able to. example tried create macvtap network docker , use it, (ens3 network interface connected macvtap eth0 on host):

docker network create -d macvlan --subnet=192.168.0.0/24 --gateway=192.168.0.1  -o parent=ens3 pub_net 

and then:

docker run --name name --restart -d --network=pub_net --ip=192.168.0.102 -h this_container_host docker/docker 

but isn't working.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -