Kvm: Difference between revisions
Jump to navigation
Jump to search
Line 18: | Line 18: | ||
==convert file format== | ==convert file format== | ||
qemu-img convert -O qcow2 | qemu-img convert -cp -O qcow2 kvm_1.img kvm_1.qcow2 | ||
==snapshot== | ==snapshot== | ||
# Create snapshot | # Create snapshot |
Revision as of 19:41, 4 September 2012
prepare environment
Is environment prepared for viritutalization.
egrep '(vmx|svm)' /proc/cpuinfo
vmx - (intel) svm - (amd)
Create disk image.
qemu-img create -f qcow2 f8_1_x86_64.img 10G
Install software.
yum install -y qemu kvm SDL bridge-utils tunctl
install virtual machine.
virt-install --connect qemu:///system --name Fedora_16 --ram 2048 --vcpus=1 -f /ssd/libvirt/Fedora_16.qcow2 -s 30 -c /install/system/linux/fedora/16/Fedora-16-x86_64-netinst.iso --vnc --noautoconsole --hvm
connect to virtual machine.
virt-viewer Fedora_16
convert file format
qemu-img convert -cp -O qcow2 kvm_1.img kvm_1.qcow2
snapshot
# Create snapshot virsh snapshot-create SL_63 # List snapshots virsh snapshot-list SL_63 # Delete snapshot virsh snapshot-delete SL_63 1346734871 # Revert to snapshot snapshot-revert