Method for controlling a hybrid vehicle electrical system comprising electrical auxiliary units, a combustion engine driven electric machine operable as a generator for supplying power to said electrical auxiliary units via a power electronics unit and via a high voltage traction voltage DC-link, a high voltage battery pack coupled to the high voltage traction voltage DC-link by a relay that can be opened to disconnect the high voltage battery pack from the high voltage traction voltage DC-link under fault conditions on the high voltage battery pack or on pre-charge circuit, the method comprising the steps of: - driving the vehicle in a first driving mode where the high voltage battery pack is connected to said high voltage traction voltage DC-link and the high voltage battery pack is supplying the electrical auxiliary units with power, - upon receiving a first indication that said high voltage battery pack has to be disconnected, then - shutting down the power electronics unit in order to cease power delivery from the electric machine to the high voltage traction voltage DC-link or to the electric machine from the high voltage traction voltage DC-link, and - disconnecting the high voltage battery pack from the high voltage traction voltage DC-link by opening the relay, - characterized by - providing said electric machine as a permanent magnet electrical motor, - performing said steps of shutting down the power electronics unit, and disconnecting the high voltage battery pack, upon receiving also a second indication that the vehicle is in a predetermined vehicle condition, said predetermined vehicle condition being that the combustion engine is running, and - activating, after said step of disconnecting the high voltage battery pack, the power electronics unit and controlling output voltage of the power electronics unit to a predetermined level which is preferably the same as the voltage supplied by the high voltage battery pack but it may also vary some from this level depending on ambient terperature, as long as the electric machine is rotating and supplying power through the power electronics unit to the high voltage traction voltage DC-link, in order to resume operation of said electrical auxiliary units, wherein a power electronics control unit which monitors the electrical auxiliary units in the vehicle so that they are temporarily not used and therefore can be disconnected; and if a driver during the temporarily disconnection of the electrical auxiliary units indicates that a functionality from one of said electrical auxiliary units is needed, the power electronics control unit can postpone the use of the electrical auxiliary unit until the power electronics unit has been activated again after the disconnection of the high voltage battery pack. - driving the vehicle in a first driving mode where the high voltage battery pack is connected to said high voltage traction voltage DC-link and the high voltage battery pack is supplying the electrical auxiliary units with power, - upon receiving a first indication that said high voltage battery pack has to be disconnected, then - shutting down the power electronics unit in order to cease power delivery from the electric machine to the high voltage traction voltage DC-link or to the electric machine from the high voltage traction voltage DC-link, and - disconnecting the high voltage battery pack from the high voltage traction voltage DC-link by opening the relay, - characterized by - providing said electric machine as a permanent magnet electrical motor, - performing said steps of shutting down the power electronics unit, and disconnecting the high voltage battery pack, upon receiving also a second indication that the vehicle is in a predetermined vehicle condition, said predetermined vehicle condition being that the combustion engine is running, and - activating, after said step of disconnecting the high voltage battery pack, the power electronics unit and controlling output voltage of the power electronics unit to a predetermined level which is preferably the same as the voltage supplied by the high voltage battery pack but it may also vary some from this level depending on ambient terperature, as long as the electric machine is rotating and supplying power through the power electronics unit to the high voltage traction voltage DC-link, in order to resume operation of said electrical auxiliary units, wherein a power electronics control unit which monitors the electrical auxiliary units in the vehicle so that they are temporarily not used and therefore can be disconnected; and if a driver during the temporarily disconnection of the electrical auxiliary units indicates that a functionality from one of said electrical auxiliary units is needed, the power electronics control unit can postpone the use of the electrical auxiliary unit until the power electronics unit has been activated again after the disconnection of the high voltage battery pack.