El 29/2/16 a les 12:23, Gustau Pérez ha escrit:
> El 26/02/16 a les 14:08, Roger Pau Monné ha escrit:
>> It shouldn't be too hard, as I said the code is already there. The
>> only issue I foresee is that you will have to find somewhere to store
>> the information about the disk you have locally-attached, so you can
>> remove it when the guest is destroyed.
>    Hi Roger,
>    I applied the hotplug patches to xen-[kernel|tools] and the machine
> is stable. However, when I try to create a HVM domU domain with a simple
> block script it fails (.

As we spoke previously, HVM domains don't support hotplug scripts. Or
are you trying to get them to work? (ie: you have performed other
changes in order to enable this?)

>    I have some questions:
>   * The arguments of the block script are path and action, am I right?

Yes, but keep in mind that 'path' is the xenstore backend path of the
device, something like:


>   * Do the block scripts for Linux and NetBSD receive the same arguments
>     as the FreeBSD script?

No, sadly each OS has their own way of doing this. For example Linux
passes a bunch of extra information using ENV variables, which I would
like to avoid since all this information that Linux passes around in the
environment can be fetched from xenstore without issues.

>   * I see the device has a  type (phy, file, iscsi) in the definition of
>     the domain, but I'm not sure how to check its type in the block
>     script (I can check if the file is a block device or a regular file,
>     but what about iscsi?, check if the target param is set?)

This is confusing, and refers to the backend that's used to handle the
disk. In your case backend in always 'phy', which means blkback. The
'phy' backend is the only one that supports hotplug scripts.

In the past, some prefixes (like iscsi) where shortcuts for block
scripts, so the line:

iscsi:<iscsi params>

Was equivalent to:

script=block-iscsi,target=<iscsi params>

This is not recommended anymore, so just forget about the prefixes.

>   * Also. I have a domain defined with two disks. In the block script I
>     try to execute xenstore-ls and I'd expect to see two disks there,
>     but  there's only the first one. I assume this is because the block
>     script is called for each disk in the domain definition

Yes, the block script is called for each disk, the first argument (the
xenstore backend path) is going to be different for each invocation.

>    Finally, I ended having a disk defined in the xenstore
> (/var/db/xenstore) which I can't remove. I removed xen-tools and removed
> /var/db/xen{store} but it keeps complaining. I'd have expected that the
> store was under /var/db/ but perhaps I'm missing something.

Weird, you should be able to remove the disk entries in xenstore by
using xenstore-rm <xenstore-path>. Rebooting the host will also
completely clear the xenstore database. Can you paste the error message
that you are seeing?


freebsd-xen@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"

Reply via email to