If you’re upgrading MOSS to SharePoint Server, you have to enter the required license key. Your SharePoint 2010 license key must match your SharePoint 2007 key.
For ex: if your SharePoint 2007 farm is running a trial key, you will need to enter a trial key for SharePoint 2010.
If your licenses don’t match, you’ll get an error like in below example:
After you enter a license key that satisfies the installer, it starts installing the SharePoint 2010 bits.
Feel free to Rate and provide feedback if you find post useful
Hope this help