[Openstack] [Heat] Autoscaling, scale VMs on different hosts

Qiming Teng tengqim at linux.vnet.ibm.com
Mon Dec 8 02:43:13 UTC 2014

On Fri, Dec 05, 2014 at 04:13:49PM +0530, Deepthi Dharwar wrote:
> Hi all,
> I have been using the autoscaling HOT template and have been successful
> in running it. I do see number of VMs increasing and decreasing based on
> my scaling metrics. However, I do have one extra requirement, i.e deploy
> the VM on a different host.
> The scenario being, if I have a VM1 running on a particular host1 and
> when comes a need to  scale up based on the metrics, I want the new VM2
> to be deployed on a different host i.e host2.
> Scheduler does provide a filter i.e DifferentHostFilter, where one can
> deploy an instance on a different host from a set of instances. However
> to provide this as a part of scheduler hint in the HOT template, one
> would need the UUID of previous spawned VM. Is there a way to get this
> data via the HOT template and also pass it as different_host hint for
> the new VM ?

If Nova forces you to specify a UUID of an existing VM when providing a
scheduler hint, that means it is not a good interface IMO.  Personally,
I would prefer the Nova server-group APIs[1] on which have been quite some
disbutes whether they belong to Nova.

> So, if I have 2 hosts and have my webserver VM1 running on the host1,
> ideally i would want VM2 webserver to be running on host2.
> Is there an elegant way to achieve this ?

I don't know an easy way to do this today though I can feel the need to
support this in future.  Basically, there are discrete policies that can
be associated with a group of resources, i.e. creation-policy,
scheduling-policy, termination-policy, availability-policy, ... to name
a few.  There is a work thread on improving this [2], but users have to
be patient at the moment.



> Please help!
> Regards,
> Deepthi

More information about the Openstack mailing list