Hi,
I recently started my project to build a home server using Xen. The idea is that one vm runs openmediavault (debian) for NAS and another vm runs Win7 (with gnu passthrough) for media player.
I managed to passthrough two WD 3TB disk (full of media files, one GPT partition, no boot) to the NAS vm. But I couldn’t find a working solution.
I searched the net and find the following using libvirt. Libvirt works quite well in my system. And I hardly have any problem to create vm while xm toolstack gave me a lot of trouble.
=== hard disks to be passed as raw ===
/dev/sda is for WD3TB01 (ext4)
/dev/sdb is for WD3TB02 (ext4)
Here is the part of the NAS-OMV.xml to define a HVM windows to passthrough two hard disks. I updated the vm using
EDIT=nano virsh edit NAS-OMV
And I entered the following
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/sda'/>
<target dev=‘hdb' bus='virtio'/>
</disk>
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/sdb'/>
<target dev=‘hdc' bus='virtio'/>
</disk>
Error after “virsh start NAS-OMV”
error: Failed to start domain NAS-OMV
error: POST operation failed: xend_post: error from xen daemon: (xend.err 'Block device type "qemu" is invalid.’)
virsh dumpxml NAS-OMV (Note: libvirt would examine the grammar and change accordingly. See the text in red after virsh edit.)
<domain type='xen'>
<name>NAS-OMV</name>
<uuid>d20932ff-51cb-ecc5-989d-4f76a8d665d9</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>2</vcpu>
<os>
<type>hvm</type>
<loader>/usr/lib/xen-4.1/boot/hvmloader</loader>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='variable' adjustment='0' basis='utc'>
<timer name='hpet' present='no'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/lib/xen-4.1/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<driver name='file'/>
<source file='/etc/xen/images/NAS-OMV.img'/>
<target dev='hda' bus='ide'/>
</disk>
<disk type='file' device='cdrom'>
<target dev='hde' bus='ide'/>
<readonly/>
</disk>
<disk type='block' device='disk'>
<driver name='qemu'/>
<source dev='/dev/sda'/>
<target dev='hdb' bus='ide'/>
</disk>
<disk type='block' device='disk'>
<driver name='qemu'/>
<source dev='/dev/sdb'/>
<target dev='hdc' bus='ide'/>
</disk>
<interface type='bridge'>
<mac address='00:16:3e:d5:5b:9a'/>
<source bridge='xenbr1'/>
<script path='/etc/xen/scripts/vif-bridge'/>
<model type='e1000'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
</devices>
</domain>
Could anyone point me to the right direction? I have to use whole physical disk passthrough to NAS vm because I don’t want to change my disk content (it is total > 4TB content).
Thanks in advance!!
Jason