oVirt在创建虚拟机时,可以选择虚拟机磁盘类型,如果采用IDE模式,一般的windows可以在安装时识别到虚拟磁盘,但在这种情况下,IO性能比较低。在创建虚拟机时,如果使用virtio的方式可以提高虚拟机IO性能,virtio所驱动的网卡,也将原来的百兆扩展到千兆。
1、安装virtio驱动
# wget https://fedorapeople.org/groups/virt/virtio-win/virtio-win.repo -O /etc/yum.repos.d/virtio-win.repo
# yum install virtio-win -y
# rpm -ql virtio-win | grep iso
/usr/share/virtio-win/virtio-win-0.1.160.iso
/usr/share/virtio-win/virtio-win.iso
# pwd
/usr/share/virtio-win
# ll
total 321036
drwxr-xr-x 4 root root 31 Nov 21 16:22 drivers
drwxr-xr-x 2 root root 52 Nov 21 16:22 guest-agent
-rw-r--r-- 1 root root 2949120 Aug 16 04:57 virtio-win-0.1.160_amd64.vfd
-rw-r--r-- 1 root root 322842624 Aug 16 04:59 virtio-win-0.1.160.iso
-rw-r--r-- 1 root root 2949120 Aug 16 04:57 virtio-win-0.1.160_x86.vfd
lrwxrwxrwx 1 root root 28 Nov 21 16:22 virtio-win_amd64.vfd -> virtio-win-0.1.160_amd64.vfd
lrwxrwxrwx 1 root root 22 Nov 21 16:22 virtio-win.iso -> virtio-win-0.1.160.iso
lrwxrwxrwx 1 root root 26 Nov 21 16:22 virtio-win_x86.vfd -> virtio-win-0.1.160_x86.vfd
2、手工下载驱动
目前最新版本为virtio-win-0.1.160
3.上传驱动文件
找到配置的ISO存储域,并将virtio-win-0.1.160_amd64.vfd、virtio-win-0.1.160.iso、virtio-win-0.1.160_x86.vfd文件拷贝到对应目录
# cp /tmp/virtio-win-* /iso/42764683-5ef1-45ea-9b5a-fd89765b3c4e/images/11111111-1111-1111-1111-111111111111/
4.在windows系统安装时加载VirtIO驱动
-
点击 Compute → Virtual Machines.
-
点击 Run → Run Once.
-
打开 Boot Options 菜单
-
选择Attach Floppy下拉框并选择virtio-win.vfd.
-
选择Attach CD下拉框并选择window的iso文件
-
将 CD-ROM设置为第一启动引导项
-
配置其他需要的 Run Once 选项
-
点击 OK.
5.在windows系统安装虚拟设备驱动
-
点击 Compute → Virtual Machines.
-
点击 Run → Run Once.
-
打开 Boot Options 菜单
-
选择Attach CD下拉框并选择virtio-win-0.1.160.iso文件
-
将 CD-ROM设置为第二启动引导项
-
配置其他需要的 Run Once 选项
-
点击 OK.
-
虚拟机启动后,在电脑 →属性 →设备管理器中选择未识别的硬件,然后更新驱动程序,选择在CD-ROM下进行扫描安装即可