A longtime, disgruntled city employee opened fire at a municipal building in Virginia Beach on Friday, killing 11 people before police fatally shot him, authorities said.