Ask Your Question

Failed in using --availability-zone zone:hostname to specify a certain host when booting vms

asked 2013-01-31 03:25:05 -0500

limin-marcus gravatar image


I'm using Ubuntu12.04 and Folsom with nova-network. Currently I have a controller node, which do not have nova-compute service and two compute node (os-com1 and os-com2). Everything is fine and I can boot vms and ssh. But when I tried to boot a vm on a specified host using the option --availability-zone zone-1:os-com1, it just didn't work as expected. The spawned vm is still randomly booting on os-com1 and os-com2 (or following the less workload first order). I specified the node_availability_zone=zone-1 in the nova.conf file of all the controller and compute nodes. And nova-manage service list shows as expected. And I'm using the admin role when booting vm.

So, do I need to use certain scheduler or filter to make this option work? I've tried AvailabilityZoneFilter, but it did not make any difference.

Thank you! Min

edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted

answered 2013-02-01 02:38:00 -0500

limin-marcus gravatar image

Hi Tiantian,

It really works! Guess the default ones are working well in understanding this availability-zone option.

Thank you very much!

edit flag offensive delete link more

answered 2013-01-31 04:53:45 -0500

gtt116 gravatar image


Can you put your nova.conf and result of "nova-manage service" here. Maybe we can find some issues.

edit flag offensive delete link more

answered 2013-01-31 14:41:37 -0500

limin-marcus gravatar image

Thank you, Tiantian.

The nova.conf is as follows:

[DEFAULT] logdir=/var/log/nova state_path=/var/lib/nova lock_path=/run/lock/nova verbose=True api_paste_config=/etc/nova/api-paste.ini scheduler_driver=nova.scheduler.simple.SimpleScheduler scheduler_default_filters=AvailabilityZoneFilter s3_host= ec2_host= ec2_dmz_host= rabbit_host= metadata_host= metadata_listen= nova_url= sql_connection=mysql://novaUser:novaPass@ ec2_url= root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf

Availability zone



use_deprecated_auth=false auth_strategy=keystone keystone_ec2_url=

Imaging service

glance_api_servers= image_service=nova.image.glance.GlanceImageService

Vnc configuration

novnc_enabled=true novncproxy_base_url= novncproxy_port=6080 vncserver_proxyclient_address= vncserver_listen=


libvirt_use_virtio_for_bridges = True dhcpbridge_flagfile=/etc/nova/nova.conf dhcpbridge=/usr/bin/nova-dhcpbridge public_interface=br100 flat_interface=eth0 flat_network_bridge=br100 fixed_range= flat_network_dhcp_start= network_size=256 force_dhcp_release = True flat_injected=false use_ipv6=false multi_host=True




volume_api_class=nova.volume.cinder.API osapi_volume_listen_port=5900

And the results for nova-manage service list is:

Binary Host Zone Status State Updated_At nova-cert os-ctrl zone-1 enabled :-) 2013-01-31 14:34:52 nova-consoleauth os-ctrl zone-1 enabled :-) 2013-01-31 14:34:52 nova-console os-ctrl zone-1 enabled :-) 2013-01-31 14:34:52 nova-scheduler os-ctrl zone-1 enabled :-) 2013-01-31 14:34:56 nova-network os-ctrl zone-1 enabled :-) 2013-01-31 14:34:56 nova-compute os-com1 zone-1 enabled :-) 2013-01-31 14:34:53 nova-network os-com1 zone-1 enabled :-) 2013-01-31 14:34:56 nova-compute os-com2 zone-1 enabled :-) 2013-01-31 14:34:57 nova-network os-com2 zone-1 enabled :-) 2013-01-31 14:34:56

I used the following command to boot a vm: nova boot --image $IMAGE_ID --flavor $FLAVOR --availability-zone zone-1:os-com1 vm1

And no error or anything pop up, but the vm is shown to be on os-com2 when using the command "nova show vm1".

I tried without configuring the filter in nova.conf, but the result is the same. I am thinking about add some scheduler option in nova.conf. Not sure if this can make some difference.

edit flag offensive delete link more

answered 2013-01-31 15:04:07 -0500

limin-marcus gravatar image


I was told by some other people that: " The Simple Scheduler doesn't support that. You should use a scheduler that supports Availability Zone like Filter Scheduler. Some more settings should be like:

Nova Scheduler

scheduler_driver=nova.scheduler.multi.MultiScheduler volume_scheduler_driver=nova.scheduler.chance.ChanceScheduler compute_scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler scheduler_available_filters=nova.scheduler.filters.standard_filters scheduler_default_filters=AvailabilityZoneFilter,RamFilter,ComputeFilter least_cost_functions=nova.scheduler.least_cost.compute_fill_first_cost_fn compute_fill_first_cost_fn_weight=-1.0 " I'm testing these options. Does someone know the minimal requirement for scheduler and filter to make this --availabilty-zone work?

edit flag offensive delete link more

answered 2013-02-01 01:43:31 -0500

gtt116 gravatar image

Hi Min,

I think you can try to remove two entry in nova.conf, and restart the nova services. Then make another try.

scheduler_driver=nova.scheduler.simple.SimpleScheduler scheduler_default_filters=AvailabilityZoneFilter

Good luck.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2013-01-31 03:25:05 -0500

Seen: 115 times

Last updated: Feb 01 '13