Meza/Cloning VirtualBox VMs
This manual explains how to create clones of your VMs. A clone is a copy of the entire VM. A snapshot is just a saved point of a VM in the configuration over time. Sometimes it is useful to have a clone of a VM. For example, you may wish to run more than one server at a time.
Case 1: Cloning after OS install, before dev-networking step
editThis assumes you setup your VM with the Meza/Install on Virtual Box, but you haven't done the sudo meza setup dev-networking
step yet.
Run the following steps to create the clone VM:
- Shut down your VM with
shutdown -h now
- In the VirtualBox Manager window, select your VM and click on the "Machine" menu
- Click "Clone"
- Name your clone
- Select "Reinitialize the MAC address of all network cards" and click "Next". This is necessary if you want to run the clones at the same time with successful networking capability.
- Select "Full clone" and click "Next"
- Select "Everything" and click "Clone"
Now you must do a little work to fix the networking settings for the clone:
- Start your VM
- Log in
- Open your VM network settings, find the MAC Address for Adapter 1
vi /etc/sysconfig/network-scripts/ifcfg-eth0
- Change HWADDR to match your clone's Adapter 1 MAC Address
rm -f /etc/udev/rules.d/70-persistent-net.rules
At this point you either need to reboot shutdown -r now
or shut down shutdown -h now
for the settings to update. Then your clone should have functioning networking. In this case, you can now follow the steps to set up SSH.
Case 2: Cloning after OS install, after dev-networking step
editThis assumes you setup your VM with the Meza/Install on Virtual Box, and you've already completed the sudo meza setup dev-networking
step.
Run the following steps to create the clone VM:
- Shut down your VM with
shutdown -h now
- In the VirtualBox Manager window, select your VM and click on the "Machine" menu
- Click "Clone"
- Name your clone
- Select "Reinitialize the MAC address of all network cards" and click "Next". This is necessary if you want to run the clones at the same time with successful networking capability.
- Select "Full clone" and click "Next"
- Select "Everything" and click "Clone"
Now you must do a little work to fix the networking settings for the clone. Note that for CentOS 7, some steps are not necessary.
- Start your VM
- Log in
- Optional: If you want to access this VM from a different IP address, change that in
ifcfg-enp0s8
as well.
At this point you either need to reboot shutdown -r now
or shut down shutdown -h now
for the settings to update. Then your clone should have functioning networking.