Linux technical support - [email protected]


KVM commands

General

# virsh start MyVM

# virsh shutdown MyVM

# virsh list --all

# virsh dominfo MyVM

# virsh autostart MyVM

# virsh autostart -disable MyVM

# virt-clone --original templateName --name newName --file /home/agorbachev/KVM/newName.qcow2

Snapshot

# virsh snapshot-list MyVM

# virsh snapshot-create-as MyVM comment

# virsh snapshot-revert MyVM snapshotName

Create thin provisioned disk

# qemu-img create -f qcow2 -o preallocation=metadata /home/agorbachev/KVM/template.qcow2 100G

Convert raw to qcow2

# qemu-img convert -f raw -O qcow2 server1.img server1.qcow2

# chown qemu:qemu server1.qcow2

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>