dealing with the scenario for hypervisor that hostname may or may not co...

...ntain domain name
Don't do the search twice.