To transfer data between virtual machines we recommend first transfering the data to a Shared Storage Volume (SSV).
In the potential solutions listed below, make sure that the VM you plan to transfer data to is located in the same environment as the VM you are transferring data from. This is important because data transfer is restricted to virtual machines within the same environment.
It's important to note that a volume can only be attached to a single virtual machine at a time due to the lack of support for parallel access to a single disk by most operating systems and file systems.
Possible solutions:
Volume attachment
VM data can be stored and transferred by utilizing one or more Shared Storage volumes (SSVs).
-
Create a volume either through Hyperstack, or by using the Infrahub API's "Create volume" endpoint.
-
Attach and mount the volume to your virtual machine, achieved either through Hyperstack or by using the "Attach volumes to virtual machine" Infrahub API endpoint.
-
Once the volume is attached to your virtual machine, you can proceed to move or copy the data from the ephemeral disk to the SSV, saving your data.
-
After the volume has successfully stored the data from the ephemeral disk, you can detach it from the virtual machine.
-
Finally, you can now attach this volume to any new VM within the same environment for data transfer.
Bootable volumes
In cases where you wish to maintain the same operating system on the VM you are transferring data to, we recommend creating a bootable volume which is an SSV with an operating system image installed.
Data transfer tools
Create the new virtual machine that you wish to transfer files to in the same environment as your existing VM, and transfer your data through Secure Shell - Secure Copy Protocol (SSH-SCP), Rsync, Network File System (NFS) or any other similar tool.
References:
- Infrahub Docs | Storage Types
- Infrahub Docs | Environments
- Infrahub Docs | Volumes
- Infrahub Docs | Bootable volumes