General Motors Co.'s Opel unit has agreed to extend by two years until the end of 2018 a guarantee that workers at three German plants won't face layoffs.