qemu命令总结¶
spice端口
netstat -ntpl | grep qemu virsh domdisplay --type spice {Id or Name}
创建镜像
qemu-img create -f qcow2 ubuntu-14.04.qcow2 20G qemu-img info ubuntu-14.04.qcow2
镜像压缩
qemu-img convert -p -c -O qcow2 source.img destination.qcow2
创建快照
qemu-img create -f qcow2 -b base.qcow2 snapshot.qcow2
resize
qemu-img resize source.qcow2 +10G
声卡¶
查询支持的声卡
[localhost ~] $ sudo /usr/libexec/qemu-kvm --soundhw ? Valid sound card names (comma separated): ac97 Intel 82801AA AC97 Audio hda Intel HD Audio pcspk PC speaker -soundhw all will enable all of the above
2 增加声卡
[localhost ~] $ sudo /usr/libexec/qemu-kvm --soundhw all
Red Hat Enterprise Linux 6 Virtualization Host Configuration and Guest Installation Guide