vm & vnet commands updated

I've synced it with latest dev branch
Thanks for short code snippet, I've replaced this line to follow approach you advised!