> -----Original Message-----
> From: Rohit Yadav
> Sent: Monday, July 23, 2012 5:54 AM
> To: Edison Su
> Subject: Devcloud IP issue
> 
> Hi Edison,
> 
> 
> I'm using Devcloud and it's remote deployment and debugging features
> for development. Using the IP values given on the Devcloud wiki page,
> if I create a VM the assigned IP is between the range 10.0.2.100 and
> 10.0.2.199 but when I open the console, the IP that is actually
> assigned to it is 10.0.2.16. As I add more VMs, the IP that is actually
> assigned is not random but incremental, so 10.0.2.17, 18, 19 and so on.
> 
> Is this normal behavior? Is it because Devcloud is using basic
> networking and VBox's NAT is causing any trouble?

Yes, that's true, there are two DHCP servers, one is the default VBOX NAT 
engine, another one is the cloudstack domR. Usually, the user vm will get dhcp 
response from VBOX NAT engine, then choose the IP leased by NAT engine.
I fixed this issue already, but haven't create the latest devcloud image yet.
As a workaround, you can manually execute the following line in devcloud:

    apt-get install ebtables
    iptables -A POSTROUTING -t mangle -p udp --dport bootpc -j CHECKSUM 
--checksum-fill
    mac=`ifconfig xenbr0 |grep HWaddr |awk '{print $5}'`
    ebtables -I FORWARD -d ! $mac -i eth0 -p IPV4 --ip-prot udp --ip-dport 
67:68 -j DROP
    iptables-save > /etc/iptables.save
    /etc/init.d/ebtables save

Then restart your user vm, user vm will get an IP address from domr instead of 
from VBOX.

> 
> If I use unmodified Devcloud and I start my VM the assigned IP is
> within the range but when opening console it fails to resolve
> realhostip.com. Ping fails for that assigned IP as well. I got help
> here:

Are you using the default mgt server created in devcloud or the mgt server 
redeployed by yourself?
If it's the default mgt server, need to add the following configurations in 
devcloud to get console proxy work:
mysql --user=cloud -t cloud --password=cloud -e "insert into configuration 
(name, value) VALUES('consoleproxy.static.publicip', 
\"ip-of-your-host-machine\")"
mysql --user=cloud -t cloud --password=cloud -e "insert into configuration 
(name, value) VALUES('consoleproxy.static.port', \"8443\")"

If you are using the mgt server deployed by yourself, then by default, the 
console proxy should work.

> http://docs.cloudstack.org/Knowledge_Base/Replacing_realhostip.com_with
> _your_own_domain
> But the internal DNS, 10.0.2.3 is VirtualBox's DNS/DHCP. Is there any
> better method to fix this issue without having to install named/bind on
> the Ubuntu dom0?
> 
> Thanks.
> 
> Best regards,
> Rohit Yadav

Reply via email to