[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Xen How to pass the whole physical hard disk (raw disk) to vm



On 13.04.2014 05:03, Guangning YU wrote:
> Thanks Miguel! I used very similar syntax as yours.
>
> This was what I used:
>
> /<disk type='block' device='disk'>/
>
> /<driver name='qemu' type='raw'/>/
>
> /<source dev='/dev/sda'/>/
>
> /<target dev=‘hdb' bus='virtio'/>/
>
> /</disk>/
>
>
> However , I couldn’t start the vm with */virsh start/* with error I
> described in the first thread. From my understanding, /*virsh edit*/
> command will verify the syntax user enters and adjust accordingly. The
> red text in my first thread was the final syntax that was gone through
> to Xen. The syntax “type=‘raw’ was gone for some reason.
>
> The xml guide that I referred to is URL
> (http://libvirt.org/formatdomain.html#elementsHostDevSubsys).
>
> THE guide isn’t clear enough. I tried device ‘lun’ as well, similar
> error. (I can reproduce the change and provide log if required)
>
> The whole project is not as easy as I thought. I would rather pay a
> reasonable amount of money to get this work on a reliable binary code.

Hello,

from the libvirt Domain.xml manual:
|
"driver|

    The optional driver element allows specifying further details
    related to the hypervisor driver used to provide the disk. Since 0.1.8

      * If the hypervisor supports multiple backend drivers, then the
        |name| attribute selects the primary backend driver name, while
        the optional |type| attribute provides the sub-type. For
        example, xen supports a name of "tap", "tap2", "phy", or "file",
        with a type of "aio", while qemu only supports a name of "qemu",
        but multiple types including "raw", "bochs", "qcow2", and "qed".

"

This explains that the driver section (which is anyway optional) does
neither support name="qemu" on Xen nor type="raw". On Xen, you would
have to use name="phy" for using host devices and e.g. name="tap2"
type="aio" for disk image files with AIO access. But I think libvirt
will figure this out automatically, so just leaving out the driver is
maybe the best idea:

<disk type='block' device='disk'>
<source dev='/dev/sda' />
<target dev='hdb' bus='virtio' />
</disk>

or

<disk type='block' device='disk'>
<driver name='phy' />
<source dev='/dev/sda' />
<target dev='hdb' bus='virtio' />
</disk>

Best regards,
Felix


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.