You are right, there is a lot of diverse opinion on the subject. I dare say, even You have differing opinions on Morals than the Bible does. Regardless of your opinion that the Bible is what you get your Morals from.
I think the problem is when people read about "genocide" in the Bible, they automatically think its wrong and there is no reason for it.
Actually, I'm willing to assume you have no issue with the death penalty (if the situation called for it) which we can and have gotten wrong many times.
Where I am getting at is this; the Bible describes God as the Ultimate Judge, can read hearts etc. He obviously can see something "wrong" that we simply are unable to see, yet when judging the actions he takes, we NEVER take that into consideration.
It's really no different than a judge in a court of law and evidence finds a person guilty and liable to death. We won't necessarily cry foul on that because of the evidence....and we sometimes don't understand all the evidence, but generally, we trust that the system did its job.
For some reason, no one is willing to extend God the same leeway -- we automatically assume he's wrong for killing (A, B, C, or whatever) and almost never take into consideration what may have caused him to execute people sometimes, or decide why someone had to die.
Yet, hypocritically, we're prefectly fine with the justice system deciding the fate of a person, and we ourselves condemn people to death without ANY facts.