@@ -2397,9 +2397,10 @@ public boolean start() {
2397
2397
private void loadVmDetailsInMapForExternalDhcpIp () {
2398
2398
2399
2399
List <NetworkVO > networks = _networkDao .listByGuestType (Network .GuestType .Shared );
2400
+ networks .addAll (_networkDao .listByGuestType (Network .GuestType .L2 ));
2400
2401
2401
2402
for (NetworkVO network : networks ) {
2402
- if ( _networkModel .isSharedNetworkWithoutServices (network .getId ())) {
2403
+ if ( GuestType . L2 . equals ( network . getGuestType ()) || _networkModel .isSharedNetworkWithoutServices (network .getId ())) {
2403
2404
List <NicVO > nics = _nicDao .listByNetworkId (network .getId ());
2404
2405
2405
2406
for (NicVO nic : nics ) {
@@ -3279,7 +3280,7 @@ public UserVm rebootVirtualMachine(RebootVMCmd cmd) throws InsufficientCapacityE
3279
3280
final List <NicVO > nics = _nicDao .listByVmId (vmId );
3280
3281
for (NicVO nic : nics ) {
3281
3282
Network network = _networkModel .getNetwork (nic .getNetworkId ());
3282
- if (_networkModel .isSharedNetworkWithoutServices (network .getId ())) {
3283
+ if (GuestType . L2 . equals ( network . getGuestType ()) || _networkModel .isSharedNetworkWithoutServices (network .getId ())) {
3283
3284
s_logger .debug ("Adding vm " +vmId +" nic id " + nic .getId () +" into vmIdCountMap as part of vm " +
3284
3285
"reboot for vm ip fetch " );
3285
3286
vmIdCountMap .put (nic .getId (), new VmAndCountDetails (nic .getInstanceId (), VmIpFetchTrialMax .value ()));
@@ -5202,7 +5203,7 @@ public void doInTransactionWithoutResult(TransactionStatus status) {
5202
5203
final List <NicVO > nics = _nicDao .listByVmId (vm .getId ());
5203
5204
for (NicVO nic : nics ) {
5204
5205
Network network = _networkModel .getNetwork (nic .getNetworkId ());
5205
- if (_networkModel .isSharedNetworkWithoutServices (network .getId ())) {
5206
+ if (GuestType . L2 . equals ( network . getGuestType ()) || _networkModel .isSharedNetworkWithoutServices (network .getId ())) {
5206
5207
vmIdCountMap .put (nic .getId (), new VmAndCountDetails (nic .getInstanceId (), VmIpFetchTrialMax .value ()));
5207
5208
}
5208
5209
}
0 commit comments