cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edison Su <Edison...@citrix.com>
Subject RE: [RFC] DevCloud, an all-in-one-box CloudStack development environment
Date Thu, 12 Jul 2012 18:13:45 GMT


> -----Original Message-----
> From: tomoe@midokura.jp [mailto:tomoe@midokura.jp] On Behalf Of Tomoe
> Sugihara
> Sent: Thursday, July 12, 2012 10:29 AM
> To: cloudstack-dev@incubator.apache.org
> Cc: cloudstack-users@incubator.apache.org
> Subject: Re: [RFC] DevCloud, an all-in-one-box CloudStack development
> environment
> 
> Hi Edison,
> 
> I have been playing around with DevCloud and I wanted to share
> my findings here:
> 
> 1. Needs more memory for guests
> 
>  I'd been getting InsufficientServerCapacityException when I tried
> launching a VM after rdeploy*, rdebug and adding a basic ZONE.
> 
>  I found that a router VM will be spun up upon launching a VM
> with CentOS template and total number of VM will be 4 (SSVM, CPVM,
> Router VM, new instance). Total mem on the host(DevCloud) in the DB is
> below 400MB(IIRC), and that's not enough for 4 VMs.
> 
> 
> 2. OOM kills server
> 
>    Often times, inside management server, OOM killer kills management
> java process. You may want to allocate more memory for the mgmt server
> and/or add some swap.


Yah, the default memory allocated to DevCloud is very small, only around 400M is available
to VMs.
There are many ways to mitigate the issue:
1. decrease the ram requirement for VM: right now, by default, each VM needs 100M, this can
be smaller.
2. Increase the memory used by DevCloud, the default 1G total memory, is just the memory that
allow you to create one user vm, for the simplest test purpose.
3. If #2 is available, then increase the memory used by dom0, that will fix the OOM issue.
By default, the dom0 uses 512M, which is not enough for a java mgt server...

All of the above items are configurable, for developer, better to increase the memory for
devcloud, such as, 2G memory: 1G memory for dom0, 1G memory for VMs(around 6 user Vms can
be created). Of cause, the more memory, the better.

> 
> 3. DNS nat doesn't work on Ubuntu precise(4.1.1878361~Ubuntu~precise)
> 
> By default, the DNS server nat setting with 10.0.2.3 didn't work and
> that
> made it slow to ssh into DevCloud.
> 
> I found an workaround by running the following command:
> 
>  VBoxManage modifyvm DevCloud --natdnshostresolver1 on

I only tested it on Mac/Fedora, the default 10.0.2.3 DNS works for me. I'll document your
finding.
Thanks for your feedback. 

