openstack windows 镜像制作
首先下载windows所需要的驱动,virtio-win-1.1.16.vfd virtio-win-0.1-59.iso 下载的官方地址是:
https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.164-2/
也可以到我的个人网盘中下载
1. 创建img文件
kvm-img create -f qcow2 win7.qcow2 30G
2。通过vnc启动系统的安装
root@controller-virtual-machine:~# sudo kvm -m 4096 -cdrom win10.iso -drive file=windows.qcow2,if=virtio,boot=on -fda virtio-win-0.1.164_amd64.vfd -boot d -nographic -vnc 192.168.30.122:1
3.安装工具
sudo apt-get install gvncviewer
4.在可视化界面中完成系统的配置,因为加载的时候没有硬盘,直接选中加载驱动程序,我安装的是win10,选中A——win10的驱动,继续安装
root@controller-virtual-machine:~# gvncviewer 192.168.30.122:1
Connected to server
Remote desktop size changed to 1024x768
Connection initialized
Remote desktop size changed to 720x400
Remote desktop size changed to 1024x768
Remote desktop size changed to 720x400
Remote desktop size changed to 1024x768
5.由于没有驱动需要重新安装wind的驱动,所以关闭,之后重新加载驱动
root@controller-virtual-machine:~# netstat -antp | grep 5901
tcp 0 0 192.168.30.122:5901 0.0.0.0:* LISTEN 20275/qemu-system-x
root@controller-virtual-machine:~# kill -9 2075
-bash: kill: (2075) - No such process
root@controller-virtual-machine:~# kill -9 20275
root@controller-virtual-machine:~# sudo kvm -m 1024 -cdrom virtio-win-0.1.164.iso -drive file=windows.qcow2,if=virtio,boot=on -net nic,model=virtio -boot d -nographic -net user -usb -usbdevice tablet -vnc 192.168.30.122:1
制作完成,有需要的可以直接在我的网盘下载,由于文件过大,制作的的文件是安装
两个插件
链接:https://pan.baidu.com/s/14_Jthu_uE8hyWCF5UBIFdw
提取码:7v5n
链接:https://pan.baidu.com/s/13NL_PFcmur5JnJdNWeFDtg
提取码:1667
制作成功的windows
链接:https://pan.baidu.com/s/1qx9yHHdC9L39JywzmxAHrg
提取码:sgkv