Can I transfer/change ownership on a running VM to another user?

There is no direct method to change ownership of a VM. Due to the way Atmosphere is architected, each user stands alone, siloed from other users. Openstack, the underlying cloud operating system for Jetstream, allows all users on an allocation to manage VMs but that doesn’t guarantee all team members would have access. Below we will drill down a bit and give more information/details on making a VM available to others.

Atmosphere

You cannot change ownership at all. The way Atmosphere is architected fairly well prevents this from working.

What you can do is have the owner of an instance create a custom image (unless it's an s1.* image, in which case there is absolutely no path to this end) and then share it with the selected members. I suggest to start reading with this page and read all child pages:

http://wiki.jetstream-cloud.org/Customizing+and+saving+a+VM

I would also suggest that once a new owner launches that image that they then create their own instance, verify everything works, and then create their own custom image so that they then become the owner of the image. According to Jetstream policy, all items (including images) that belong to a user that hasn't been on an allocation in 6 months may be deleted.

https://wiki.jetstream-cloud.org/Policies+and+Best+Practices

API

There's really no need to change ownership as the user doesn't really matter with the API. All members of the allocation can control the VM. That said, you'll want to make sure that the centos or ubuntu (depending on flavor) user has the appropriate keys in their .ssh/authorized_keys file and that the users that need to can log in before you remove someone from your allocation.

I would still encourage making a snapshot just in case:
http://wiki.jetstream-cloud.org/Creating+snapshots+and+new+Glance+images+from+the+command+line
http://wiki.jetstream-cloud.org/Creating+a+snapshot+of+an+instance+in+Horizon


As a best practice, if someone is leaving your research or education group, you’ll want to make sure that they no longer have access to your VMs (disable their accounts and/or remove their SSH keys from the default centos or ubuntu user. You’ll also want to remove their XSEDE username from your allocation if you’re the PI, co-PI, or allocation manager. There are instructions for that here:

https://portal.xsede.org/allocations/managing