Fix agent crash when vm-interface has SG
Add test case for SG in vm-interface