Remove nic host with id: null
problem
The issue we are experiencing is that when attempting to remove a network interface in KVM while the VM is powered off, the operation fails with the following error: 'Host with id: null not found.' When the VM is running, the interface can be removed without any problems.
versions
ACS: 4.20.0 SO: Ubuntu 24.0.4
Steps to reproduce the issue:
- Power off the VM in KVM.
- Attempt to remove a network interface from the VM configuration.
- The operation fails and the following error is returned: "Host with id: null not found".
- If the same action is performed while the VM is running, the network interface can be removed successfully.
this seems to be related to #2482 cc @nvazquez
@weizhouapache Why is this related to #2482?
@weizhouapache Why is this related to #2482?
@poli1025 the error is thrown by this line
https://github.com/apache/cloudstack/blob/cfe96026dc424e19e9d9ccf941955b8cb41c6717/server/src/main/java/com/cloud/hypervisor/KVMGuru.java#L133-L139
you have enabled CPU cap in the service offering, right ?
@weizhouapache Why is this related to #2482?
@poli1025 the error is thrown by this line
cloudstack/server/src/main/java/com/cloud/hypervisor/KVMGuru.java
Lines 133 to 139 in cfe9602
if (to.isLimitCpuUse()) { VirtualMachine vm = vmProfile.getVirtualMachine(); HostVO host = hostDao.findById(vm.getHostId()); if (host == null) { throw new CloudRuntimeException("Host with id: " + vm.getHostId() + " not found"); } logger.debug("Limiting CPU usage for VM: {} on host: {}", vm, host); you have enabled
CPU capin the service offering, right ?
Yes, I have CPU capping enabled. So, if I disable the CPU cap in the service offering, it should work, right?"
Yes, I have CPU capping enabled. So, if I disable the CPU cap in the service offering, it should work, right?"
Yes @poli1025 Please have a try