Fix HVM VM restart bug in XenServer

This commit is contained in:
Syed 2016-12-15 14:12:59 -05:00
parent 7da95172a4
commit 966814b07d

View File

@ -1149,8 +1149,8 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
vbdr.unpluggable = (volume.getType() == Volume.Type.ROOT) ? false : true;
vbdr.userdevice = "autodetect";
final Long deviceId = volume.getDiskSeq();
if (deviceId != null && !isDeviceUsed(conn, vm, deviceId)) {
vbdr.userdevice = deviceId.toString();
if (deviceId != null && (!isDeviceUsed(conn, vm, deviceId) || deviceId > 3)) {
vbdr.userdevice = deviceId.toString();
}
}
final VBD vbd = VBD.create(conn, vbdr);