Once you have created a virtual network and configured a primary and secondary instance, you can then clone the secondary instance, allowing you to run migrations across large numbers of servers.
-
Logon to the server you would like to clone.
- Open a Command Prompt or Powershell as an administrator. (Right click on shortcut and click 'Run as Administrator')
- Type 'GCESysprep' without the single quote and hit enter. Failure to do this will result in the inability for nodes to communicate.
- This will then close your Remote Desktop Protocol session and shutdown the Virtual Machine.
- Open a Command Prompt or Powershell as an administrator. (Right click on shortcut and click 'Run as Administrator')
- Setting the auto-delete state of a persistent disk.
- Navigate to the Virtual Machine Instances page.
- Click on the Virtual Machine Instance name which was previously prepared using 'GCESysprep'
- Under 'Boot disk' check if 'When deleting instance' is set to 'Delete disk'. If so click on 'Edit' at the top of the page and change to 'Keep disk'. Save.
- Deleting an instance
- Navigate to the Virtual Machine Instances page.
- Click on the Virtual Machine Instance name.
- Click on 'Delete' at the top of the page.
- Go to Images and ‘Create Image’. Select your Disk as the source disk. Select Create.
- Go to Instance Templates and ‘Create Instance Template’. Select your desired machine type, select your image as the Boot disk and, in Networking, select your network
- Go to Instance Groups and ‘Create Instance Group’. Select your instance template and specify the number of Virtual Machines to create.