Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: API

Configuration needed to share a VDI

 

 

Xen api RSS feed   Index | Next | Previous | View Threaded


eduardo.terra at gmail

May 18, 2012, 3:49 AM

Post #1 of 15 (615 views)
Permalink
Configuration needed to share a VDI

Do I need to do any special configuration in XCP 1.1 or in the SRs to be
capable of sharing a VDI between two virtual machines?
Is it possible to do in XCP?

--
Carlos Eduardo Tavares Terra
Red Hat Certified Engineer
GNU/Linux #413291 [http://counter.li.org]


mike.mcclurg at citrix

May 18, 2012, 6:58 AM

Post #2 of 15 (601 views)
Permalink
Re: Configuration needed to share a VDI [In reply to]

On 18/05/12 11:49, Carlos Eduardo Tavares Terra wrote:
> Do I need to do any special configuration in XCP 1.1 or in the SRs to be
> capable of sharing a VDI between two virtual machines?
> Is it possible to do in XCP?

You could possibly do this if only one VM attaches the disk RW, but you
should definitely not do this if you want more than one of the VMs to
attach the disk RW. For that, you should use something like NFS instead.

To share a VDI, create a new vbd to connect the second VM to the VDI. Do
'xe help vbd-create' for docs.

Mike


_______________________________________________
Xen-api mailing list
Xen-api [at] lists
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api


eduardo.terra at gmail

May 18, 2012, 7:12 AM

Post #3 of 15 (600 views)
Permalink
Re: Configuration needed to share a VDI [In reply to]

Thanks...

I really need to mount RW in both VMs. I am creating a fail-over cluster,
using concurrent storage for data.
I'll try to create a new vbd and attach it to the other VM.

Any other clues?


On Fri, May 18, 2012 at 10:58 AM, Mike McClurg <mike.mcclurg [at] citrix>wrote:

> On 18/05/12 11:49, Carlos Eduardo Tavares Terra wrote:
>
>> Do I need to do any special configuration in XCP 1.1 or in the SRs to be
>> capable of sharing a VDI between two virtual machines?
>> Is it possible to do in XCP?
>>
>
> You could possibly do this if only one VM attaches the disk RW, but you
> should definitely not do this if you want more than one of the VMs to
> attach the disk RW. For that, you should use something like NFS instead.
>
> To share a VDI, create a new vbd to connect the second VM to the VDI. Do
> 'xe help vbd-create' for docs.
>
> Mike
>
>


--
Carlos Eduardo Tavares Terra
Red Hat Certified Engineer
Consultor em Infraestrutura de TI
GNU/Linux #413291 [http://counter.li.org]


mike.mcclurg at citrix

May 18, 2012, 7:53 AM

Post #4 of 15 (603 views)
Permalink
Re: Configuration needed to share a VDI [In reply to]

On 18/05/12 15:12, Carlos Eduardo Tavares Terra wrote:
> Thanks...
>
> I really need to mount RW in both VMs. I am creating a fail-over
> cluster, using concurrent storage for data.
> I'll try to create a new vbd and attach it to the other VM.
>
> Any other clues?

I'm not sure exactly what you want to do. Are you proposing to plug a
single VDI read-writeable in two running VMs, at the same time? Or do
you want to only plug the VDI into two VMs, and only turn the second VM
on once the first one fails? The second proposal is fine, but the first
one will likely lead to data corruption.

