1.下载驱动程序
[[email protected] ~]# cd /usr/local/src [[email protected] src]# wget https://launchpad.net/kvm-gues ... ar.gz [[email protected] src]# tar zxf virtio-win-full-20120712.tar.gz [[email protected] src]# cd virtio-win-full-20120712
2.创建虚拟磁盘.
[[email protected] opt]# qemu-img create -f raw /opt/windows-2008-x86_64.raw 10G
3.启动安装程序,加载硬盘驱动
[[email protected] opt]# virt-install --virt-type kvm --name windows2008 --ram 1024 --cdrom /opt/windows-2008-x86_64.iso --disk path=/opt/windows-2008-x86_64.raw,device=disk,bus=virtio --network network=default --graphics vnc,listen=0.0.0.0 --noautoconsole --os-type=windows --disk path=/opt/virtio-win-drivers-20120712-1.vfd,device=floppy --os-type=windows --os-variant win2k8 --boot cdrom
(注:如果无法自动加载驱动程序,请手动选择软盘里面的驱动程序,加载硬盘驱动。)
4.重启虚拟机,加载网卡驱动
[[email protected] opt]# /usr/libexec/qemu-kvm -m 1024 -drive file=/opt/windows-2008-x86_64.raw -cdrom /opt/virtio-win-drivers-20120712-1.iso -net nic,model=virtio -net user -boot order=c -usbdevice tablet -nographic -vnc :0
原文地址:https://www.cnblogs.com/nulige/p/9092124.html
时间: 2024-10-16 03:38:42