Thanks for your kind information Daniel. Consider this scenario VM1(144.68.100.1) and VM2(144.68.100.2) running on Host1(10.2.0.20) and Host2(10.2.0.30) respectively. Is it possible to access the VM1 and VM2 from Host3(10.2.0.100). How to add a static route for this scenario?? Here I don't need separate subnets for VMs. All VMs should be in same subnet ie 144.68.100.0/255.255.255.0 Is there any way to configure this ?? On Tue, Sep 14, 2010 at 4:21 PM, Daniel P. Berrange <berrange@xxxxxxxxxx> wrote: > On Tue, Sep 14, 2010 at 04:13:09PM +0530, Rajiv Rajaian wrote: >> Thanks for your reply Daniel. >> Suppose I want to create on more VM with static ip address >> 144.68.100.0 on host having ip address 10.2.0.25 then do i need to add >> one more routing table entry by specifying 10.2.0.25 as gateway or >> 10.2.0.20 as previous entry is enough to access that VM? > > Each host must have a separate subnet for VMs. So if you have 3 > hosts, you'd want to repeat your libvirt network configure using > something like these in the XML > > Host A (10.2.0.20): 144.68.100.0/255.255.255.0 > Host B (10.2.0.25): 144.68.101.0/255.255.255.0 > Host C (10.2.0.30): 144.68.102.0/255.255.255.0 > > And then on your LAN gateway setup a route for each host's > subnet > > # route add -net 144.68.100.0 netmask 255.255.255.0 gw 10.2.0.20 > # route add -net 144.68.101.0 netmask 255.255.255.0 gw 10.2.0.25 > # route add -net 144.68.102.0 netmask 255.255.255.0 gw 10.2.0.30 > > >> Is there any provision to specify the gateway machine for (virbr1) >> while creating the routed networking with libvirt? > > Not with the current design. We require the main LAN gateway to have > static routes added. In the future we might provide an impl based > on Proxy-ARP or IP-subnetting which would simplify this. > >> Here the thing is I want to reach VMs running on different host >> machines having same subnet and same default gateway from another >> machine which is running on the LAN. ie VM1 running at Host1 and VM2 >> running at Host2 should be accessed from Host3 which is in LAN. Is >> there any other steps I have to do to reach the VMs residing on >> different host machines?? > > Each host that is running VMs would need its own routed network > with dedicated subnet defined. Once the LAN gateway has static > routes for each subnet, any host on your LAN should be able to > access any VM on any of your hosts, and vica-verca. > > Daniel > -- > |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| > |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| > |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| > |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| > -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html