Once you have a Visa/Residence permit (work) in one country you can freely move between all the EU countries. (I live in Italy with residence permit, so I know)
Usually you need a permanent residence permit (Greencard equivalent), and then it has to be a fairly recent one as the laws were only harmonized in the last 5 years. And even then, the permit for most of the EU isn't valid for the UK or Ireland.
In Germany the first permit that you get (an H1B equivalent) is tied to one job, and hence, tied to the place where you have that job. After 5 years of working full-time (and a long string of other checklist items), you're eligible to begin the application process for permanent residence (which I now have).
My fault, I don't know why I confused the permit to stay (expires every 2 years) with permanent residence. Well, in Italy you just need a home and revenue to obtain a permit to stay (work related). The permanent residence or permit to stay doesn't lock you to the first job it was issued for, though.
However you can still (with the permit to stay) move between UE countries, just get back to Italy and declare revenue (as entrepreneur).