Axxe brings up the most important point, Range. Another factor if you don't Hand load is cost. Out to 50 yards a .22lr works just fine on both gray and reds.
For the .17HMR a 20gr game point should do well at 125..150 yards, a .22WMR will also take care of business w/ the newer 30gr. 1/3 more mass weight = more energy down range. Now w/ a .22lr and even a .17HMR shot placement is very critical. Canines vitals are lower in their body cavity then most would expect. I'm not saying that shot placement is not critical w/ any caliber, but if you are off be 2" you will have a wounded animal that will die but it can take a long time. Where you live is also a factor. I have a great .223 varmint rifle I can't use in the Southern part of my State. Rimfire or shotgun only. A shotgun w/ #4 lead is pretty potent medicine for fox or coyotes out to 40 yards. 204 is a great caliber will really reach out, .22 Hornet is another VG fox round. The cost factor is huge between rimfires and centerfires. The .17HMR and .22WMR will cost about 11.99 to 15.99 for 50 rounds. .22 Hornet about 19.00+ per 50. .223 and .22-250.. 19.00+ per 20. Hornady does make 50 round boxes of .223 for about 36.00.
Freedom is not free. The best of us always leave too soon.