Skip to content

Commit 9d04350

Browse files
author
gitlab
committed
Merge branch 'fix-25881@@2' into 'master'
[BugFix: ZSTACK-25881] nic hypervisortype is consistent with VM See merge request zstackio/zstack!6122
2 parents 3f79e66 + 48c7b09 commit 9d04350

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

compute/src/main/java/org/zstack/compute/vm/VmAllocateNicFlow.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ public void run(MessageReply reply) {
126126
nic.setVmInstanceUuid(spec.getVmInventory().getUuid());
127127
nic.setL3NetworkUuid(areply.getIpInventory().getL3NetworkUuid());
128128
nic.setMac(mac);
129-
nic.setHypervisorType(spec.getDestHost().getHypervisorType());
129+
nic.setHypervisorType(spec.getDestHost() == null ?
130+
spec.getVmInventory().getHypervisorType() : spec.getDestHost().getHypervisorType());
130131
if (mo.checkDuplicateMac(nic.getHypervisorType(), nic.getMac())) {
131132
trigger.fail(operr("Duplicate mac address [%s]", nic.getMac()));
132133
return;

0 commit comments

Comments
 (0)