root@node2:/opt# qemu-img create -f qcow2 ubuntu-server.qcow2 20G
Formatting 'ubuntu-server.qcow2', fmt=qcow2 size=21474836480 encryption=off cluster_size=65536 lazy_refcounts=off
root@node2:/opt# kvm -m 2048 -cdrom ubuntu-14.04.3-server-amd64.iso -drive file=ubuntu-server.qcow2,if=virtio -net nic,model=virtio -net tap,script=no -boot-nographic -vnc :0
或者:
qemu-system-x86_64 -hda /media/images/ubuntu.img -cdrom /media/images/ubuntu-14.04.3-server-amd64.iso -boot d -m 1024 -no-acpi -vga std -k en-us -nographic -vnc :1
本过程类似装ubuntu系统,按照镜像一步一步来即可。其中network可先不配置。
qemu-kvm -m 4096 -drive file=ubuntu-server.qcow2,if=virtio -net nic,model=virtio -net tap -nographic -vnc :0
qemu-img ubuntu-server.qcow2
kvm -m 2048 -cdrom iso/cn_windows_7_ultimate_x64_dvd_x15-66043.iso -drive file=virtio-win-0.1-74.iso,media=cdrom -drive file=win7.qcow2,if=virtio -net nic,model=e1000 -net tap,ifname=tap2,script=no -boot d -nographic -vnc :2