mirror of https://github.com/apache/cloudstack.git
fix NPE when stopvm
This commit is contained in:
parent
cab765f85e
commit
1fa00d14b1
|
|
@ -1988,12 +1988,6 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
|
|||
try {
|
||||
Connect conn = LibvirtConnection.getConnection();
|
||||
|
||||
String macAddress = null;
|
||||
if (vmName.startsWith("i-")) {
|
||||
List<InterfaceDef> nics = getInterfaces(conn, vmName);
|
||||
macAddress = nics.get(0).getMacAddress();
|
||||
}
|
||||
|
||||
destroy_network_rules_for_vm(conn, vmName);
|
||||
String result = stopVM(conn, vmName, defineOps.UNDEFINE_VM);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue