final ArrayList partitions = new ArrayList(8);
for (int i = 0; i < vmFiles.length; i++) {
final VMFile file = vmFiles[i];
if (file == null) {
throw new CreationException(
"vmFile[] contents may not be null (index " + i + ")");
}
if (file.isRootFile()) {
if (seenRootDisk) {
throw new CreationException("more than one root disk?");
} else {
seenRootDisk = true;
}
// TODO:
// only propagating root disk until multiple partitions are
// propagated and staged as well, other (presumably readonly)
// partitions are assumed to be in local disk cache for now
partitions.add(this.rootPartition(vm,
file,
propagationEnabled));
} else if (file.getBlankSpaceName() != null) {
partitions.add(
this.blankspacePartition(file.getBlankSpaceSize(),
file,
vmName));
} else {
partitions.add(this.regularPartition(file,