>>In addition, when migrating instances, we may want to release the IPs, but keep the mac >>addresses, meaning the virtual interfaces should remain in tact in the db. You have a valid point here. Instead of deleting the virtual interfaces from the release_fixed_ip method you can delete them in the deallocate_for_instance as you did it before. But in this case virtual interfaces shouldn't be referred in the release_fixed_ip method otherwise it gives exception since this release_fixed_ip method is invoked by the nova-dhcpbridge script by the dnsmasq process way after deallocated_for_instance is called. I see following exception :- 2011-06-16 13:33:11,581 DEBUG nova.network.manager [ZM-0QM-G3YLRIKNGSBR6 None None] Releasing IP 10.0.1.3 from (pid=13453) release_fixed_ip /home/tpatil/nova/nova/network/manager.py:518 2011-06-16 13:33:11,598 ERROR nova [-] Exception during message handling (nova): TRACE: Traceback (most recent call last): (nova): TRACE: File "/home/tpatil/nova/nova/rpc.py", line 232, in _process_data (nova): TRACE: rval = node_func(context=ctxt, **node_args) (nova): TRACE: File "/home/tpatil/nova/nova/network/manager.py", line 524, in release_fixed_ip (nova): TRACE: mac_address = fixed_ip['virtual_interface']['address'] (nova): TRACE: TypeError: 'NoneType' object is unsubscriptable (nova): TRACE: Secondly, you will need to set virtual_interface_id to None for the fixed ip address either in the deallocate_fixed_ip method or somewhere else otherwise it gives exception in the linux_net.py->_host_dhcp method whenever the dhcp host file is updated. I see following exception: 2011-06-16 14:01:56,343 DEBUG nova.utils [-] Attempting to grab semaphore "dnsmasq_start" for method "update_dhcp"... from (pid=14549) inner /home/tpatil/nova/nova/utils.py:570 2011-06-16 14:01:56,358 ERROR nova [-] Exception during message handling (nova): TRACE: Traceback (most recent call last): (nova): TRACE: File "/home/tpatil/nova/nova/rpc.py", line 232, in _process_data (nova): TRACE: rval = node_func(context=ctxt, **node_args) (nova): TRACE: File "/home/tpatil/nova/nova/network/manager.py", line 185, in allocate_for_instance (nova): TRACE: ips = super(FloatingIP, self).allocate_for_instance(context, **kwargs) (nova): TRACE: File "/home/tpatil/nova/nova/network/manager.py", line 362, in allocate_for_instance (nova): TRACE: self._allocate_fixed_ips(admin_context, instance_id, networks) (nova): TRACE: File "/home/tpatil/nova/nova/network/manager.py", line 142, in _allocate_fixed_ips (nova): TRACE: self.allocate_fixed_ip(context, instance_id, network) (nova): TRACE: File "/home/tpatil/nova/nova/network/manager.py", line 806, in allocate_fixed_ip (nova): TRACE: self.driver.update_dhcp(context, network['id']) (nova): TRACE: File "/home/tpatil/nova/nova/utils.py", line 583, in inner (nova): TRACE: retval = f(*args, **kwargs) (nova): TRACE: File "/home/tpatil/nova/nova/network/linux_net.py", line 580, in update_dhcp (nova): TRACE: f.write(get_dhcp_hosts(context, network_id)) (nova): TRACE: File "/home/tpatil/nova/nova/network/linux_net.py", line 561, in get_dhcp_hosts (nova): TRACE: hosts.append(_host_dhcp(fixed_ip_ref)) (nova): TRACE: File "/home/tpatil/nova/nova/network/linux_net.py", line 670, in _host_dhcp (nova): TRACE: return '%s,%s.%s,%s' % (fixed_ip_ref['virtual_interface']['address'], (nova): TRACE: TypeError: 'NoneType' object is unsubscriptable (nova): TRACE: