While deploying Vm with DataDisk in LXC, if the rbd image mapping on the host fails, deploy Vm should fail

This commit is contained in:
Kishan Kavala 2014-11-24 16:03:23 +05:30
parent f767adfe71
commit 85bd96c6b2
1 changed files with 2 additions and 0 deletions

View File

@ -4030,6 +4030,8 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
diskdef.defBlockBasedDisk(device, devId, DiskDef.diskBus.VIRTIO);
diskdef.setQemuDriver(false);
vm.getDevices().addDevice(diskdef);
} else {
throw new InternalErrorException("Error while mapping RBD device on host");
}
}
}