when connecting host, syncing all vm's dhcp info to kvmagent including
running, unknown, starting,rebooting, resuming, migrating, volumeMigrating vm
fix
@@ -92,7 +92,8 @@ public class FlatDhcpBackend extends AbstractService implements NetworkServiceDh
String sql = "select vm.uuid, vm.defaultL3NetworkUuid from VmInstanceVO vm where vm.hostUuid = :huuid and vm.state in (:states) and vm.type = :vtype";
TypedQuery<Tuple> q = dbf.getEntityManager().createQuery(sql, Tuple.class);
q.setParameter("huuid", context.getInventory().getUuid());
- q.setParameter("states", list(VmInstanceState.Running, VmInstanceState.Unknown));
+ q.setParameter("states", list(VmInstanceState.Running, VmInstanceState.Unknown, VmInstanceState.Starting,
+ VmInstanceState.Rebooting, VmInstanceState.Resuming, VmInstanceState.Migrating, VmInstanceState.VolumeMigrating));
q.setParameter("vtype", VmInstanceConstant.USER_VM_TYPE);
List<Tuple> ts = q.getResultList();
if (ts.isEmpty()) {
