Bug 1159420 - Prevent migration of VMs using scsi reservation on virtio-scsi LUNs
Summary: Prevent migration of VMs using scsi reservation on virtio-scsi LUNs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Ala Hino
QA Contact: lkuchlan
URL:
Whiteboard:
Depends On:
Blocks: RHEV_SCSI_reserve_Win_SharedDisk 1331277
TreeView+ depends on / blocked
 
Reported: 2014-10-31 22:11 UTC by Federico Simoncelli
Modified: 2016-04-28 07:51 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Previously, if a virtual machine had a virtio-scsi passthrough disk on a direct LUN, VDSM/QEMU had no way of knowing if the LUN had a reservation request against it. The virtual machine then was not prevented from being migrated, thus losing access to the disk. Now, you can mark a direct LUN as having SCSI reservation, which prevents migration of that virtual machine.
Clone Of:
Environment:
Last Closed:
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 37664 0 master MERGED core: Prevent VM migration when SCSI reservation is used 2020-06-15 18:25:23 UTC

Description Federico Simoncelli 2014-10-31 22:11:03 UTC
Description of problem:
VMs with passthrough on virtio-scsi LUNs could be using scsi reservation. If the VM is migrated when the reservation is active the guest will lose access to the disk as the initiator will change as the host changes.

Version-Release number of selected component (if applicable):
rhevm-backend-3.5.0-0.18.beta.el6ev

Steps to Reproduce:
1. start a VM with a virtio-scsi passthrough disk on a direct lun
2. issue a scsi reservation request (e.g. using sg_persist)
3. migrate the VM

Actual results:
The VM loses access to the disk

Expected results:
It shouldn't be possible to migrate the VM as it would lose access to the disk

Additional info:
At the moment it seems impossible for vdsm/qemu to know in advance (or detect) if there's any persistent reservation active. Probably the best solution is to force the VM pin-to-host if at least one of the virtio-scsi disks is flagged with a new special option (e.g. "uses scsi reservation").

Comment 1 Nir Soffer 2014-11-02 20:48:05 UTC
Looks like 3.6 stuff.

Comment 2 Allon Mureinik 2014-11-06 08:14:08 UTC
(In reply to Nir Soffer from comment #1)
> Looks like 3.6 stuff.
Agreed.

Comment 3 Allon Mureinik 2015-04-21 12:32:43 UTC
Ala, can you add the doctext here please?

Comment 4 lkuchlan 2015-06-15 10:18:11 UTC
Tested using:
ovirt-engine-3.6.0-0.0.master.20150519172219.git9a2e2b3.el6.noarch
vdsm-4.17.0-912.git25a063d.el7.noarch

Verification instructions:
1. start a VM with a virtio-scsi passthrough disk on a direct lun
2. issue a scsi reservation request (e.g. using sg_persist)
3. migrate the VM

Results:
The VM can not be migrated, as a result of using SCSI reservation

Comment 7 Allon Mureinik 2016-03-10 10:42:46 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

Comment 8 Allon Mureinik 2016-03-10 10:47:20 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

Comment 9 Allon Mureinik 2016-03-10 12:03:53 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE


Note You need to log in before you can comment on or make changes to this bug.