windows kvm ide改virtio

首先先下载virtio驱动img文件:

virtio-win.iso

修改虚拟机文件,增加cdrom:

<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/home/soft/virtio-win.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<alias name='ide0-1-0'/>
<address type='drive' controller='0' bus='1' target='0' unit='0'/>
</disk>

记得修改启动循序:

<os>
<type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
<boot dev='hd'/>
<boot dev='cdrom'/>
</os>

一定要将hd调到前面,如果你的虚拟机是默认从cdrom启动会进不了系统。

 

如果是把磁盘从IDE改成virtio注意需要删掉:<address type='drive' controller='0' bus='0' target='0' unit='1'/>的内容:

<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native'/>
<source dev='/dev/mapper/centos-home_imgstorge'/>
<target dev='hdb' bus='virtio'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>

 

进入windows系统里面先查看是不是有CD盘加载了,如果有加载证明成功加载了驱动,接下来打开设备管理器重新更新驱动。

 

如果是windows 2008以上 磁盘从IDE改成virtio需要重新在操作系统里面把硬盘联机:

一下博文有操作步骤:

https://blog.csdn.net/chh_hpf/article/details/102933903

 

posted @ 2021-04-14 23:47  likecs  阅读(643)  评论(0编辑  收藏  举报