ONOS-6502 fix

Change-Id: I3b344d0b7fbea033e636a34a03868149f977bf5a
diff --git a/apps/vtn/vtnmgr/src/main/java/org/onosproject/vtn/manager/impl/VtnManager.java b/apps/vtn/vtnmgr/src/main/java/org/onosproject/vtn/manager/impl/VtnManager.java
index cb44b5d..3015c42 100644
--- a/apps/vtn/vtnmgr/src/main/java/org/onosproject/vtn/manager/impl/VtnManager.java
+++ b/apps/vtn/vtnmgr/src/main/java/org/onosproject/vtn/manager/impl/VtnManager.java
@@ -942,11 +942,14 @@
         HostId hostId = HostId.hostId(vPort.macAddress());
         BasicHostConfig basicHostConfig = networkConfigService.addConfig(hostId,
                                                                          BasicHostConfig.class);
-        Set<IpAddress> ips = hostService.getHost(hostId).ipAddresses();
+        Set<IpAddress> oldIps = hostService.getHost(hostId).ipAddresses();
+        // Copy to a new set as oldIps is unmodifiable set.
+        Set<IpAddress> newIps = new HashSet<>();
+        newIps.addAll(oldIps);
         for (FixedIp fixedIp : vPort.fixedIps()) {
-            ips.remove(fixedIp.ip());
+            newIps.remove(fixedIp.ip());
         }
-        basicHostConfig.setIps(ips).apply();
+        basicHostConfig.setIps(newIps).apply();
     }
 
     private void programInterfacesSet(Set<RouterInterface> interfacesSet,