mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-2067: Throw LibvirtException so that VM start failures are
noticed, fix related NPE that can happen when VM starts fail Signed-off-by: Chip Childers <chip.childers@gmail.com>
This commit is contained in:
parent
9b15a47195
commit
0c4048cbbc
|
|
@ -985,8 +985,7 @@ ServerResource {
|
|||
*/
|
||||
dm = conn.domainCreateXML(domainXML, 0);
|
||||
} catch (final LibvirtException e) {
|
||||
s_logger.warn("Failed to start domain " + vmName + ": "
|
||||
+ e.getMessage());
|
||||
throw e;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
@ -4234,9 +4233,11 @@ ServerResource {
|
|||
}
|
||||
|
||||
private void cleanupVMNetworks(Connect conn, List<InterfaceDef> nics) {
|
||||
for (InterfaceDef nic : nics) {
|
||||
if (nic.getHostNetType() == hostNicType.VNET) {
|
||||
cleanupVnet(conn, getVnetIdFromBrName(nic.getBrName()));
|
||||
if (nics != null) {
|
||||
for (InterfaceDef nic : nics) {
|
||||
if (nic.getHostNetType() == hostNicType.VNET) {
|
||||
cleanupVnet(conn, getVnetIdFromBrName(nic.getBrName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue