suggestion:  if you pass in <code>vm</code> then you can get <code>vm_name = vm.name</code> since it's part of the public interface.  Unless you ever think the vm_name might be different from the vm.