> 
> 
> Thanks,
> Tomoe
> 
> 
> On Wed, Jul 11, 2012 at 9:02 AM, Edison Su <Edison.su@citrix.com> wrote:
> >
> >
> >> -----Original Message-----
> >> From: tomoe@midokura.jp [mailto:tomoe@midokura.jp] On Behalf Of
> Tomoe
> >> Sugihara
> >> Sent: Tuesday, July 10, 2012 4:40 PM
> >> To: cloudstack-users@incubator.apache.org
> >> Cc: cloudstack-dev@incubator.apache.org
> >> Subject: Re: [RFC] DevCloud, an all-in-one-box CloudStack
> development
> >> environment
> >>
> >> On Wed, Jul 11, 2012 at 2:33 AM, Edison Su <Edison.su@citrix.com>
> wrote:
> >> >
> >> >
> >> >> -----Original Message-----
> >> >> From: tomoe@midokura.jp [mailto:tomoe@midokura.jp] On Behalf Of
> >> Tomoe
> >> >> Sugihara
> >> >> Sent: Tuesday, July 10, 2012 1:22 AM
> >> >> To: cloudstack-dev@incubator.apache.org
> >> >> Cc: cloudstack-users@incubator.apache.org
> >> >> Subject: Re: [RFC] DevCloud, an all-in-one-box CloudStack
> >> development
> >> >> environment
> >> >>
> >> >> On Tue, Jul 10, 2012 at 3:32 AM, Edison Su <Edison.su@citrix.com>
> >> wrote:
> >> >>
> >> >> > >
> >> >> > > Not rdeploydb, but successfully ran "rdebug".
> >> >> > > However, I still can't find ListTemplate even in
> /var/log/cloud/
> >> >> >
> >> >> > Better to fix rdeploydb at first, right now, your system is in
> a
> >> good
> >> >> shape.
> >> >> > If you had taken a snapshot for devcloud after importing the
> >> >> devcloud.ova into virtualbox, then you can revert back to the
> >> initial
> >> >> state.
> >> >> > Then we can test the preinstalled cloudstack mgt server works
> for
> >> you
> >> >> or not, by go to http://localhost:8080/client, then enable the
> zone,
> >> >> wait for a few minutes, ssvm will come up, and the tiny user vm
> will
> >> be
> >> >> available.
> >> >> > Anyway, I'll write up the whole setup/configuration/how-to-use,
> >> step-
> >> >> by-step illustrated.
> >> >>
> >> >>
> >> >> Thanks for the writeup. That's very helpful.
> >> >> I started from scratch and was able to see the tiny Linux
> template
> >> is
> >> >> normal.
> >> >>
> >> >> Now, another problem is that I can't seem to launch a VM; I'm
> >> getting
> >> >> this error:
> >> >> ---------------------------
> >> >>   [sshexec]      [java] INFO  [api.commands.DeployVMCmd]
> >> >> (Job-Executor-13:job-13)
> >> >> com.cloud.exception.InsufficientServerCapacityException: Unable
> to
> >> >> create a deployment for VM[User|ccc]Scope=interface
> >> >> com.cloud.dc.DataCenter; id=1
> >> >> --------------------------
> >> >
> >> > Which service offering are you using to create the VM? Need to use
> >> tinyServiceOffering.
> >>
> >> I'm using "tinyOffering" in "Compute offering" menu in launching VM
> >> wizard.
> >> I can't find "tinyServiceOffering" anywhere. Am I missing something?
> >>
> >> >> I also tried launching a VM with vanilla DevCloud(without doing
> any
> >> >> ant commands),
> >> >>  and I was ableto launch it. However, the launched tty Linux gets
> ip
> >> >> address 10.0.0.15,
> >> >>  which is the same address as devcloud and then web GUI became
> >> >> inaccessible.
> >> >
> >> > That's weird, normally DevCloud will get 10.0.2.15 itself, user vm
> >> will get other ip address.
> >> > Which VirtualBox are you using? On which platform?
> >>
> >> I'm using virtualbox-4.1 (4.1.18-78361~Ubuntu~precise) on Ubuntu
> 12.04.
> >> This happens consistently, at least I hit 3 times in a row.
> > I added a fix into master, that disable virtualbox DHCP server for
> the VMs created by CloudStack.
> > Right now, you can manually execute the following scripts inside
> 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
> >
> > And add
> > pre-up iptables-save < /etc/iptables.save
> > pre-up /etc/init.d/ebtables load
> >
> > at the end of /etc/network/interfaces, then stop/start your user vm,
> see what happened.
> >
> > the commit number is fb59fc5c8a5114ca0c7da8c602a806dc77735c2e, if you
> want take a look at the fix.
> >
> >
> >>
> >> >> As a side note, it should be useful to add a port forward setting
> >> for
> >> >> 8787 in VirtualBox
> >> >> so we can remote debug easily.
> >> >
> >> >
> >> > Will do, and also 8250.
> >>
> >> Can I ask what 8250 is for?
> >
> > To add external hypervisor host(the actual physical host) into
> CloudStack mgt server running inside DevCloud, if ssvm/cpvm created on
> external host, 8250 will be used by the java agent inside ssvm/cpvm to
> connect to mgt server.
> >
> >>
> >> Thanks,
> >> Tomoe

Mime
View raw message