A non-transitory computer readable storage medium, including instructions stored thereon for reducing virtual machine downtime during virtual machine migration, which, when read and executed by one or more processors of a first physical host channel adapter physically connected to a network fabric, cause the first physical host channel adapter to perform steps comprising:
- sending, by the first physical host channel adapter and to a subnet manager connected to the network fabric, a request to preregister a virtual host channel adapter configuration with a first virtual function of the first physical host channel adapter,
- wherein, when the request is received by the subnet manager, the virtual host channel adapter configuration is actively registered with a second virtual function of a second physical host channel adapter, and
- wherein the active registration of the virtual host channel adapter configuration with the second virtual function of the second physical host channel adapter comprises a virtual link between the virtual host channel adapter configuration and a virtual switch of the second physical host channel adapter;
- receiving, by the first physical host channel adapter and from the subnet manager, the virtual host channel adapter configuration for preregistration with the first virtual function;
- receiving, by the first physical host channel adapter and from the subnet manager, a request to establish a new virtual link between the virtual host channel adapter configuration and a virtual switch of the first physical host channel adapter, wherein the request to establish the new virtual link is received after the subnet manager determines that the virtual link between the virtual host channel adapter configuration and the virtual switch of the second physical host channel adapter is disconnected;
- establishing, by the first physical host channel adapter, the new virtual link;
- and
- receiving, by the first physical host channel adapter and via a migration from the second physical host channel adapter, a virtual machine instance associated with the virtual host channel adapter configuration.