If you want a solution that's more like the first proposal, then you
might want to look at setting up DRBD (http://www.drbd.org/) within the
guest VMs. XCP doesn't have support for using DRBD as a storage
repository directly, but if you set it up in the guests themselves, you
might be able to solve your problem.

Mike

_______________________________________________
Xen-api mailing list
Xen-api [at] lists
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api


anil at recoil

May 18, 2012, 8:04 AM

Post #5 of 15 (602 views)
Permalink
Re: Configuration needed to share a VDI [In reply to]

On 18 May 2012, at 14:58, Mike McClurg <mike.mcclurg [at] citrix> wrote:

> On 18/05/12 11:49, Carlos Eduardo Tavares Terra wrote:
>> Do I need to do any special configuration in XCP 1.1 or in the SRs to be
>> capable of sharing a VDI between two virtual machines?
>> Is it possible to do in XCP?
>
> You could possibly do this if only one VM attaches the disk RW, but you should definitely not do this if you want more than one of the VMs to attach the disk RW. For that, you should use something like NFS instead.

I think Carlos is using a concurrent file system or database, and so sharing the RW VBD is fine.

Isn't this just a case of marking the VBDs as shareable to disable the xapi safety check?

-anil



>
> To share a VDI, create a new vbd to connect the second VM to the VDI. Do 'xe help vbd-create' for docs.
>
> Mike
>
>
> _______________________________________________
> Xen-api mailing list
> Xen-api [at] lists
> http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
>

_______________________________________________
Xen-api mailing list
Xen-api [at] lists
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api


Dave.Scott at eu

May 18, 2012, 8:12 AM

Post #6 of 15 (600 views)
Permalink
Re: Configuration needed to share a VDI [In reply to]

Hi

Anil wrote:
> On 18 May 2012, at 14:58, Mike McClurg <mike.mcclurg [at] citrix> wrote:
>
> > On 18/05/12 11:49, Carlos Eduardo Tavares Terra wrote:
> >> Do I need to do any special configuration in XCP 1.1 or in the SRs
> to be
> >> capable of sharing a VDI between two virtual machines?
> >> Is it possible to do in XCP?
> >
> > You could possibly do this if only one VM attaches the disk RW, but
> you should definitely not do this if you want more than one of the VMs
> to attach the disk RW. For that, you should use something like NFS
> instead.
>
> I think Carlos is using a concurrent file system or database, and so
> sharing the RW VBD is fine.
>
> Isn't this just a case of marking the VBDs as shareable to disable the
> xapi safety check?

As well as marking the VDI as sharable you also have to be careful with .vhds. If all the VMs sharing the VDI are on the same host they'd all share the same "tapdisk" process and this would be fine. If they were sharing the VDIs across hosts then you'd have multiple tapdisk writing the .vhd metadata concurrently which would lead to corruption.

If you need to share the VDIs across hosts then try creating a "raw" format VDI, using

$ xe vdi-create sr-uuid=... name-label=foo virtual-size=... type=user sm-config:type=raw

Cheers,
Dave

_______________________________________________
Xen-api mailing list
Xen-api [at] lists
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api


franciane at censanet

May 18, 2012, 8:24 AM

Post #7 of 15 (595 views)
Permalink
Re: Configuration needed to share a VDI [In reply to]

Dudu, pelo que eu entendi a melhor solução seria os dois server ligados
enviando dados no mesmo disco, usando o cluster, pois se usarmos a outra
solução de cluster onde caso um nó falhar o outra entra pode ocorrer o
risco de corromper dados..

??????

Att
Franciane Pessanha

On 05/18/2012 11:53 AM, Mike McClurg wrote:
> On 18/05/12 15:12, Carlos Eduardo Tavares Terra wrote:
>> Thanks...
>>
>> I really need to mount RW in both VMs. I am creating a fail-over
>> cluster, using concurrent storage for data.
>> I'll try to create a new vbd and attach it to the other VM.
>>
>> Any other clues?
>
> I'm not sure exactly what you want to do. Are you proposing to plug a
> single VDI read-writeable in two running VMs, at the same time? Or do
> you want to only plug the VDI into two VMs, and only turn the second
> VM on once the first one fails? The second proposal is fine, but the
> first one will likely lead to data corruption.
>
> If you want a solution that's more like the first proposal, then you
> might want to look at setting up DRBD (http://www.drbd.org/) within
> the guest VMs. XCP doesn't have support for using DRBD as a storage
> repository directly, but if you set it up in the guests themselves,
> you might be able to solve your problem.
>
> Mike


_______________________________________________
Xen-api mailing list
Xen-api [at] lists
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api


eduardo.terra at gmail

May 18, 2012, 9:05 AM

Post #8 of 15 (601 views)
Permalink
Re: Configuration needed to share a VDI [In reply to]

DRBD is not a solution for me.

I will keep both VMs on, but just one of them will mount the filesystem.
But, I could do that too using GFS2 or OCFS2.

On Fri, May 18, 2012 at 11:53 AM, Mike McClurg <mike.mcclurg [at] citrix>wrote:

> On 18/05/12 15:12, Carlos Eduardo Tavares Terra wrote:
>
>> Thanks...
>>
>> I really need to mount RW in both VMs. I am creating a fail-over
>> cluster, using concurrent storage for data.
>> I'll try to create a new vbd and attach it to the other VM.
>>
>> Any other clues?
>>
>
> I'm not sure exactly what you want to do. Are you proposing to plug a
> single VDI read-writeable in two running VMs, at the same time? Or do you
> want to only plug the VDI into two VMs, and only turn the second VM on once
> the first one fails? The second proposal is fine, but the first one will
> likely lead to data corruption.
>
> If you want a solution that's more like the first proposal, then you might
> want to look at setting up DRBD (http://www.drbd.org/) within the guest
> VMs. XCP doesn't have support for using DRBD as a storage repository
> directly, but if you set it up in the guests themselves, you might be able
> to solve your problem.
>
> Mike
>



--
Carlos Eduardo Tavares Terra
Red Hat Certified Engineer
Consultor em Infraestrutura de TI
GNU/Linux #413291 [http://counter.li.org]


eduardo.terra at gmail

May 18, 2012, 9:10 AM

Post #9 of 15 (605 views)
Permalink
Re: Configuration needed to share a VDI [In reply to]

I will try that.
I have 5 servers in my XCP Cluster.

Do I have to modify anything in SR config?

On Fri, May 18, 2012 at 12:12 PM, Dave Scott <Dave.Scott [at] eu>wrote:

> Hi
>
> Anil wrote:
> > On 18 May 2012, at 14:58, Mike McClurg <mike.mcclurg [at] citrix> wrote:
> >
> > > On 18/05/12 11:49, Carlos Eduardo Tavares Terra wrote:
> > >> Do I need to do any special configuration in XCP 1.1 or in the SRs
> > to be
> > >> capable of sharing a VDI between two virtual machines?
> > >> Is it possible to do in XCP?
> > >
> > > You could possibly do this if only one VM attaches the disk RW, but
> > you should definitely not do this if you want more than one of the VMs
> > to attach the disk RW. For that, you should use something like NFS
> > instead.
> >
> > I think Carlos is using a concurrent file system or database, and so
> > sharing the RW VBD is fine.
> >
> > Isn't this just a case of marking the VBDs as shareable to disable the
> > xapi safety check?
>
> As well as marking the VDI as sharable you also have to be careful with
> .vhds. If all the VMs sharing the VDI are on the same host they'd all share
> the same "tapdisk" process and this would be fine. If they were sharing the
> VDIs across hosts then you'd have multiple tapdisk writing the .vhd
> metadata concurrently which would lead to corruption.
>
> If you need to share the VDIs across hosts then try creating a "raw"
> format VDI, using
>
> $ xe vdi-create sr-uuid=... name-label=foo virtual-size=... type=user
> sm-config:type=raw
>
> Cheers,
> Dave
>
> _______________________________________________
> Xen-api mailing list
> Xen-api [at] lists
> http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
>



--
Carlos Eduardo Tavares Terra
Red Hat Certified Engineer
Consultor em Infraestrutura de TI
GNU/Linux #413291 [http://counter.li.org]


eduardo.terra at gmail

May 19, 2012, 5:17 AM

Post #10 of 15 (619 views)
Permalink
Re: Configuration needed to share a VDI [In reply to]

Mike,

I have tried to do what you said, but I have got an error.

My steps:

[root [at] vmserver0 ~]# xe sr-param-list
uuid=81a9d5c1-f0a8-ecfb-28b0-59154f2b70df
uuid ( RO) : 81a9d5c1-f0a8-ecfb-28b0-59154f2b70df
name-label ( RW): VMDATA02_RAID10
name-description ( RW): iSCSI SR [172.30.1.101
(iqn.1984-05.com.dell:powervault.md3200i.6782bcb00006b020000000004d41e117)]
host ( RO): <shared>
allowed-operations (SRO): forget; VDI.create; VDI.snapshot; plug;
update; destroy; VDI.destroy; scan; VDI.clone; VDI.resize; unplug
current-operations (SRO):
VDIs (SRO): 6fc452d3-7381-4416-a2c9-71e526261c40
PBDs (SRO): 0aee7f9b-3171-f2cf-c3a4-929bb538b247;
d3d748b6-574b-598e-5c43-3e4e79c73515; 04e035ba-781c-7c6d-c54b-97b589bc985b;
cfbe9adc-e233-5f2d-d798-058815a247d0; 5badfa05-dd7c-3b90-7fde-01c2ea7483e9
virtual-allocation ( RO): 1073741824
physical-utilisation ( RO): 1077936128
physical-size ( RO): 600016158720
type ( RO): lvmoiscsi
content-type ( RO):
shared ( RW): true
other-config (MRW):
sm-config (MRO): allocation: thick; use_vhd: true;
multipathable: true; devserial: scsi-36782bcb000069cb1000003724df80c1e
blobs ( RO):
local-cache-enabled ( RO): false
tags (SRW):

[root [at] vmserver0 ~]# xe vdi-create
sr-uuid=81a9d5c1-f0a8-ecfb-28b0-59154f2b70df name-label=teste
virtual-size=1GiB type=user sm-config:type=raw sharable=true
782f2e7b-77d4-4590-b5c4-d2d473c6b63f

Then I have attached this disk in 2 VMs using XenCenter. The VBDs were
created, as display here:

[root [at] vmserver0 ~]# xe vdi-param-list
uuid=782f2e7b-77d4-4590-b5c4-d2d473c6b63f
uuid ( RO) : 782f2e7b-77d4-4590-b5c4-d2d473c6b63f
name-label ( RW): teste
name-description ( RW):
is-a-snapshot ( RO): false
snapshot-of ( RO): <not in database>
snapshots ( RO):
snapshot-time ( RO): 19700101T00:00:00Z
allowed-operations (SRO): resize_online; clone
current-operations (SRO):
sr-uuid ( RO): 81a9d5c1-f0a8-ecfb-28b0-59154f2b70df
sr-name-label ( RO): VMDATA02_RAID10
* vbd-uuids (SRO): c56c23da-85eb-5ae8-a413-18da3d8870b3;
5ca07308-d296-37d9-a715-475453126949*
crashdump-uuids (SRO):
virtual-size ( RO): 1073741824
physical-utilisation ( RO): 1073741824
location ( RO): 782f2e7b-77d4-4590-b5c4-d2d473c6b63f
type ( RO): User
sharable ( RO): true
read-only ( RO): false
storage-lock ( RO): false
managed ( RO): true
parent ( RO): <not in database>
missing ( RO): false
other-config (MRW):
xenstore-data (MRO): vdi-type: aio; storage-type: lvm;
scsi/0x12/0x83:
AIMAMQIBAC1YRU5TUkMgIDc4MmYyZTdiLTc3ZDQtNDU5MC1iNWM0LWQyZDQ3M2M2YjYzZiA=;
scsi/0x12/0x80: AIAAEjc4MmYyZTdiLTc3ZDQtNDUgIA==; vdi-uuid:
782f2e7b-77d4-4590-b5c4-d2d473c6b63f
sm-config (MRO):
host_OpaqueRef:52a45c20-d88f-5869-7f7b-318b17833721: RW; type: raw;
vdi_type: aio
on-boot ( RW): persist
allow-caching ( RW): false
tags (SRW):


But I could activate (plug) only one of them. When I try to plug on both of
them I get this error:

[root [at] vmserver0 ~]# xe vbd-plug uuid=c56c23da-85eb-5ae8-a413-18da3d8870b3
Error code: SR_BACKEND_FAILURE_46
Error parameters: , The VDI is not available [opterr=VDI
782f2e7b-77d4-4590-b5c4-d2d473c6b63f already attached RW],

Is there any parameter am I missing?

On Fri, May 18, 2012 at 10:58 AM, Mike McClurg <mike.mcclurg [at] citrix>wrote:

> On 18/05/12 11:49, Carlos Eduardo Tavares Terra wrote:
>
>> Do I need to do any special configuration in XCP 1.1 or in the SRs to be
>> capable of sharing a VDI between two virtual machines?
>> Is it possible to do in XCP?
>>
>
> You could possibly do this if only one VM attaches the disk RW, but you
> should definitely not do this if you want more than one of the VMs to
> attach the disk RW. For that, you should use something like NFS instead.
>
> To share a VDI, create a new vbd to connect the second VM to the VDI. Do
> 'xe help vbd-create' for docs.
>
> Mike
>
>


--
Carlos Eduardo Tavares Terra
Red Hat Certified Engineer
Consultor em Infraestrutura de TI
GNU/Linux #413291 [http://counter.li.org]


eduardo.terra at gmail

May 19, 2012, 7:17 PM

Post #11 of 15 (605 views)
Permalink
Re: Configuration needed to share a VDI [In reply to]

I tried to execute the vdi-set-shareable-true.py script, that i have found
in the forum. But the result was not positive. I
got SR_OPERATION_NOT_SUPPORTED error.

[root [at] vmserver0 ~]# ./vdi-set-shareable-true.py -v
31e3186c-367f-4a87-b591-56844bb23420
FULL VDI entry = OpaqueRef:fda5a983-f234-c147-3ec9-99a20dfa76c7
{'sm_config': {'vdi_type': 'vhd'}, 'managed': True, 'snapshots': [],
'allowed_operations': ['resize_online', 'generate_config', 'resize',
'destroy', 'clone', 'copy'], 'on_boot': 'persist', 'name_description': '',
'read_only': False, 'uuid': '31e3186c-367f-4a87-b591-56844bb23420',
'storage_lock': False, 'name_label': 'teste', 'tags': [], 'location':
'31e3186c-367f-4a87-b591-56844bb23420', 'type': 'user', 'sharable': True,
'snapshot_time': <DateTime u'19700101T00:00:00Z' at -491c56b4>, 'parent':
'OpaqueRef:NULL', 'missing': False, 'xenstore_data': {'storage-type':
'lvm', 'scsi/0x12/0x80': 'AIAAEjMxZTMxODZjLTM2N2YtNGEgIA==',
'scsi/0x12/0x83':
'AIMAMQIBAC1YRU5TUkMgIDMxZTMxODZjLTM2N2YtNGE4Ny1iNTkxLTU2ODQ0YmIyMzQyMCA=',
'vdi-type': 'vhd', 'vdi-uuid': '31e3186c-367f-4a87-b591-56844bb23420'},
'crash_dumps': [], 'virtual_size': '1073741824', 'is_a_snapshot': False,
'current_operations': {}, 'snapshot_of': 'OpaqueRef:NULL', 'SR':
'OpaqueRef:439cb0a4-8f5e-eba1-6eaa-f2d7ec8827a0', 'other_config': {},
'physical_utilisation': '1082130432', 'allow_caching': False, 'VBDs':
['OpaqueRef:9d4f9e82-6b15-101d-3cec-46eea2a47359',
'OpaqueRef:9591ab93-0f12-b1a5-f92e-0817355d9988']}

FULL VBD entry = OpaqueRef:9d4f9e82-6b15-101d-3cec-46eea2a47359
{'userdevice': '4', 'runtime_properties': {}, 'allowed_operations':
['pause', 'unpause', 'plug', 'attach'], 'VDI':
'OpaqueRef:fda5a983-f234-c147-3ec9-99a20dfa76c7', 'uuid':
'd0a4ac7f-ae94-18b4-926b-628f31cea636', 'storage_lock': False,
'qos_supported_algorithms': [], 'status_code': '0', 'type': 'Disk',
'empty': False, 'VM': 'OpaqueRef:71dd55e9-2e0e-2e4c-bd7d-ece5d9742b3c',
'status_detail': '', 'metrics':
'OpaqueRef:2f6af1e3-fa0c-c438-6765-dc41978066fc', 'device': '',
'qos_algorithm_type': '', 'unpluggable': True, 'current_operations': {},
'bootable': False, 'other_config': {}, 'currently_attached': False, 'mode':
'RW', 'qos_algorithm_params': {}}

FULL VBD entry = OpaqueRef:9591ab93-0f12-b1a5-f92e-0817355d9988
{'userdevice': '2', 'runtime_properties': {}, 'allowed_operations':
['pause', 'unpause', 'plug', 'attach'], 'VDI':
'OpaqueRef:fda5a983-f234-c147-3ec9-99a20dfa76c7', 'uuid':
'81ed397c-48f2-6bc5-c393-1fefc5645f30', 'storage_lock': False,
'qos_supported_algorithms': [], 'status_code': '0', 'type': 'Disk',
'empty': False, 'VM': 'OpaqueRef:a07bf61b-d4bb-ab23-617e-f2d97771ed92',
'status_detail': '', 'metrics':
'OpaqueRef:3c5a3156-0144-ecdb-d07d-0b349a568b87', 'device': 'xvdc',
'qos_algorithm_type': '', 'unpluggable': True, 'current_operations': {},
'bootable': False, 'other_config': {'owner': 'true'}, 'currently_attached':
False, 'mode': 'RW', 'qos_algorithm_params': {}}

ERROR: failed to re-introduce the VDI. unrecoverable error.
Traceback (most recent call last):
File "./vdi-set-shareable-true.py", line 132, in ?
main()
File "./vdi-set-shareable-true.py", line 129, in main
fixup_vdi(options, session)
File "./vdi-set-shareable-true.py", line 70, in fixup_vdi
vdi_data['sm_config'])
File "/usr/lib/python2.4/site-packages/XenAPI.py", line 229, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.4/site-packages/XenAPI.py", line 133, in
xenapi_request
result = _parse_result(getattr(self, methodname)(*full_params))
File "/usr/lib/python2.4/site-packages/XenAPI.py", line 203, in
_parse_result
raise Failure(result['ErrorDescription'])
XenAPI.Failure: ['SR_OPERATION_NOT_SUPPORTED',
'OpaqueRef:439cb0a4-8f5e-eba1-6eaa-f2d7ec8827a0']



On Sat, May 19, 2012 at 9:17 AM, Carlos Eduardo Tavares Terra <
eduardo.terra [at] gmail> wrote:

> Mike,
>
> I have tried to do what you said, but I have got an error.
>
> My steps:
>
> [root [at] vmserver0 ~]# xe sr-param-list
> uuid=81a9d5c1-f0a8-ecfb-28b0-59154f2b70df
> uuid ( RO) : 81a9d5c1-f0a8-ecfb-28b0-59154f2b70df
> name-label ( RW): VMDATA02_RAID10
> name-description ( RW): iSCSI SR [172.30.1.101
> (iqn.1984-05.com.dell:powervault.md3200i.6782bcb00006b020000000004d41e117)]
> host ( RO): <shared>
> allowed-operations (SRO): forget; VDI.create; VDI.snapshot; plug;
> update; destroy; VDI.destroy; scan; VDI.clone; VDI.resize; unplug
> current-operations (SRO):
> VDIs (SRO): 6fc452d3-7381-4416-a2c9-71e526261c40
> PBDs (SRO): 0aee7f9b-3171-f2cf-c3a4-929bb538b247;
> d3d748b6-574b-598e-5c43-3e4e79c73515; 04e035ba-781c-7c6d-c54b-97b589bc985b;
> cfbe9adc-e233-5f2d-d798-058815a247d0; 5badfa05-dd7c-3b90-7fde-01c2ea7483e9
> virtual-allocation ( RO): 1073741824
> physical-utilisation ( RO): 1077936128
> physical-size ( RO): 600016158720
> type ( RO): lvmoiscsi
> content-type ( RO):
> shared ( RW): true
> other-config (MRW):
> sm-config (MRO): allocation: thick; use_vhd: true;
> multipathable: true; devserial: scsi-36782bcb000069cb1000003724df80c1e
> blobs ( RO):
> local-cache-enabled ( RO): false
> tags (SRW):
>
> [root [at] vmserver0 ~]# xe vdi-create
> sr-uuid=81a9d5c1-f0a8-ecfb-28b0-59154f2b70df name-label=teste
> virtual-size=1GiB type=user sm-config:type=raw sharable=true
> 782f2e7b-77d4-4590-b5c4-d2d473c6b63f
>
> Then I have attached this disk in 2 VMs using XenCenter. The VBDs were
> created, as display here:
>
> [root [at] vmserver0 ~]# xe vdi-param-list
> uuid=782f2e7b-77d4-4590-b5c4-d2d473c6b63f
> uuid ( RO) : 782f2e7b-77d4-4590-b5c4-d2d473c6b63f
> name-label ( RW): teste
> name-description ( RW):
> is-a-snapshot ( RO): false
> snapshot-of ( RO): <not in database>
> snapshots ( RO):
> snapshot-time ( RO): 19700101T00:00:00Z
> allowed-operations (SRO): resize_online; clone
> current-operations (SRO):
> sr-uuid ( RO): 81a9d5c1-f0a8-ecfb-28b0-59154f2b70df
> sr-name-label ( RO): VMDATA02_RAID10
> * vbd-uuids (SRO): c56c23da-85eb-5ae8-a413-18da3d8870b3;
> 5ca07308-d296-37d9-a715-475453126949*
> crashdump-uuids (SRO):
> virtual-size ( RO): 1073741824
> physical-utilisation ( RO): 1073741824
> location ( RO): 782f2e7b-77d4-4590-b5c4-d2d473c6b63f
> type ( RO): User
> sharable ( RO): true
> read-only ( RO): false
> storage-lock ( RO): false
> managed ( RO): true
> parent ( RO): <not in database>
> missing ( RO): false
> other-config (MRW):
> xenstore-data (MRO): vdi-type: aio; storage-type: lvm;
> scsi/0x12/0x83:
> AIMAMQIBAC1YRU5TUkMgIDc4MmYyZTdiLTc3ZDQtNDU5MC1iNWM0LWQyZDQ3M2M2YjYzZiA=;
> scsi/0x12/0x80: AIAAEjc4MmYyZTdiLTc3ZDQtNDUgIA==; vdi-uuid:
> 782f2e7b-77d4-4590-b5c4-d2d473c6b63f
> sm-config (MRO):
> host_OpaqueRef:52a45c20-d88f-5869-7f7b-318b17833721: RW; type: raw;
> vdi_type: aio
> on-boot ( RW): persist
> allow-caching ( RW): false
> tags (SRW):
>
>
> But I could activate (plug) only one of them. When I try to plug on both
> of them I get this error:
>
> [root [at] vmserver0 ~]# xe vbd-plug uuid=c56c23da-85eb-5ae8-a413-18da3d8870b3
> Error code: SR_BACKEND_FAILURE_46
> Error parameters: , The VDI is not available [opterr=VDI
> 782f2e7b-77d4-4590-b5c4-d2d473c6b63f already attached RW],
>
> Is there any parameter am I missing?
>
> On Fri, May 18, 2012 at 10:58 AM, Mike McClurg <mike.mcclurg [at] citrix>wrote:
>
>> On 18/05/12 11:49, Carlos Eduardo Tavares Terra wrote:
>>
>>> Do I need to do any special configuration in XCP 1.1 or in the SRs to be
>>> capable of sharing a VDI between two virtual machines?
>>> Is it possible to do in XCP?
>>>
>>
>> You could possibly do this if only one VM attaches the disk RW, but you
>> should definitely not do this if you want more than one of the VMs to
>> attach the disk RW. For that, you should use something like NFS instead.
>>
>> To share a VDI, create a new vbd to connect the second VM to the VDI. Do
>> 'xe help vbd-create' for docs.
>>
>> Mike
>>
>>
>
>
> --
> Carlos Eduardo Tavares Terra
> Red Hat Certified Engineer
> Consultor em Infraestrutura de TI
> GNU/Linux #413291 [http://counter.li.org]
>



--
Carlos Eduardo Tavares Terra
Red Hat Certified Engineer
Consultor em Infraestrutura de TI
GNU/Linux #413291 [http://counter.li.org]


eduardo.terra at gmail

May 24, 2012, 3:25 AM

Post #12 of 15 (560 views)
Permalink
Re: Configuration needed to share a VDI [In reply to]

Anyone has any clue about that?

I really don't know what is missing in SR to support shareable VDIs....

On Sat, May 19, 2012 at 11:17 PM, Carlos Eduardo Tavares Terra <
eduardo.terra [at] gmail> wrote:

> I tried to execute the vdi-set-shareable-true.py script, that i have found
> in the forum. But the result was not positive. I
> got SR_OPERATION_NOT_SUPPORTED error.
>
> [root [at] vmserver0 ~]# ./vdi-set-shareable-true.py -v
> 31e3186c-367f-4a87-b591-56844bb23420
> FULL VDI entry = OpaqueRef:fda5a983-f234-c147-3ec9-99a20dfa76c7
> {'sm_config': {'vdi_type': 'vhd'}, 'managed': True, 'snapshots': [],
> 'allowed_operations': ['resize_online', 'generate_config', 'resize',
> 'destroy', 'clone', 'copy'], 'on_boot': 'persist', 'name_description': '',
> 'read_only': False, 'uuid': '31e3186c-367f-4a87-b591-56844bb23420',
> 'storage_lock': False, 'name_label': 'teste', 'tags': [], 'location':
> '31e3186c-367f-4a87-b591-56844bb23420', 'type': 'user', 'sharable': True,
> 'snapshot_time': <DateTime u'19700101T00:00:00Z' at -491c56b4>, 'parent':
> 'OpaqueRef:NULL', 'missing': False, 'xenstore_data': {'storage-type':
> 'lvm', 'scsi/0x12/0x80': 'AIAAEjMxZTMxODZjLTM2N2YtNGEgIA==',
> 'scsi/0x12/0x83':
> 'AIMAMQIBAC1YRU5TUkMgIDMxZTMxODZjLTM2N2YtNGE4Ny1iNTkxLTU2ODQ0YmIyMzQyMCA=',
> 'vdi-type': 'vhd', 'vdi-uuid': '31e3186c-367f-4a87-b591-56844bb23420'},
> 'crash_dumps': [], 'virtual_size': '1073741824', 'is_a_snapshot': False,
> 'current_operations': {}, 'snapshot_of': 'OpaqueRef:NULL', 'SR':
> 'OpaqueRef:439cb0a4-8f5e-eba1-6eaa-f2d7ec8827a0', 'other_config': {},
> 'physical_utilisation': '1082130432', 'allow_caching': False, 'VBDs':
> ['OpaqueRef:9d4f9e82-6b15-101d-3cec-46eea2a47359',
> 'OpaqueRef:9591ab93-0f12-b1a5-f92e-0817355d9988']}
>
> FULL VBD entry = OpaqueRef:9d4f9e82-6b15-101d-3cec-46eea2a47359
> {'userdevice': '4', 'runtime_properties': {}, 'allowed_operations':
> ['pause', 'unpause', 'plug', 'attach'], 'VDI':
> 'OpaqueRef:fda5a983-f234-c147-3ec9-99a20dfa76c7', 'uuid':
> 'd0a4ac7f-ae94-18b4-926b-628f31cea636', 'storage_lock': False,
> 'qos_supported_algorithms': [], 'status_code': '0', 'type': 'Disk',
> 'empty': False, 'VM': 'OpaqueRef:71dd55e9-2e0e-2e4c-bd7d-ece5d9742b3c',
> 'status_detail': '', 'metrics':
> 'OpaqueRef:2f6af1e3-fa0c-c438-6765-dc41978066fc', 'device': '',
> 'qos_algorithm_type': '', 'unpluggable': True, 'current_operations': {},
> 'bootable': False, 'other_config': {}, 'currently_attached': False, 'mode':
> 'RW', 'qos_algorithm_params': {}}
>
> FULL VBD entry = OpaqueRef:9591ab93-0f12-b1a5-f92e-0817355d9988
> {'userdevice': '2', 'runtime_properties': {}, 'allowed_operations':
> ['pause', 'unpause', 'plug', 'attach'], 'VDI':
> 'OpaqueRef:fda5a983-f234-c147-3ec9-99a20dfa76c7', 'uuid':
> '81ed397c-48f2-6bc5-c393-1fefc5645f30', 'storage_lock': False,
> 'qos_supported_algorithms': [], 'status_code': '0', 'type': 'Disk',
> 'empty': False, 'VM': 'OpaqueRef:a07bf61b-d4bb-ab23-617e-f2d97771ed92',
> 'status_detail': '', 'metrics':
> 'OpaqueRef:3c5a3156-0144-ecdb-d07d-0b349a568b87', 'device': 'xvdc',
> 'qos_algorithm_type': '', 'unpluggable': True, 'current_operations': {},
> 'bootable': False, 'other_config': {'owner': 'true'}, 'currently_attached':
> False, 'mode': 'RW', 'qos_algorithm_params': {}}
>
> ERROR: failed to re-introduce the VDI. unrecoverable error.
> Traceback (most recent call last):
> File "./vdi-set-shareable-true.py", line 132, in ?
> main()
> File "./vdi-set-shareable-true.py", line 129, in main
> fixup_vdi(options, session)
> File "./vdi-set-shareable-true.py", line 70, in fixup_vdi
> vdi_data['sm_config'])
> File "/usr/lib/python2.4/site-packages/XenAPI.py", line 229, in __call__
> return self.__send(self.__name, args)
> File "/usr/lib/python2.4/site-packages/XenAPI.py", line 133, in
> xenapi_request
> result = _parse_result(getattr(self, methodname)(*full_params))
> File "/usr/lib/python2.4/site-packages/XenAPI.py", line 203, in
> _parse_result
> raise Failure(result['ErrorDescription'])
> XenAPI.Failure: ['SR_OPERATION_NOT_SUPPORTED',
> 'OpaqueRef:439cb0a4-8f5e-eba1-6eaa-f2d7ec8827a0']
>
>
>
> On Sat, May 19, 2012 at 9:17 AM, Carlos Eduardo Tavares Terra <
> eduardo.terra [at] gmail> wrote:
>
>> Mike,
>>
>> I have tried to do what you said, but I have got an error.
>>
>> My steps:
>>
>> [root [at] vmserver0 ~]# xe sr-param-list
>> uuid=81a9d5c1-f0a8-ecfb-28b0-59154f2b70df
>> uuid ( RO) : 81a9d5c1-f0a8-ecfb-28b0-59154f2b70df
>> name-label ( RW): VMDATA02_RAID10
>> name-description ( RW): iSCSI SR [172.30.1.101
>> (iqn.1984-05.com.dell:powervault.md3200i.6782bcb00006b020000000004d41e117)]
>> host ( RO): <shared>
>> allowed-operations (SRO): forget; VDI.create; VDI.snapshot; plug;
>> update; destroy; VDI.destroy; scan; VDI.clone; VDI.resize; unplug
>> current-operations (SRO):
>> VDIs (SRO): 6fc452d3-7381-4416-a2c9-71e526261c40
>> PBDs (SRO): 0aee7f9b-3171-f2cf-c3a4-929bb538b247;
>> d3d748b6-574b-598e-5c43-3e4e79c73515; 04e035ba-781c-7c6d-c54b-97b589bc985b;
>> cfbe9adc-e233-5f2d-d798-058815a247d0; 5badfa05-dd7c-3b90-7fde-01c2ea7483e9
>> virtual-allocation ( RO): 1073741824
>> physical-utilisation ( RO): 1077936128
>> physical-size ( RO): 600016158720
>> type ( RO): lvmoiscsi
>> content-type ( RO):
>> shared ( RW): true
>> other-config (MRW):
>> sm-config (MRO): allocation: thick; use_vhd: true;
>> multipathable: true; devserial: scsi-36782bcb000069cb1000003724df80c1e
>> blobs ( RO):
>> local-cache-enabled ( RO): false
>> tags (SRW):
>>
>> [root [at] vmserver0 ~]# xe vdi-create
>> sr-uuid=81a9d5c1-f0a8-ecfb-28b0-59154f2b70df name-label=teste
>> virtual-size=1GiB type=user sm-config:type=raw sharable=true
>> 782f2e7b-77d4-4590-b5c4-d2d473c6b63f
>>
>> Then I have attached this disk in 2 VMs using XenCenter. The VBDs were
>> created, as display here:
>>
>> [root [at] vmserver0 ~]# xe vdi-param-list
>> uuid=782f2e7b-77d4-4590-b5c4-d2d473c6b63f
>> uuid ( RO) : 782f2e7b-77d4-4590-b5c4-d2d473c6b63f
>> name-label ( RW): teste
>> name-description ( RW):
>> is-a-snapshot ( RO): false
>> snapshot-of ( RO): <not in database>
>> snapshots ( RO):
>> snapshot-time ( RO): 19700101T00:00:00Z
>> allowed-operations (SRO): resize_online; clone
>> current-operations (SRO):
>> sr-uuid ( RO): 81a9d5c1-f0a8-ecfb-28b0-59154f2b70df
>> sr-name-label ( RO): VMDATA02_RAID10
>> * vbd-uuids (SRO): c56c23da-85eb-5ae8-a413-18da3d8870b3;
>> 5ca07308-d296-37d9-a715-475453126949*
>> crashdump-uuids (SRO):
>> virtual-size ( RO): 1073741824
>> physical-utilisation ( RO): 1073741824
>> location ( RO): 782f2e7b-77d4-4590-b5c4-d2d473c6b63f
>> type ( RO): User
>> sharable ( RO): true
>> read-only ( RO): false
>> storage-lock ( RO): false
>> managed ( RO): true
>> parent ( RO): <not in database>
>> missing ( RO): false
>> other-config (MRW):
>> xenstore-data (MRO): vdi-type: aio; storage-type: lvm;
>> scsi/0x12/0x83:
>> AIMAMQIBAC1YRU5TUkMgIDc4MmYyZTdiLTc3ZDQtNDU5MC1iNWM0LWQyZDQ3M2M2YjYzZiA=;
>> scsi/0x12/0x80: AIAAEjc4MmYyZTdiLTc3ZDQtNDUgIA==; vdi-uuid:
>> 782f2e7b-77d4-4590-b5c4-d2d473c6b63f
>> sm-config (MRO):
>> host_OpaqueRef:52a45c20-d88f-5869-7f7b-318b17833721: RW; type: raw;
>> vdi_type: aio
>> on-boot ( RW): persist
>> allow-caching ( RW): false
>> tags (SRW):
>>
>>
>> But I could activate (plug) only one of them. When I try to plug on both
>> of them I get this error:
>>
>> [root [at] vmserver0 ~]# xe vbd-plug
>> uuid=c56c23da-85eb-5ae8-a413-18da3d8870b3
>> Error code: SR_BACKEND_FAILURE_46
>> Error parameters: , The VDI is not available [opterr=VDI
>> 782f2e7b-77d4-4590-b5c4-d2d473c6b63f already attached RW],
>>
>> Is there any parameter am I missing?
>>
>> On Fri, May 18, 2012 at 10:58 AM, Mike McClurg <mike.mcclurg [at] citrix>wrote:
>>
>>> On 18/05/12 11:49, Carlos Eduardo Tavares Terra wrote:
>>>
>>>> Do I need to do any special configuration in XCP 1.1 or in the SRs to be
>>>> capable of sharing a VDI between two virtual machines?
>>>> Is it possible to do in XCP?
>>>>
>>>
>>> You could possibly do this if only one VM attaches the disk RW, but you
>>> should definitely not do this if you want more than one of the VMs to
>>> attach the disk RW. For that, you should use something like NFS instead.
>>>
>>> To share a VDI, create a new vbd to connect the second VM to the VDI. Do
>>> 'xe help vbd-create' for docs.
>>>
>>> Mike
>>>
>>>
>>
>>
>> --
>> Carlos Eduardo Tavares Terra
>> Red Hat Certified Engineer
>> Consultor em Infraestrutura de TI
>> GNU/Linux #413291 [http://counter.li.org]
>>
>
>
>
> --
> Carlos Eduardo Tavares Terra
> Red Hat Certified Engineer
> Consultor em Infraestrutura de TI
> GNU/Linux #413291 [http://counter.li.org]
>



--
Carlos Eduardo Tavares Terra
Red Hat Certified Engineer
Consultor em Infraestrutura de TI
GNU/Linux #413291 [http://counter.li.org]


george.shuklin at gmail

May 24, 2012, 3:36 AM

Post #13 of 15 (582 views)
Permalink
Re: Configuration needed to share a VDI [In reply to]

Local caching?

On 24.05.2012 14:25, Carlos Eduardo Tavares Terra wrote:
> Anyone has any clue about that?
>
> I really don't know what is missing in SR to support shareable VDIs....
>
> On Sat, May 19, 2012 at 11:17 PM, Carlos Eduardo Tavares Terra
> <eduardo.terra [at] gmail <mailto:eduardo.terra [at] gmail>> wrote:
>
> I tried to execute the vdi-set-shareable-true.py script, that i
> have found in the forum. But the result was not positive. I
> got SR_OPERATION_NOT_SUPPORTED error.
>
> [root [at] vmserver0 ~]# ./vdi-set-shareable-true.py -v
> 31e3186c-367f-4a87-b591-56844bb23420
> FULL VDI entry = OpaqueRef:fda5a983-f234-c147-3ec9-99a20dfa76c7
> {'sm_config': {'vdi_type': 'vhd'}, 'managed': True, 'snapshots':
> [], 'allowed_operations': ['resize_online', 'generate_config',
> 'resize', 'destroy', 'clone', 'copy'], 'on_boot': 'persist',
> 'name_description': '', 'read_only': False, 'uuid':
> '31e3186c-367f-4a87-b591-56844bb23420', 'storage_lock': False,
> 'name_label': 'teste', 'tags': [], 'location':
> '31e3186c-367f-4a87-b591-56844bb23420', 'type': 'user',
> 'sharable': True, 'snapshot_time': <DateTime u'19700101T00:00:00Z'
> at -491c56b4>, 'parent': 'OpaqueRef:NULL', 'missing': False,
> 'xenstore_data': {'storage-type': 'lvm', 'scsi/0x12/0x80':
> 'AIAAEjMxZTMxODZjLTM2N2YtNGEgIA==', 'scsi/0x12/0x83':
> 'AIMAMQIBAC1YRU5TUkMgIDMxZTMxODZjLTM2N2YtNGE4Ny1iNTkxLTU2ODQ0YmIyMzQyMCA=',
> 'vdi-type': 'vhd', 'vdi-uuid':
> '31e3186c-367f-4a87-b591-56844bb23420'}, 'crash_dumps': [],
> 'virtual_size': '1073741824', 'is_a_snapshot': False,
> 'current_operations': {}, 'snapshot_of': 'OpaqueRef:NULL', 'SR':
> 'OpaqueRef:439cb0a4-8f5e-eba1-6eaa-f2d7ec8827a0', 'other_config':
> {}, 'physical_utilisation': '1082130432', 'allow_caching': False,
> 'VBDs': ['OpaqueRef:9d4f9e82-6b15-101d-3cec-46eea2a47359',
> 'OpaqueRef:9591ab93-0f12-b1a5-f92e-0817355d9988']}
>
> FULL VBD entry = OpaqueRef:9d4f9e82-6b15-101d-3cec-46eea2a47359
> {'userdevice': '4', 'runtime_properties': {},
> 'allowed_operations': ['pause', 'unpause', 'plug', 'attach'],
> 'VDI': 'OpaqueRef:fda5a983-f234-c147-3ec9-99a20dfa76c7', 'uuid':
> 'd0a4ac7f-ae94-18b4-926b-628f31cea636', 'storage_lock': False,
> 'qos_supported_algorithms': [], 'status_code': '0', 'type':
> 'Disk', 'empty': False, 'VM':
> 'OpaqueRef:71dd55e9-2e0e-2e4c-bd7d-ece5d9742b3c', 'status_detail':
> '', 'metrics': 'OpaqueRef:2f6af1e3-fa0c-c438-6765-dc41978066fc',
> 'device': '', 'qos_algorithm_type': '', 'unpluggable': True,
> 'current_operations': {}, 'bootable': False, 'other_config': {},
> 'currently_attached': False, 'mode': 'RW', 'qos_algorithm_params': {}}
>
> FULL VBD entry = OpaqueRef:9591ab93-0f12-b1a5-f92e-0817355d9988
> {'userdevice': '2', 'runtime_properties': {},
> 'allowed_operations': ['pause', 'unpause', 'plug', 'attach'],
> 'VDI': 'OpaqueRef:fda5a983-f234-c147-3ec9-99a20dfa76c7', 'uuid':
> '81ed397c-48f2-6bc5-c393-1fefc5645f30', 'storage_lock': False,
> 'qos_supported_algorithms': [], 'status_code': '0', 'type':
> 'Disk', 'empty': False, 'VM':
> 'OpaqueRef:a07bf61b-d4bb-ab23-617e-f2d97771ed92', 'status_detail':
> '', 'metrics': 'OpaqueRef:3c5a3156-0144-ecdb-d07d-0b349a568b87',
> 'device': 'xvdc', 'qos_algorithm_type': '', 'unpluggable': True,
> 'current_operations': {}, 'bootable': False, 'other_config':
> {'owner': 'true'}, 'currently_attached': False, 'mode': 'RW',
> 'qos_algorithm_params': {}}
>
> ERROR: failed to re-introduce the VDI. unrecoverable error.
> Traceback (most recent call last):
> File "./vdi-set-shareable-true.py", line 132, in ?
> main()
> File "./vdi-set-shareable-true.py", line 129, in main
> fixup_vdi(options, session)
> File "./vdi-set-shareable-true.py", line 70, in fixup_vdi
> vdi_data['sm_config'])
> File "/usr/lib/python2.4/site-packages/XenAPI.py", line 229, in
> __call__
> return self.__send(self.__name, args)
> File "/usr/lib/python2.4/site-packages/XenAPI.py", line 133, in
> xenapi_request
> result = _parse_result(getattr(self, methodname)(*full_params))
> File "/usr/lib/python2.4/site-packages/XenAPI.py", line 203, in
> _parse_result
> raise Failure(result['ErrorDescription'])
> XenAPI.Failure: ['SR_OPERATION_NOT_SUPPORTED',
> 'OpaqueRef:439cb0a4-8f5e-eba1-6eaa-f2d7ec8827a0']
>
>
>
> On Sat, May 19, 2012 at 9:17 AM, Carlos Eduardo Tavares Terra
> <eduardo.terra [at] gmail <mailto:eduardo.terra [at] gmail>> wrote:
>
> Mike,
>
> I have tried to do what you said, but I have got an error.
>
> My steps:
>
> [root [at] vmserver0 ~]# xe sr-param-list
> uuid=81a9d5c1-f0a8-ecfb-28b0-59154f2b70df
> uuid ( RO) :
> 81a9d5c1-f0a8-ecfb-28b0-59154f2b70df
> name-label ( RW): VMDATA02_RAID10
> name-description ( RW): iSCSI SR [172.30.1.101
> (iqn.1984-05.com.dell:powervault.md3200i.6782bcb00006b020000000004d41e117)]
> host ( RO): <shared>
> allowed-operations (SRO): forget; VDI.create;
> VDI.snapshot; plug; update; destroy; VDI.destroy; scan;
> VDI.clone; VDI.resize; unplug
> current-operations (SRO):
> VDIs (SRO):
> 6fc452d3-7381-4416-a2c9-71e526261c40
> PBDs (SRO):
> 0aee7f9b-3171-f2cf-c3a4-929bb538b247;
> d3d748b6-574b-598e-5c43-3e4e79c73515;
> 04e035ba-781c-7c6d-c54b-97b589bc985b;
> cfbe9adc-e233-5f2d-d798-058815a247d0;
> 5badfa05-dd7c-3b90-7fde-01c2ea7483e9
> virtual-allocation ( RO): 1073741824
> physical-utilisation ( RO): 1077936128
> physical-size ( RO): 600016158720
> type ( RO): lvmoiscsi
> content-type ( RO):
> shared ( RW): true
> other-config (MRW):
> sm-config (MRO): allocation: thick; use_vhd:
> true; multipathable: true; devserial:
> scsi-36782bcb000069cb1000003724df80c1e
> blobs ( RO):
> local-cache-enabled ( RO): false
> tags (SRW):
>
> [root [at] vmserver0 ~]# xe vdi-create
> sr-uuid=81a9d5c1-f0a8-ecfb-28b0-59154f2b70df name-label=teste
> virtual-size=1GiB type=user sm-config:type=raw sharable=true
> 782f2e7b-77d4-4590-b5c4-d2d473c6b63f
>
> Then I have attached this disk in 2 VMs using XenCenter. The
> VBDs were created, as display here:
>
> [root [at] vmserver0 ~]# xe vdi-param-list
> uuid=782f2e7b-77d4-4590-b5c4-d2d473c6b63f
> uuid ( RO) :
> 782f2e7b-77d4-4590-b5c4-d2d473c6b63f
> name-label ( RW): teste
> name-description ( RW):
> is-a-snapshot ( RO): false
> snapshot-of ( RO): <not in database>
> snapshots ( RO):
> snapshot-time ( RO): 19700101T00:00:00Z
> allowed-operations (SRO): resize_online; clone
> current-operations (SRO):
> sr-uuid ( RO):
> 81a9d5c1-f0a8-ecfb-28b0-59154f2b70df
> sr-name-label ( RO): VMDATA02_RAID10
> * vbd-uuids (SRO):
> c56c23da-85eb-5ae8-a413-18da3d8870b3;
> 5ca07308-d296-37d9-a715-475453126949*
> crashdump-uuids (SRO):
> virtual-size ( RO): 1073741824
> physical-utilisation ( RO): 1073741824
> location ( RO):
> 782f2e7b-77d4-4590-b5c4-d2d473c6b63f
> type ( RO): User
> sharable ( RO): true
> read-only ( RO): false
> storage-lock ( RO): false
> managed ( RO): true
> parent ( RO): <not in database>
> missing ( RO): false
> other-config (MRW):
> xenstore-data (MRO): vdi-type: aio; storage-type:
> lvm; scsi/0x12/0x83:
> AIMAMQIBAC1YRU5TUkMgIDc4MmYyZTdiLTc3ZDQtNDU5MC1iNWM0LWQyZDQ3M2M2YjYzZiA=;
> scsi/0x12/0x80: AIAAEjc4MmYyZTdiLTc3ZDQtNDUgIA==; vdi-uuid:
> 782f2e7b-77d4-4590-b5c4-d2d473c6b63f
> sm-config (MRO):
> host_OpaqueRef:52a45c20-d88f-5869-7f7b-318b17833721: RW; type:
> raw; vdi_type: aio
> on-boot ( RW): persist
> allow-caching ( RW): false
> tags (SRW):
>
>
> But I could activate (plug) only one of them. When I try to
> plug on both of them I get this error:
>
> [root [at] vmserver0 ~]# xe vbd-plug
> uuid=c56c23da-85eb-5ae8-a413-18da3d8870b3
> Error code: SR_BACKEND_FAILURE_46
> Error parameters: , The VDI is not available [opterr=VDI
> 782f2e7b-77d4-4590-b5c4-d2d473c6b63f already attached RW],
>
> Is there any parameter am I missing?
>
> On Fri, May 18, 2012 at 10:58 AM, Mike McClurg
> <mike.mcclurg [at] citrix <mailto:mike.mcclurg [at] citrix>> wrote:
>
> On 18/05/12 11:49, Carlos Eduardo Tavares Terra wrote:
>
> Do I need to do any special configuration in XCP 1.1
> or in the SRs to be
> capable of sharing a VDI between two virtual machines?
> Is it possible to do in XCP?
>
>
> You could possibly do this if only one VM attaches the
> disk RW, but you should definitely not do this if you want
> more than one of the VMs to attach the disk RW. For that,
> you should use something like NFS instead.
>
> To share a VDI, create a new vbd to connect the second VM
> to the VDI. Do 'xe help vbd-create' for docs.
>
> Mike
>
>
>
>
> --
> Carlos Eduardo Tavares Terra
> Red Hat Certified Engineer
> Consultor em Infraestrutura de TI
> GNU/Linux #413291 [http://counter.li.org]
>
>
>
>
> --
> Carlos Eduardo Tavares Terra
> Red Hat Certified Engineer
> Consultor em Infraestrutura de TI
> GNU/Linux #413291 [http://counter.li.org]
>
>
>
>
> --
> Carlos Eduardo Tavares Terra
> Red Hat Certified Engineer
> Consultor em Infraestrutura de TI
> GNU/Linux #413291 [http://counter.li.org]
>
>
> _______________________________________________
> Xen-api mailing list
> Xen-api [at] lists
> http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api


eduardo.terra at gmail

May 24, 2012, 2:45 PM

Post #14 of 15 (566 views)
Permalink
Re: Configuration needed to share a VDI [In reply to]

Do I need to enable local caching to use shareable VDIs?

On Thu, May 24, 2012 at 7:36 AM, George Shuklin <george.shuklin [at] gmail>wrote:

> Local caching?
>
> On 24.05.2012 14:25, Carlos Eduardo Tavares Terra wrote:
>
> Anyone has any clue about that?
>
> I really don't know what is missing in SR to support shareable VDIs....
>
> On Sat, May 19, 2012 at 11:17 PM, Carlos Eduardo Tavares Terra <
> eduardo.terra [at] gmail> wrote:
>
>> I tried to execute the vdi-set-shareable-true.py script, that i have
>> found in the forum. But the result was not positive. I
>> got SR_OPERATION_NOT_SUPPORTED error.
>>
>> [root [at] vmserver0 ~]# ./vdi-set-shareable-true.py -v
>> 31e3186c-367f-4a87-b591-56844bb23420
>> FULL VDI entry = OpaqueRef:fda5a983-f234-c147-3ec9-99a20dfa76c7
>> {'sm_config': {'vdi_type': 'vhd'}, 'managed': True, 'snapshots': [],
>> 'allowed_operations': ['resize_online', 'generate_config', 'resize',
>> 'destroy', 'clone', 'copy'], 'on_boot': 'persist', 'name_description': '',
>> 'read_only': False, 'uuid': '31e3186c-367f-4a87-b591-56844bb23420',
>> 'storage_lock': False, 'name_label': 'teste', 'tags': [], 'location':
>> '31e3186c-367f-4a87-b591-56844bb23420', 'type': 'user', 'sharable': True,
>> 'snapshot_time': <DateTime u'19700101T00:00:00Z' at -491c56b4>, 'parent':
>> 'OpaqueRef:NULL', 'missing': False, 'xenstore_data': {'storage-type':
>> 'lvm', 'scsi/0x12/0x80': 'AIAAEjMxZTMxODZjLTM2N2YtNGEgIA==',
>> 'scsi/0x12/0x83':
>> 'AIMAMQIBAC1YRU5TUkMgIDMxZTMxODZjLTM2N2YtNGE4Ny1iNTkxLTU2ODQ0YmIyMzQyMCA=',
>> 'vdi-type': 'vhd', 'vdi-uuid': '31e3186c-367f-4a87-b591-56844bb23420'},
>> 'crash_dumps': [], 'virtual_size': '1073741824', 'is_a_snapshot': False,
>> 'current_operations': {}, 'snapshot_of': 'OpaqueRef:NULL', 'SR':
>> 'OpaqueRef:439cb0a4-8f5e-eba1-6eaa-f2d7ec8827a0', 'other_config': {},
>> 'physical_utilisation': '1082130432', 'allow_caching': False, 'VBDs':
>> ['OpaqueRef:9d4f9e82-6b15-101d-3cec-46eea2a47359',
>> 'OpaqueRef:9591ab93-0f12-b1a5-f92e-0817355d9988']}
>>
>> FULL VBD entry = OpaqueRef:9d4f9e82-6b15-101d-3cec-46eea2a47359
>> {'userdevice': '4', 'runtime_properties': {}, 'allowed_operations':
>> ['pause', 'unpause', 'plug', 'attach'], 'VDI':
>> 'OpaqueRef:fda5a983-f234-c147-3ec9-99a20dfa76c7', 'uuid':
>> 'd0a4ac7f-ae94-18b4-926b-628f31cea636', 'storage_lock': False,
>> 'qos_supported_algorithms': [], 'status_code': '0', 'type': 'Disk',
>> 'empty': False, 'VM': 'OpaqueRef:71dd55e9-2e0e-2e4c-bd7d-ece5d9742b3c',
>> 'status_detail': '', 'metrics':
>> 'OpaqueRef:2f6af1e3-fa0c-c438-6765-dc41978066fc', 'device': '',
>> 'qos_algorithm_type': '', 'unpluggable': True, 'current_operations': {},
>> 'bootable': False, 'other_config': {}, 'currently_attached': False, 'mode':
>> 'RW', 'qos_algorithm_params': {}}
>>
>> FULL VBD entry = OpaqueRef:9591ab93-0f12-b1a5-f92e-0817355d9988
>> {'userdevice': '2', 'runtime_properties': {}, 'allowed_operations':
>> ['pause', 'unpause', 'plug', 'attach'], 'VDI':
>> 'OpaqueRef:fda5a983-f234-c147-3ec9-99a20dfa76c7', 'uuid':
>> '81ed397c-48f2-6bc5-c393-1fefc5645f30', 'storage_lock': False,
>> 'qos_supported_algorithms': [], 'status_code': '0', 'type': 'Disk',
>> 'empty': False, 'VM': 'OpaqueRef:a07bf61b-d4bb-ab23-617e-f2d97771ed92',
>> 'status_detail': '', 'metrics':
>> 'OpaqueRef:3c5a3156-0144-ecdb-d07d-0b349a568b87', 'device': 'xvdc',
>> 'qos_algorithm_type': '', 'unpluggable': True, 'current_operations': {},
>> 'bootable': False, 'other_config': {'owner': 'true'}, 'currently_attached':
>> False, 'mode': 'RW', 'qos_algorithm_params': {}}
>>
>> ERROR: failed to re-introduce the VDI. unrecoverable error.
>> Traceback (most recent call last):
>> File "./vdi-set-shareable-true.py", line 132, in ?
>> main()
>> File "./vdi-set-shareable-true.py", line 129, in main
>> fixup_vdi(options, session)
>> File "./vdi-set-shareable-true.py", line 70, in fixup_vdi
>> vdi_data['sm_config'])
>> File "/usr/lib/python2.4/site-packages/XenAPI.py", line 229, in __call__
>> return self.__send(self.__name, args)
>> File "/usr/lib/python2.4/site-packages/XenAPI.py", line 133, in
>> xenapi_request
>> result = _parse_result(getattr(self, methodname)(*full_params))
>> File "/usr/lib/python2.4/site-packages/XenAPI.py", line 203, in
>> _parse_result
>> raise Failure(result['ErrorDescription'])
>> XenAPI.Failure: ['SR_OPERATION_NOT_SUPPORTED',
>> 'OpaqueRef:439cb0a4-8f5e-eba1-6eaa-f2d7ec8827a0']
>>
>>
>>
>> On Sat, May 19, 2012 at 9:17 AM, Carlos Eduardo Tavares Terra <
>> eduardo.terra [at] gmail> wrote:
>>
>>> Mike,
>>>
>>> I have tried to do what you said, but I have got an error.
>>>
>>> My steps:
>>>
>>> [root [at] vmserver0 ~]# xe sr-param-list
>>> uuid=81a9d5c1-f0a8-ecfb-28b0-59154f2b70df
>>> uuid ( RO) : 81a9d5c1-f0a8-ecfb-28b0-59154f2b70df
>>> name-label ( RW): VMDATA02_RAID10
>>> name-description ( RW): iSCSI SR [172.30.1.101
>>> (iqn.1984-05.com.dell:powervault.md3200i.6782bcb00006b020000000004d41e117)]
>>> host ( RO): <shared>
>>> allowed-operations (SRO): forget; VDI.create; VDI.snapshot; plug;
>>> update; destroy; VDI.destroy; scan; VDI.clone; VDI.resize; unplug
>>> current-operations (SRO):
>>> VDIs (SRO): 6fc452d3-7381-4416-a2c9-71e526261c40
>>> PBDs (SRO): 0aee7f9b-3171-f2cf-c3a4-929bb538b247;
>>> d3d748b6-574b-598e-5c43-3e4e79c73515; 04e035ba-781c-7c6d-c54b-97b589bc985b;
>>> cfbe9adc-e233-5f2d-d798-058815a247d0; 5badfa05-dd7c-3b90-7fde-01c2ea7483e9
>>> virtual-allocation ( RO): 1073741824
>>> physical-utilisation ( RO): 1077936128
>>> physical-size ( RO): 600016158720
>>> type ( RO): lvmoiscsi
>>> content-type ( RO):
>>> shared ( RW): true
>>> other-config (MRW):
>>> sm-config (MRO): allocation: thick; use_vhd: true;
>>> multipathable: true; devserial: scsi-36782bcb000069cb1000003724df80c1e
>>> blobs ( RO):
>>> local-cache-enabled ( RO): false
>>> tags (SRW):
>>>
>>> [root [at] vmserver0 ~]# xe vdi-create
>>> sr-uuid=81a9d5c1-f0a8-ecfb-28b0-59154f2b70df name-label=teste
>>> virtual-size=1GiB type=user sm-config:type=raw sharable=true
>>> 782f2e7b-77d4-4590-b5c4-d2d473c6b63f
>>>
>>> Then I have attached this disk in 2 VMs using XenCenter. The VBDs were
>>> created, as display here:
>>>
>>> [root [at] vmserver0 ~]# xe vdi-param-list
>>> uuid=782f2e7b-77d4-4590-b5c4-d2d473c6b63f
>>> uuid ( RO) : 782f2e7b-77d4-4590-b5c4-d2d473c6b63f
>>> name-label ( RW): teste
>>> name-description ( RW):
>>> is-a-snapshot ( RO): false
>>> snapshot-of ( RO): <not in database>
>>> snapshots ( RO):
>>> snapshot-time ( RO): 19700101T00:00:00Z
>>> allowed-operations (SRO): resize_online; clone
>>> current-operations (SRO):
>>> sr-uuid ( RO): 81a9d5c1-f0a8-ecfb-28b0-59154f2b70df
>>> sr-name-label ( RO): VMDATA02_RAID10
>>> * vbd-uuids (SRO): c56c23da-85eb-5ae8-a413-18da3d8870b3;
>>> 5ca07308-d296-37d9-a715-475453126949*
>>> crashdump-uuids (SRO):
>>> virtual-size ( RO): 1073741824
>>> physical-utilisation ( RO): 1073741824
>>> location ( RO): 782f2e7b-77d4-4590-b5c4-d2d473c6b63f
>>> type ( RO): User
>>> sharable ( RO): true
>>> read-only ( RO): false
>>> storage-lock ( RO): false
>>> managed ( RO): true
>>> parent ( RO): <not in database>
>>> missing ( RO): false
>>> other-config (MRW):
>>> xenstore-data (MRO): vdi-type: aio; storage-type: lvm;
>>> scsi/0x12/0x83:
>>> AIMAMQIBAC1YRU5TUkMgIDc4MmYyZTdiLTc3ZDQtNDU5MC1iNWM0LWQyZDQ3M2M2YjYzZiA=;
>>> scsi/0x12/0x80: AIAAEjc4MmYyZTdiLTc3ZDQtNDUgIA==; vdi-uuid:
>>> 782f2e7b-77d4-4590-b5c4-d2d473c6b63f
>>> sm-config (MRO):
>>> host_OpaqueRef:52a45c20-d88f-5869-7f7b-318b17833721: RW; type: raw;
>>> vdi_type: aio
>>> on-boot ( RW): persist
>>> allow-caching ( RW): false
>>> tags (SRW):
>>>
>>>
>>> But I could activate (plug) only one of them. When I try to plug on
>>> both of them I get this error:
>>>
>>> [root [at] vmserver0 ~]# xe vbd-plug
>>> uuid=c56c23da-85eb-5ae8-a413-18da3d8870b3
>>> Error code: SR_BACKEND_FAILURE_46
>>> Error parameters: , The VDI is not available [opterr=VDI
>>> 782f2e7b-77d4-4590-b5c4-d2d473c6b63f already attached RW],
>>>
>>> Is there any parameter am I missing?
>>>
>>> On Fri, May 18, 2012 at 10:58 AM, Mike McClurg <mike.mcclurg [at] citrix>wrote:
>>>
>>>> On 18/05/12 11:49, Carlos Eduardo Tavares Terra wrote:
>>>>
>>>>> Do I need to do any special configuration in XCP 1.1 or in the SRs to
>>>>> be
>>>>> capable of sharing a VDI between two virtual machines?
>>>>> Is it possible to do in XCP?
>>>>>
>>>>
>>>> You could possibly do this if only one VM attaches the disk RW, but
>>>> you should definitely not do this if you want more than one of the VMs to
>>>> attach the disk RW. For that, you should use something like NFS instead.
>>>>
>>>> To share a VDI, create a new vbd to connect the second VM to the VDI.
>>>> Do 'xe help vbd-create' for docs.
>>>>
>>>> Mike
>>>>
>>>>
>>>
>>>
>>> --
>>> Carlos Eduardo Tavares Terra
>>> Red Hat Certified Engineer
>>> Consultor em Infraestrutura de TI
>>> GNU/Linux #413291 [http://counter.li.org]
>>>
>>
>>
>>
>> --
>> Carlos Eduardo Tavares Terra
>> Red Hat Certified Engineer
>> Consultor em Infraestrutura de TI
>> GNU/Linux #413291 [http://counter.li.org]
>>
>
>
>
> --
> Carlos Eduardo Tavares Terra
> Red Hat Certified Engineer
> Consultor em Infraestrutura de TI
> GNU/Linux #413291 [http://counter.li.org]
>
>
> _______________________________________________
> Xen-api mailing listXen-api [at] listshttp://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
>
>
>
>
> _______________________________________________
> Xen-api mailing list
> Xen-api [at] lists
> http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
>
>


--
Carlos Eduardo Tavares Terra
Red Hat Certified Engineer
Consultor em Infraestrutura de TI
GNU/Linux #413291 [http://counter.li.org]


george.shuklin at gmail

May 24, 2012, 5:56 PM

Post #15 of 15 (564 views)
Permalink
Re: Configuration needed to share a VDI [In reply to]

Nope, I've just say that local caching can be reason SM does not
supports for shareable VDI. (you can not have local caching and shared
VDI same time).

On 25.05.2012 01:45, Carlos Eduardo Tavares Terra wrote:
> Do I need to enable local caching to use shareable VDIs?
>
> On Thu, May 24, 2012 at 7:36 AM, George Shuklin
> <george.shuklin [at] gmail <mailto:george.shuklin [at] gmail>> wrote:
>
> Local caching?
>
> On 24.05.2012 14:25, Carlos Eduardo Tavares Terra wrote:
>> Anyone has any clue about that?
>>
>> I really don't know what is missing in SR to support shareable
>> VDIs....
>>
>

Xen api RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.