Hi All
I have setup a Centos7 host server with KVM and have created multiple VM running Ubuntu 14.04 using virt-manager. All VMs were having forward mode as "NAT" and using internal DHCP IP address 192.168.122.x series and gave them fixed ips based on their mac address. Now all these VMs are able to access Internet and able to run update on all these guest OS.
But no server or devices on LAN / Internet is able to access these VM and I am running web and API servers on VMs. And as they have to be part of the Host servers IP pool, 192.168.1.x/24 network, I changed our virsh network settings from default to routed as <forward mode='route' dev='em1'> and struggling to configure fixed IPs for our VMs i.e Host 192.168.1.11, Web Server 192.168.1.12, API server 192.168.1.13 .... etc. Would like to do exactly as mentioned in this link https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/htm...
Any help would be appreciated. Thanks.
Regards
Joel Divekar
Mumbai, India
Mob : +91 9920208223
Blog : http://joeldivekar.blogspot.com/
Linkedin : http://www.linkedin.com/in/joeldivekar
Slideshare : http://www.slideshare.net/JoelDivekar
On Sat, Oct 11, 2014 at 7:35 PM, Joel A Divekar joel_divekar@rediffmail.com wrote:
Hi All
I have setup a Centos7 host server with KVM and have created multiple VM running Ubuntu 14.04 using virt-manager. All VMs were having forward mode as "NAT" and using internal DHCP IP address 192.168.122.x series and gave them fixed ips based on their mac address. Now all these VMs are able to access Internet and able to run update on all these guest OS.
But no server or devices on LAN / Internet is able to access these VM and I am running web and API servers on VMs. And as they have to be part of the Host servers IP pool, 192.168.1.x/24 network, I changed our virsh network settings from default to routed as <forward mode='route' dev='em1'> and struggling to configure fixed IPs for our VMs i.e Host 192.168.1.11, Web Server 192.168.1.12, API server 192.168.1.13 .... etc. Would like to do exactly as mentioned in this link https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/htm...
Any help would be appreciated. Thanks.
1. Create a bridge and bind it to the physical NIC. 2. Using virt-manager, change the NIC setting from NAT to Bridge mode. 3. Each VM sees this binding as eth0 (or whatever). You need to assign the static IP to the eth0 within the VM.
HTH, -- Arun Khan