[BugFix:ZSTACK-28527] Specific prompt information when fail to attach vmnic
@@ -1687,10 +1687,16 @@ public class KVMHost extends HostBase implements Host {
@Override
public void success(AttachNicResponse ret) {
if (!ret.isSuccess()) {
+ if (ret.getError().contains("Device or resource busy")) {
+ reply.setError(operr("failed to attach nic[uuid:%s, vm:%s] on kvm host[uuid:%s, ip:%s]," +
+ "because %s, please try again or delete device[%s] by yourself", msg.getNicInventory().getUuid(), msg.getNicInventory().getVmInstanceUuid(),
+ self.getUuid(), self.getManagementIp(), ret.getError(), msg.getNicInventory().getInternalName()));
+ } else {
reply.setError(operr("failed to attach nic[uuid:%s, vm:%s] on kvm host[uuid:%s, ip:%s]," +
"because %s", msg.getNicInventory().getUuid(), msg.getNicInventory().getVmInstanceUuid(),
self.getUuid(), self.getManagementIp(), ret.getError()));
}
+ }
bus.reply(msg, reply);
