kvm环境快速安装
# for CentOS
yum安装:
yum -y install epel-release net-tools vim unzip zip wget ftp tigervnc tigervnc-server qemu-kvm python-virtinst libvirt libvirt-python virt-manager libguestfs-tools bridge-utils acpidspice-protocol spice-server*usbredir* virt-manager virt-install virt-clone virt-image virt-viewer
格式转换:
qemu-img convert -p -f raw -O qcow2 源.raw 目标.qcow2
qemu-img convert -p -f qcow2 -O raw 源.qcow2 目标.raw
raw格式时可以缩减虚拟机磁盘空间:(windows环境需要将要减少的磁盘空间删除,使用DiskGenius)
qemu-img resize 源.raw -- +1G
qemu-img resize 源.raw -- -1G
压缩:
qemu-img convert -c -p -O qcow2 源 目标
usb扩展:
yum install libdb usbredir
挂载windows共享:
mount -t cifs -o username=everyone,password= //192.168.136.122/share /mnt/share/