bug 6569: eject CD before migration

need to document it, after migration, CD is gone
This commit is contained in:
anthony 2010-11-23 19:22:26 -08:00
parent d5b04dd25a
commit a36b073e78
1 changed files with 8 additions and 0 deletions

View File

@ -1885,6 +1885,14 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
}
}
Set<VBD> vbds = vm.getVBDs(conn);
for( VBD vbd : vbds) {
VBD.Record vbdRec = vbd.getRecord(conn);
if( vbdRec.type.equals(Types.VbdType.CD.toString()) && !vbdRec.empty ) {
vbd.eject(conn);
break;
}
}
if (i >= 20) {
String msg = "migration failed due to can not fake PV driver for " + vmName;