diff --git a/ocaml/xapi/xapi.ml b/ocaml/xapi/xapi.ml index b702001ef2..b490b0c2f1 100644 --- a/ocaml/xapi/xapi.ml +++ b/ocaml/xapi/xapi.ml @@ -737,6 +737,14 @@ let check_network_reset () = | [] -> error "management PIF %s not found" device | phy_pif :: _ -> + (* Keep previsous management address type *) + let management_address_type = + Record_util.primary_address_type_of_string + (Xapi_inventory.lookup Xapi_inventory._management_address_type) + in + Xapi_host.management_disable ~__context ; + Xapi_pif.set_primary_address_type ~__context ~self:phy_pif + ~primary_address_type:management_address_type ; let pif = match vlan with | Some vlan ->