Ask Your Question
1

How to create volumes with both Vmware and Xenserver back-ends enabled on Cinder

asked 2014-09-04 09:20:09 -0500

Qiang gravatar image

updated 2014-09-09 09:43:23 -0500

SamYaple gravatar image

Hi,

We want to use Vmware and Xenserver storage as back-ends at the same time, and the related configuration as following in the /etc/cinder/cinder.conf:

#for vmware storage
volume_driver = cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver
vmware_host_password = xxxxxx
vmware_host_username = root
vmware_host_ip = 192.168.1.10
volume_name_template = volume-%s
volume_group = stack-volumes
#for xenserver storage
volume_driver = cinder.volume.drivers.xenapi.sm.XenAPINFSDriver
xenapi_connection_url = http://192.168.20.20
xenapi_connection_username = root
xenapi_connection_password = xxxxxx
xenapi_nfs_server = 172.16.20.20
xenapi_nfs_serverpath = /lthome

I have checked the http://docs.openstack.org/admin-guide... before submitting the question, and tried the following setting in the cinder.conf:

enabled_backends=vmware-volume,xen-volume
[lvmware-volume]
volume_group=vmware-volume-1
volume_driver = cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver
volume_backend_name=vmware-volume-ds
vmware_host_password = xxxxx
vmware_host_username = root
vmware_host_ip = 10.11.0.11
volume_name_template = volume-%s
volume_group = stack-volumes
[xen-volume]
volume_group=xen-volumes-1
volume_driver = cinder.volume.drivers.xenapi.sm.XenAPINFSDriver
volume_backend_name=xen-volume-nfs
xenapi_connection_url = http://10.11.2.22
xenapi_connection_username = root
xenapi_connection_password = sigma-rt
xenapi_nfs_server = 10.11.21.21
xenapi_nfs_serverpath = /lthome

Configured the Cinder as following:

root@controller:~# cinder --os-username admin --os-tenant-name admin extra-specs-list
+--------------------------------------+--------------------+----------------------------------------------------+
|                  ID                  |        Name        |                    extra_specs                     |
+--------------------------------------+--------------------+----------------------------------------------------+
| 409585c1-1bbd-40f1-a2ac-c0b1e6bdea59 |     xen-volume     |    {u'volume_backend_name': u'xen-volume-nfs'}     |
| cf8f3b61-bc37-4834-a1e6-e384db47f875 |   vmware-volume    |   {u'volume_backend_name': u'vmware-volume-ds'}    |

Unfortunately, I can't create any volume with following command:

cinder create --volume_type xen-volume --display_name xs-vol1 1
cinder create --volume_type vmware-volume --display_name vm-vol1 1

How to fix it ?

Update:

enabled_backends=vmware-volume,xen-volume
[vmware-volume]
volume_group=vmware-volume-1
volume_driver = cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver
volume_backend_name=vmware-volume-ds
[xen-volume]
volume_group=xen-volumes-1
volume_driver = cinder.volume.drivers.xenapi.sm.XenAPINFSDriver
volume_backend_name=xen-volume-nfs


cinder type-create vmware-volume
cinder type-key vmware-volume set volume_backend_name=vmware-volume-ds
cinder type-create xen-volume
cinder type-key xen-volume set volume_backend_name=xen-volume-nfs

root@controller:/var/log/cinder# cinder type-list
+--------------------------------------+--------------------+
|                  ID                  |        Name        |
+--------------------------------------+--------------------+
| 446d3874-7ab1-463b-9ba8-58f194f5056d |   vmware-volume    |
| da219f4b-2138-4bd1-a3a2-2c925307ba50 |     xen-volume     |
| dc360ffb-73a0-43a8-afb4-4435ac416330 |        lvm         |
| e2a40921-a699-4c4a-8005-4aa1d47b9044 | vmware-gold-volume |
+--------------------------------------+--------------------+
root@controller:~# cinder --os-username admin --os-tenant-name admin extra-specs-list
+--------------------------------------+--------------------+----------------------------------------------------+
|                  ID                  |        Name        |                    extra_specs                     |
+--------------------------------------+--------------------+----------------------------------------------------+
| 446d3874-7ab1-463b-9ba8-58f194f5056d |   vmware-volume    |   {u'volume_backend_name': u'vmware-volume-ds'}    |
| da219f4b-2138-4bd1-a3a2-2c925307ba50 |     xen-volume     |    {u'volume_backend_name': u'xen-volume-nfs'}     |
| dc360ffb-73a0-43a8-afb4-4435ac416330 |        lvm         |                         {}                         |
| e2a40921-a699-4c4a-8005-4aa1d47b9044 | vmware-gold-volume | {u'vmware:storage_profile': u'gold-policy-cinder'} |
+--------------------------------------+--------------------+---------------------
root@controller:~# cinder create --volume_type xen-volume --display_name xs-vol1 1
+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|     attachments     |                  []                  |
|  availability_zone  |                 nova                 |
|       bootable      |                false                 |
|      created_at     |      2014-09-09T02:33:21.249569      |
| display_description |                 None                 |
|     display_name    |               xs-vol1                |
|      encrypted      |                False                 |
|          id         | 39157e04-d19f-4aa8-b7a2-0ce72dd89cb3 |
|       metadata      |                  {}                  |
|         size        |                  1                   |
|     snapshot_id     |                 None                 |
|     source_volid    |                 None                 |
|        status       |               creating               |
|     volume_type     |              xen-volume              |
+---------------------+--------------------------------------+
root@controller:~#

root@controller:~# cinder list
+--------------------------------------+--------+--------------+------+-------------+----------+-------------+
|                  ID                  | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+--------+--------------+------+-------------+----------+-------------+
| 39157e04-d19f-4aa8-b7a2-0ce72dd89cb3 | error  |   xs-vol1    |  1   |  xen-volume |  false   |             |
+--------------------------------------+--------+--------------+------+-------------+----------+-------------+

in the log file inder-scheduler.log:

2014-09-09 10:33:21.315 6217 WARNING cinder.scheduler.host_manager [req-4a17bd92-94f3-470d-9e01-3d270f5c215a 0693571f2cc048749ad3c305979f1582 05490ba41f1542139ce916cd37fb081a - - -] volume service is down or disabled. (host: controller)
2014-09-09 10:33:21.319 6217 ERROR cinder.scheduler.flows.create_volume [req-4a17bd92-94f3-470d-9e01-3d270f5c215a 0693571f2cc048749ad3c305979f1582 05490ba41f1542139ce916cd37fb081a - - -] Failed to 
schedule_create_volume: No valid host was found.`enter code here`

root@controller:/var/log/cinder#  cinder-manage host list
host                        zone           
controller                  nova           
cinder                      nova           
controller@xen-volume       nova           
controller@vmware-volume    nova           
root@controller:/var/log/cinder#
edit retag flag offensive close merge delete

Comments

Just a simple command
# cinder create volume --display_name testvol1 5
where it will be created ?

dbaxps gravatar imagedbaxps ( 2014-09-04 09:46:10 -0500 )edit

can't be created. thanks.

Qiang gravatar imageQiang ( 2014-09-05 01:37:41 -0500 )edit

I have added your second post to your initial one for readability.

SamYaple gravatar imageSamYaple ( 2014-09-05 08:55:26 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-09-04 10:34:08 -0500

SamYaple gravatar image

updated 2014-09-05 09:13:28 -0500

Please use the search funtion as this question has been answered many times.

Here is the link to the docs that will get you to what you want to do.

EDIT:

It appears you have named them incorrectly. Even though you can have two different names in two different sections, I have found that it is easier to keep the names the same. It helps avoid confusion. Once you have a handle on how it all works together, feel free to change them back.

Removing existing cinder types

cinder type-delete 409585c1-1bbd-40f1-a2ac-c0b1e6bdea59
cinder type-delete cf8f3b61-bc37-4834-a1e6-e384db47f875

Config changes

[lvmware-volume] is a typo, should be [vmware-volume]

[vmware-volume]
volume_backend_name=vmware-volume
[xen-volume]
volume_backend_name=xen-volume

Restart appropriate cinder services.

Create new types

cinder type-create vmware-volume
cinder type-key vmware-volume set volume_backend_name=vmware-volume
cinder type-create xen-volume
cinder type-key xen-volume set volume_backend_name=xen-volume

You should be able to create new volumes now assuming your backend configuration is correct. If you still can't please post errors. You may need to turn on verbose or debug in cinder to find more information.

cinder create --volume_type xen-volume --display_name xs-vol1 1
cinder create --volume_type vmware-volume --display_name vm-vol1 1
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-09-04 09:20:09 -0500

Seen: 563 times

Last updated: Sep 09 '14