Skip to content

Commit 966814b

Browse files
committed
Fix HVM VM restart bug in XenServer
1 parent 7da9517 commit 966814b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,8 +1149,8 @@ public VBD createVbd(final Connection conn, final DiskTO volume, final String vm
11491149
vbdr.unpluggable = (volume.getType() == Volume.Type.ROOT) ? false : true;
11501150
vbdr.userdevice = "autodetect";
11511151
final Long deviceId = volume.getDiskSeq();
1152-
if (deviceId != null && !isDeviceUsed(conn, vm, deviceId)) {
1153-
vbdr.userdevice = deviceId.toString();
1152+
if (deviceId != null && (!isDeviceUsed(conn, vm, deviceId) || deviceId > 3)) {
1153+
vbdr.userdevice = deviceId.toString();
11541154
}
11551155
}
11561156
final VBD vbd = VBD.create(conn, vbdr);

0 commit comments

Comments
 (0)