We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3f79e66 + 48c7b09 commit 9d04350Copy full SHA for 9d04350
1 file changed
compute/src/main/java/org/zstack/compute/vm/VmAllocateNicFlow.java
@@ -126,7 +126,8 @@ public void run(MessageReply reply) {
126
nic.setVmInstanceUuid(spec.getVmInventory().getUuid());
127
nic.setL3NetworkUuid(areply.getIpInventory().getL3NetworkUuid());
128
nic.setMac(mac);
129
- nic.setHypervisorType(spec.getDestHost().getHypervisorType());
+ nic.setHypervisorType(spec.getDestHost() == null ?
130
+ spec.getVmInventory().getHypervisorType() : spec.getDestHost().getHypervisorType());
131
if (mo.checkDuplicateMac(nic.getHypervisorType(), nic.getMac())) {
132
trigger.fail(operr("Duplicate mac address [%s]", nic.getMac()));
133
return;
0 commit comments