本製品の仮想マシンが動作している場合は停止します。
本製品のコンソールに管理者権限(administrator)でログインし、以下のコマンドを実行します。
# dashadm power stop
qemu-imgコマンドを使って、「4.2.2.2 KVM環境のスナップショット作成」の手順3.で作成したqcow2イメージの内容をベースファイルに反映します。
注意
更新パッチの適用やアップグレードを中止して、元の環境に戻す場合には、本手順3.は実施しないでください。
手順4.に進んでください。
システム領域用のqcow2イメージDASH-1.1.0_kvm_tmp.qcow2と、ユーザーデータ領域用のqcow2イメージDASH-1.1.0_user_tmp.qcow2の内容をベースファイルに反映する例は以下のとおりです。
# cd /var/lib/libvirt/images # qemu-img commit DASH-1.1.0_kvm_tmp.qcow2 # qemu-img commit DASH-1.1.0_user_tmp.qcow2
「4.2.2.2 KVM環境のスナップショット作成」の手順3.で作成したqcow2イメージを削除します。
システム領域用のqcow2イメージDASH-1.1.0_kvm_tmp.qcow2とユーザーデータ領域用のqcow2イメージDASH-1.1.0_user_tmp.qcow2を削除する例は、以下のとおりです
# cd /var/lib/libvirt/image # rm DASH-1.1.0_kvm_tmp.qcow2 # rm DASH-1.1.0_user_tmp.qcow2
virsh editコマンドを利用し、ベースファイルを使用するように仮想マシンの設定を変更します。
システム領域用の仮想ディスクファイル
タグのfile属性をベースファイルに変更します。
ユーザーデータ領域用の仮想ディスクファイル
タグのtype属性をqcow2からrawに変更し、タグのfile属性をベースファイルに変更します。
実行例は以下のとおりです。
本製品の仮想アプライアンスのドメイン名とは、仮想マシンマネージャーで表示されている仮想マシンの名前です。
# virsh edit <本製品の仮想アプライアンスのドメイン名>
太字の箇所を変更します。
変更前
<devices> <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/DASH-1.1.0_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/DASH-1.1.0_user_tmp.qcow2'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </disk>
変更後
<devices> <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/DASH-1.1.0_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/DASH-1.1.0_user.img'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </disk>