使用如下的XML配置
<disk type='block' device='disk'> <driver name='qemu' type='raw'/> <source dev='/dev/sda'/> <target dev='hdb' bus='ide'/> </disk>
其實原理是投機取巧:
1、type使用block
2、增加source節點
3、target其實用了ide,這個不需要太看重,可以是scsi或者virtio,可以多次嘗試
總結:
硬盤直通其實可以解決速度慢的問題,可以將硬盤的讀寫損耗降到1%。
參考:
https://chubuntu.com/questions/15902/add-physical-disk-to-kvm-virtual-machine.html