All of lore.kernel.org
 help / color / mirror / Atom feed
* non-dom0 disk backend still not working after recent patches
@ 2013-04-30 15:40 Eric Shelton
  2013-04-30 16:38 ` Ian Campbell
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Shelton @ 2013-04-30 15:40 UTC (permalink / raw)
  To: xen-devel

Although some patches were submitted recently to allow a disk backend
domain to be
specified, it appears there is still some code that presumes dom0 is
the backend.  Has
this actually been tested for creating an HVM?  I am hoping someone a
bit more familiar
with the process of creating an HVM can lend a hand.

As an example, I have a FreeBSD-based domU (9.1 HVM w/ PV drivers,
domid=1, name=freebsd)
on which I created a small 40MB test image at /pool1/media/betest.img,
to see if I could
get another domU to access the image.

After applying the patch I sent out a little earlier today and the
following xl.cfg line
(the below config for hda is my best guess - should this be specified
differently?):

disk = [ 'backend=freebsd, format=raw, vdev=hda,
target=/pool1/media/betest.img, access=rw',
         '/mnt/bootimgs/install-amd64-minimal-20130110.iso,,hdc:cdrom,r' ]

I attempt to start up an HVM, but qemu terminates early.  The HVM
starts up fine if the
hda info is removed.  In the below excerpt from "xl -vvv create ...",
it looks like qemu
is not informed that hda is on domain 1, not dom0.  I assume the
backend domid should be
specified on the command line (unless qemu pulls disk info from
xenstore, in which case
why bother passing any disk parameters via the command line?)

. . .
libxl: debug: libxl_dm.c:1211:libxl__spawn_local_dm: Spawning
device-model /usr/lib/xen/bin/qemu-system-i386 with arguments:
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:
/usr/lib/xen/bin/qemu-system-i386
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   -xen-domid
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   4
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   -chardev
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:
socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-4,server,nowait
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   -mon
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:
chardev=libxl-cmd,mode=control
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   -name
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   gentoo
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   -vnc
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   192.168.1.10:1,to=99
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   -global
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   isa-fdc.driveA=
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   -vga
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   cirrus
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   -global
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   vga.vram_size_mb=8
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   -boot
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   order=d
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   -smp
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   2,maxcpus=2
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   -device
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:
e1000,id=nic0,netdev=net0,mac=00:16:3e:4c:ff:31
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   -netdev
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:
type=tap,id=net0,ifname=vif4.0-emu,script=no,downscript=no
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   -M
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   xenfv
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   -m
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   2040
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   -drive
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:
file=/pool1/media/betest.img,if=ide,index=0,media=disk,format=raw,cache=writeback
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:   -drive
libxl: debug: libxl_dm.c:1213:libxl__spawn_local_dm:
file=/mnt/bootimgs/install-amd64-minimal-20130110.iso,if=ide,index=2,media=cdrom,format=raw,cache=writeback,id=ide-5632
libxl: debug: libxl_event.c:559:libxl__ev_xswatch_register: watch
w=0xac5240 wpath=/local/domain/0/device-model/4/state token=3/0:
register slotnum=3
libxl: debug: libxl_create.c:1259:do_domain_create: ao 0xac3ba0:
inprogress: poller=0xac4ca0, flags=i
libxl: debug: libxl_event.c:503:watchfd_callback: watch w=0xac5240
wpath=/local/domain/0/device-model/4/state token=3/0: event
epath=/local/domain/0/device-model/4/state
libxl: debug: libxl_event.c:596:libxl__ev_xswatch_deregister: watch
w=0xac5240 wpath=/local/domain/0/device-model/4/state token=3/0:
deregister slotnum=3
libxl: error: libxl_dm.c:1280:device_model_spawn_outcome: domain 4
device model: spawn failed (rc=-3)
libxl: error: libxl_create.c:1091:domcreate_devmodel_started: device
model did not start: -3
libxl: error: libxl_dm.c:1311:libxl__destroy_device_model: Device
Model already exited
libxl: debug: libxl_event.c:1569:libxl__ao_complete: ao 0xac3ba0:
complete, rc=-3
libxl: debug: libxl_event.c:1541:libxl__ao__destroy: ao 0xac3ba0: destroy

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: non-dom0 disk backend still not working after recent patches
@ 2013-05-01 15:24 Eric Shelton
  0 siblings, 0 replies; 8+ messages in thread
From: Eric Shelton @ 2013-05-01 15:24 UTC (permalink / raw)
  To: Ian Campbell, xen-devel@lists.xen.org

On Wed, May 1, 2013 at 4:13 AM, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Tue, 2013-04-30 at 18:04 +0100, Eric Shelton wrote:
>> Will/should xl block-attach make the domU backend disk available to dom0?
>
> I think so, it might depend a bit on your dom0 kernel. Although whether
> you would then be allowed to use it as a guest disk (which I guess is
> why you are asking) I'm not sure.
>
>> Would you expect this to work directly for a PV guest,
>
> Yes.
>
>> or am I going
>> to have to turn to pygrub (assuming it similarly facilitates storage
>> access) or some other mechanism?
>
> Actually, pygrub is one thing I would expect not to work (precisely
> because it needs access to the domain disks in dom0). I'd expect either
> explicitly providing the kernel or using pvgrub would work.
>
> Ian.
>

[my apologies if this ends up as a duplicate message]

Thanks again.  I got a chance to look into pvgrub a bit more, and I
saw it essentially has the same issue as non-stubdom hvm.

Problems remain in the stubdom code path.  Now it dies in
xenstore_get_backend_path() in qemu-xen-traditional because bpath
corresponds to the correct domU path, but the expected path is under
the dom0 path.  This is because domid_backend is initialized to 0, and
is never changed.  There is a comment where it is initialized that
essentially identifies this as a todo.

My initial guess is that the backend domain number should be indicated
somewhere in the command line for qemu-dm (likely the -disk
parameters), and then stored in domid-backend.  Does anyone have any
comments on the appropriate implementation?

I note that this will require a change to qemu-xen-traditional.  On
the other hand, I expect the change to be small, and it would seem
reasonable to roll into 4.3.  However, as qemu-cen-traditional appears
to be quasi-depricated, it would be helpful to know if such a change
would be accepted.  A similar change, if not already implemented,
would also be needed in qemu-xen for linux-stubdoms.

- Eric

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-05-01 19:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-30 15:40 non-dom0 disk backend still not working after recent patches Eric Shelton
2013-04-30 16:38 ` Ian Campbell
2013-04-30 17:04   ` Eric Shelton
2013-05-01  8:13     ` Ian Campbell
2013-05-01 13:27       ` Eric Shelton
2013-05-01 15:27         ` Ian Campbell
2013-05-01 19:48           ` Eric Shelton
  -- strict thread matches above, loose matches on Subject: below --
2013-05-01 15:24 Eric Shelton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.