Volkswagen says it is considering closing its production plants in Germany to cope with rising costs.