Systems and methods for automated migration replication
Techniques are provided for automated migration replication. A method can include creating a volume group including an initial snapshot of a virtual machine (VM) residing in an initial environment and in an initial configuration (VM1). The method can include generating a terraform stack based on the initial snapshot, execution of which in an environment causes replication of VM1 in that environment. The method can include providing the terraform stack to a user, generating a subsequent snapshot of the VM in a subsequent configuration (VM2), generating a delta file characterizing the difference between the initial snapshot stored in the volume group and the subsequent snapshot, generating a delta terraform stack based on the delta file, wherein execution of the delta terraform stack causes previously replicated VM1 to update to replicate VM2, and providing the delta terraform stack to the user.
1 . A method comprising:
creating a volume group comprising an initial snapshot of a virtual machine (VM) residing in an initial environment, the VM being in an initial configuration (VM1), wherein the VM is designated for replication in a cloud services provider infrastructure (CSPI);
generating a terraform stack based on the initial snapshot, wherein execution of the terraform stack in an environment causes replication of VM1 in that environment;
providing the terraform stack to a user;
generating a subsequent snapshot of the VM in a subsequent configuration (VM2);
generating a delta file characterizing a difference between the initial snapshot stored in the volume group and the subsequent snapshot;
generating a delta terraform stack based on the delta file, wherein execution of the delta terraform stack causes previously replicated VM1 to update to replicate VM2; and
providing the delta terraform stack to the user,
wherein the method further comprises replicating at least a portion of the volume group, the replicating comprising:
identifying the volume group, and
replicating a boot volume from the volume group,
wherein the generating the terraform stack further includes:
determining compatibility differences between the VM1 and the CSPI; and
modifying the replicated boot volume such that replicated VM1 is compatible with the CSPI.
2 . The method of claim 1 , wherein the VM is not located in the CSPI.
3 . The method of claim 1 , wherein the initial environment is an on-premises environment.
4 . The method of claim 1 , wherein the initial environment VM is located in a cloud environment distinct from the CSPI.
5 . The method of claim 1 , further comprising executing the terraform stack in a user tenancy in the CSPI to replicate VM1.
6 . The method of claim 5 , further comprising executing the delta terraform stack in the user tenancy to replicate VM2.
7 . The method of claim 6 , wherein the subsequent snapshot is generated after replicating VM1.
8 . The method of claim 7 , further comprising:
generating additional subsequent snapshots; and
generating a corresponding delta file for each of the subsequent snapshots.
9 . The method of claim 1 , wherein the modifying the boot volume such that the replicated VM1 is compatible with the CSPI comprises:
determining a first attribute of the initial environment;
determining a second attribute of the CSPI;
determining a difference between the first attribute and the second attribute; and
modifying the boot volume to compensate for the difference between the first attribute and the second attribute.
10 . The method of claim 9 , wherein the first attribute characterizes hardware of the initial environment, and the second attribute characterizes hardware of a user tenancy in the CSPI.
11 . The method of claim 1 , wherein the terraform stack is modifiable by the user before executing the terraform stack.
12 . The method of claim 1 , further comprising provisioning a replication server from a migration control plane into a user tenancy in the CSPI, wherein the VM is subsequently replicated into the user tenancy.
13 . The method of claim 12 , wherein the initial environment includes a replication plugin.
14 . The method of claim 13 , wherein the creating the volume group further comprises:
generating the initial snapshot of the VM with the replication plugin; and
storing the initial snapshot of the VM in an object storage.
15 . The method of claim 14 , further comprising:
writing, by the replication server, a copy of the initial snapshot of the VM into a block storage.
16 . The method of claim 1 , wherein the delta file comprises a single file that characterizes a difference between the initial snapshot of the VM and the subsequent snapshot of the VM.
17 . The method of claim 1 , wherein the delta file comprises a plurality of files, wherein the plurality of files together characterize a difference between the initial snapshot of the VM and the subsequent snapshot of the VM.
18 . The method of claim 1 , wherein the creating the volume group further comprises:
creating a data volume associated with the boot volume; and
assigning an identifier to each of the boot volume and the data volume, wherein the identifier is included in the terraform stack.
19 . A system comprising:
a memory comprising a volume database; and
a processor configured to:
create a volume group comprising an initial snapshot of a virtual machine (VM) residing in an initial environment, the VM being in an initial configuration (VM1), wherein the VM is designated for replication in a cloud services provider infrastructure (CSPI);
generate a terraform stack based on the initial snapshot, wherein execution of the terraform stack in an environment causes replication of VM1 in that environment;
provide the terraform stack to a user;
generate a subsequent snapshot of the VM in a subsequent configuration (VM2);
generate a delta file characterizing a difference between the initial snapshot stored in the volume group and the subsequent snapshot;
generate a delta terraform stack based on the delta file, wherein execution of the delta terraform stack causes previously replicated VM1 to update to replicate VM2; and
provide the delta terraform stack to the user,
wherein the processor is further configured to replicate at least a portion of the volume group, by identifying the volume group, and replicating a boot volume from the volume group, and
in generating the terraform stack, the processor is configured to determine compatibility differences between the VM1 and the CSPI and modify the replicated boot volume such that replicated VM1 is compatible with the CSPI.
20 . A non-transitory computer-readable storage medium storing a plurality of instructions that, when executed by one or more processors, cause the one or more processors to:
create a volume group comprising an initial snapshot of a virtual machine (VM) residing in an initial environment, the VM being in an initial configuration (VM1), wherein the VM is designated for replication in a cloud services provider infrastructure (CSPI);
generate a terraform stack based on the initial snapshot, wherein execution of the terraform stack in an environment causes replication of VM1 in that environment;
provide the terraform stack to a user;
generate a subsequent snapshot of the VM in a subsequent configuration (VM2);
generate a delta file characterizing a difference between the initial snapshot stored in the volume group and the subsequent snapshot;
generate a delta terraform stack based on the delta file, wherein execution of the delta terraform stack causes previously replicated VM1 to update to replicate VM2; and
provide the delta terraform stack to the user,
wherein the plurality of instructions, when executed by the one or more processors, further cause the one or more processors to:
replicate at least a portion of the volume group, by identifying the volume group, and replicating a boot volume from the volume group, and
generate the terraform stack by determining compatibility differences between the VM1 and the CSPI and modifying the replicated boot volume such that replicated VM1 is compatible with the CSPI.