You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Ian Duffy <ia...@ianduffy.ie> on 2014/03/03 00:33:20 UTC

[DEVCLOUD2] Internet access on VMs

Hi All,

I'm trying to setup devcloud using the documentation at
http://bhaisaab.org/logs/devcloud/ and the puppet manifests at
https://github.com/apache/cloudstack/tree/master/tools/devcloud/src

I have basebox of debian wheezy running xcp-xapi on virtualbox. I have
xenbr0 bridged to the host only adapter so my management server(running on
the host machine) can access the xcp-xapi. I have xenbr1 bridged to a NAT
interface so the hypervisor has internet.

Going off the marvin configuration devcloud.cfg my setup is as follows:

management server: 192.168.56.1
hypervisor: 192.168.56.10
gateway: 192.168.56.1
internal dns: 192.168.56.1

My two system vms come up without issue and get a 192.168.56.X IP addresses
for private/public, however neither of them have internet access. Their
gateways are pointing to 192.168.56.1 which is my host machine.

Is there some trick I'm missing out on? Should my host machine be acting as
a router for the VMs? Is there some way I can forward their traffic over
the xenbr1 interface?

In the past I was running on VMWare Fusion and I just enabled their NAT
functionality on the private adapter which works wonderfully. However I
want to try getting this working with vagrant.

Thanks,
Ian

Re: [DEVCLOUD2] Internet access on VMs

Posted by Ian Duffy <ia...@ianduffy.ie>.
Ended up solving this with IP forwarding and iptables.

Modified the devcloud.cfg to use 192.168.56.10 as the gateway.

Enabled IPv4 Forwarding:
sed -i -e 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g'
/etc/sysctl.conf

Setup appropriate iptables:
-A FORWARD -i eth0 -o xenbr0 -m state --state NEW,RELATED,ESTABLISHED -j
ACCEPT
-A FORWARD -i xenbr0 -o eth0 -j ACCEPT

-A POSTROUTING -o eth0 -j MASQUERADE



On 2 March 2014 23:33, Ian Duffy <ia...@ianduffy.ie> wrote:

> Hi All,
>
> I'm trying to setup devcloud using the documentation at
> http://bhaisaab.org/logs/devcloud/ and the puppet manifests at
> https://github.com/apache/cloudstack/tree/master/tools/devcloud/src
>
> I have basebox of debian wheezy running xcp-xapi on virtualbox. I have
> xenbr0 bridged to the host only adapter so my management server(running on
> the host machine) can access the xcp-xapi. I have xenbr1 bridged to a NAT
> interface so the hypervisor has internet.
>
> Going off the marvin configuration devcloud.cfg my setup is as follows:
>
> management server: 192.168.56.1
> hypervisor: 192.168.56.10
> gateway: 192.168.56.1
> internal dns: 192.168.56.1
>
> My two system vms come up without issue and get a 192.168.56.X IP
> addresses for private/public, however neither of them have internet access.
> Their gateways are pointing to 192.168.56.1 which is my host machine.
>
> Is there some trick I'm missing out on? Should my host machine be acting
> as a router for the VMs? Is there some way I can forward their traffic over
> the xenbr1 interface?
>
> In the past I was running on VMWare Fusion and I just enabled their NAT
> functionality on the private adapter which works wonderfully. However I
> want to try getting this working with vagrant.
>
> Thanks,
> Ian
>