Skip to content

Commit 43ebb1c

Browse files
author
Sheng Yang
committed
CLOUDSTACK-1670: Fix the order of user vm's multiple nics
They should follow the order of networkIds parameter of deployVMCmd(). And eth0 would be always on default network.
1 parent ee664a1 commit 43ebb1c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎server/src/com/cloud/vm/UserVmManagerImpl.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import java.util.Date;
2121
import java.util.HashMap;
2222
import java.util.HashSet;
23+
import java.util.LinkedHashMap;
2324
import java.util.List;
2425
import java.util.Map;
2526
import java.util.Set;
@@ -2563,7 +2564,7 @@ protected UserVm createVirtualMachine(DataCenter zone, ServiceOffering serviceOf
25632564

25642565
List<Pair<NetworkVO, NicProfile>> networks = new ArrayList<Pair<NetworkVO, NicProfile>>();
25652566

2566-
Map<String, NicProfile> networkNicMap = new HashMap<String, NicProfile>();
2567+
LinkedHashMap<String, NicProfile> networkNicMap = new LinkedHashMap<String, NicProfile>();
25672568

25682569
short defaultNetworkNumber = 0;
25692570
boolean securityGroupEnabled = false;

0 commit comments

Comments
 (0)