You will need to move into the property after closing. You wouldn't be able to straight up buy an investment property with it. I'm not as familiar with VA loans, but if something changed in your life I don't think there would be any penalties if you did move out down the road...
It is a great option for a house hack! There are certain restrictions on the condition of the property, but a great option for starting out with investing! In most cases, you must be an owner-occupant purchaser to utilize the VA loan.
I bought my first house with a VA loan. Lived in it and redid the kitchen and other things and had a roommate that paid a good chunk of the mortgage and utilities. I moved away and now its a rental. I would suggest buying a duplex, triplex, or fourplex with your VA loan.