Re: Regarding routed networking with KVM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux