Difference between revisions of "Snapshots"

From Luna Node
Jump to: navigation, search
(Creating a snapshot)
 
(9 intermediate revisions by one user not shown)
Line 1: Line 1:
Snapshots allow you to save the state of a virtual machine for backup or templating purposes. For VMs installed from templates, live snapshots can be performed where the VM does not have to be rebooted; on operating installs from ISO, only cold snapshots are supported (snapshot after VM is turned offline).
+
Snapshots allow you to save the state of a virtual machine for backup or templating purposes. If you snapshot while the VM is online, a live snapshot will be performed; live snapshots produce a consistent disk state without the need for downtime by taking advantage of qemu's live block commit functionality. Cold snapshots can also be performed by shutting off the VM before taking the snapshot; cold snapshots provide stronger guarantees on data consistency, in case you have databases or other software that don't synchronously commit data (with live snapshots, written data that is still in-memory in the OS buffer will not be captured).
  
Snapshots are billed hourly for storage space only, at $0.04 per GB per month (the first 20 GB of usage is currently free, but this is subject to change).
+
Snapshots are billed hourly for storage space only, at $0.03 per GB per month (the first 20 GB of usage is free).
  
 
== Creating a snapshot ==
 
== Creating a snapshot ==
  
Creating a snapshot in Luna Node Dynamic is easy. Simply go to the [https://dynamic.lunanode.com/panel/vms.php Virtual Machines] sidebar entry, select your VM, and enter a snapshot label in the snapshot box. You may want to run sync before snapshotting.
+
Creating a snapshot in Luna Node Dynamic is easy. Simply go to the [https://dynamic.lunanode.com/panel/vms Virtual Machines] sidebar entry, select your VM, and enter a snapshot label in the snapshot box. You may want to run sync before snapshotting.
  
If you are snapshotting a VM that was installed from an ISO image, you will need to shut down the VM before snapshotting. You will also need to have the VM adjusted so that it is set to boot to the first disk and not the CD-ROM (this is accomplished by selecting swap boot order).
+
If you are snapshotting a VM that was installed from an ISO image, the VM needs to be adjusted so that it is set to boot to the first disk and not the CD-ROM (this is accomplished by pressing the swap boot order button).
  
Note: templates come with software called cloud-init installed that sets up SSH configuration, user accounts, hostname, partitions, and other settings on the first boot. If you want a pure clone the VM, then you should remove cloud-init before taking the snapshot (apt-get/yum remove cloud-init).
+
Note: templates come with software called cloud-init installed that sets up SSH configuration, network interface settings, user accounts, hostname, partitions, and various other settings on the first boot. If you want a pure clone the VM, then you can remove cloud-init before taking the snapshot (apt-get/yum remove cloud-init); however, you will generally need to reconfigure the network settings on virtual machines booted from such a snapshot. See the next section for details on how to use a cloud-config startup script to change the password to something you want.
  
 
== Provisioning from the snapshot ==
 
== Provisioning from the snapshot ==
  
You can provision new instances from the snapshot, or re-image existing instances using the snapshot.
+
You can provision new instances from the snapshot, or re-image existing instances using the snapshot, as you would with a normal template image.
 +
 
 +
If your VM that you used for the snapshot does not have cloud-init installed, you will most likely need to reset network configuration; this can be done over VNC.
 +
 
 +
If you snapshotted a VM that was installed from a template, and did not remove cloud-init, then either select an SSH key or the "Set password via cloud-init" option when provisioning the new VM.
 +
 
 +
== Replicating images between regions ==
 +
 
 +
Images are stored separately on each region. However, you can replicate a snapshot to another region by selecting the image from the Images sidebar tab, and then scrolling down to the image replication tool. Keep in mind that you will be billed for the storage in both regions (although you do have 20 GB free storage per region).

Latest revision as of 05:34, 9 January 2016

Snapshots allow you to save the state of a virtual machine for backup or templating purposes. If you snapshot while the VM is online, a live snapshot will be performed; live snapshots produce a consistent disk state without the need for downtime by taking advantage of qemu's live block commit functionality. Cold snapshots can also be performed by shutting off the VM before taking the snapshot; cold snapshots provide stronger guarantees on data consistency, in case you have databases or other software that don't synchronously commit data (with live snapshots, written data that is still in-memory in the OS buffer will not be captured).

Snapshots are billed hourly for storage space only, at $0.03 per GB per month (the first 20 GB of usage is free).

Creating a snapshot

Creating a snapshot in Luna Node Dynamic is easy. Simply go to the Virtual Machines sidebar entry, select your VM, and enter a snapshot label in the snapshot box. You may want to run sync before snapshotting.

If you are snapshotting a VM that was installed from an ISO image, the VM needs to be adjusted so that it is set to boot to the first disk and not the CD-ROM (this is accomplished by pressing the swap boot order button).

Note: templates come with software called cloud-init installed that sets up SSH configuration, network interface settings, user accounts, hostname, partitions, and various other settings on the first boot. If you want a pure clone the VM, then you can remove cloud-init before taking the snapshot (apt-get/yum remove cloud-init); however, you will generally need to reconfigure the network settings on virtual machines booted from such a snapshot. See the next section for details on how to use a cloud-config startup script to change the password to something you want.

Provisioning from the snapshot

You can provision new instances from the snapshot, or re-image existing instances using the snapshot, as you would with a normal template image.

If your VM that you used for the snapshot does not have cloud-init installed, you will most likely need to reset network configuration; this can be done over VNC.

If you snapshotted a VM that was installed from a template, and did not remove cloud-init, then either select an SSH key or the "Set password via cloud-init" option when provisioning the new VM.

Replicating images between regions

Images are stored separately on each region. However, you can replicate a snapshot to another region by selecting the image from the Images sidebar tab, and then scrolling down to the image replication tool. Keep in mind that you will be billed for the storage in both regions (although you do have 20 GB free storage per region).