Stop the virtual machine of this product if it is running.
Log in to the console of this product using the administrator account (administrator) and execute the following command.
# csgadm power stop
Log in to the KVM host.
Use the "qemu-img" command to apply the qcow2 image created in step 3 of "D.1.2 Creating Snapshots in KVM Environments" to the base file.
Note
If you want to stop the process of applying an update patch or upgrading the system in order to return to the previous environment, do not perform step 3 of this procedure. Proceed to step 4.
The example below shows how to apply both the "CSG_v110_kvm_tmp.qcow2" image for the system area and the "CSG_v110_cache_tmp.qcow2" image for the cache area to the base file.
# cd /var/lib/libvirt/images # qemu-img commit CSG_v110_kvm_tmp.qcow2 # qemu-img commit CSG_v110_cache_tmp.qcow2
Delete the qcow2 image created in step 3 of "D.1.2 Creating Snapshots in KVM Environments".
The example below shows how to delete the "CSG_v110_kvm_tmp.qcow2" image for the system area and the "CSG_v110_cache_tmp.qcow2" image for the cache area.
# cd /var/lib/libvirt/images # rm CSG_v110_kvm_tmp.qcow2 # rm CSG_v110_cache_tmp.qcow2
Use the "virsh edit" command to change the settings of the virtual machine to use the base file.
In the virtual disk file for the system area, change the file attribute of the <source> tag to the base file.
In the virtual disk file for the cache area, change the type attribute of the <driver> tag from "qcow2" to "raw" and the file attribute of the <source> tag to the base file.
An example is provided below. Domain names are virtual machine names displayed in the virtual machine manager.
[Execution example]
# virsh edit domain_name
The following example illustrates how to change the parameters. The highlighted parts need to be changed.
[Before the change]
<devices> <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/CSG_v110_kvm_tmp.qcow2'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/CSG_v110_cache_tmp.qcow2'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </disk>
[After the change]
<devices> <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/CSG_v110_kvm.qcow2'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/CSG_v110_cache.img'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </disk>