I've got a little bit lost, trying to to install VirtualBox Guest Additions  on my freshly installed and upgraded CentOS 7 virtual machine. I have tried all the tricks I found and still Virtual Box installer wont able to find my kernel headers. The secret is erasy. Don't forget to reboot your system after setup and upgrade. Otherwise you will have new headers and configruation with the old kernel in flight.

So the right order is:

  1. Install your target system using ISO, thumbdrive or netwrok loader
  2. Update your packgage  manager and system to the actual state
  3. Reboot to pickup new kernel
  4. Install virtuallBox Guast Addtions and the rest of your software.