Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Users

attach an iso file to a PV guest

 

 

Xen users RSS feed   Index | Next | Previous | View Threaded


maarten at ba

Jul 31, 2013, 7:20 AM

Post #1 of 11 (84 views)
Permalink
attach an iso file to a PV guest

i'm using the xl tools and i want to attach an iso file to a PV.

but no iso seems to work(not even hybrids), while if i make a zero'd .iso file
with dd, that iso file works...

what kind of detection happens that i cannot get this to mount? not even raw,
nor a hybrid like it was a usb stick...?

what am i missing here?

the error is "libxl: error: libxl.c:1866:device_disk_add: failed to get blktap
devpath for 0x2235f40"
--
BA NV
IT & Security

_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xen.org/xen-users


Ian.Campbell at citrix

Jul 31, 2013, 7:36 AM

Post #2 of 11 (85 views)
Permalink
Re: attach an iso file to a PV guest [In reply to]

On Wed, 2013-07-31 at 16:20 +0200, Maarten Vanraes wrote:
> i'm using the xl tools and i want to attach an iso file to a PV.

Which version of Xen and what does your guest config file contain?

Please can you provide the result of attempting "xl -vvv create $cfg" with your $cfg

Thanks,
Ian.



_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xen.org/xen-users


maarten at ba

Jul 31, 2013, 8:17 AM

Post #3 of 11 (84 views)
Permalink
Re: attach an iso file to a PV guest [In reply to]

Op woensdag 31 juli 2013 15:36:39 schreef Ian Campbell:
> On Wed, 2013-07-31 at 16:20 +0200, Maarten Vanraes wrote:
> > i'm using the xl tools and i want to attach an iso file to a PV.
>
> Which version of Xen and what does your guest config file contain?
>
> Please can you provide the result of attempting "xl -vvv create $cfg" with
> your $cfg

thanks to your suggestion to use -vvv i can now see more on what's going on...

this is xen 4.2.2 using the centos repository with kernel:
3.4.46-8.el6.centos.alt.x86_64


what didn't work:
[ ]# xl -vvv block-attach templ-sl6
format=raw,vdev=hdb,access=ro,backendtype=tap,devtype=cdrom,target=/path/to/SL-64.iso

output:
-----------
libxl: debug: libxl.c:3211:libxl_device_disk_add: ao 0x1a09a40: create:
how=(nil) callback=(nil) poller=0x1a09aa0
libxl: debug: libxl_device.c:245:libxl__device_disk_set_backend: Disk vdev=hdb
spec.backend=tap
DEBUG libxl__blktap_devpath 37 aio:/etc/xen/isos/ScientificLinux/SL-64-
x86_64-2013-03-18-Install-DVD.iso
libxl: error: libxl.c:1866:device_disk_add: failed to get blktap devpath for
0x1a09bf0

libxl: error: libxl.c:1703:device_addrm_aocomplete: unable to add device
libxl: debug: libxl_event.c:1568:libxl__ao_complete: ao 0x1a09a40: complete,
rc=-3
libxl: debug: libxl.c:3211:libxl_device_disk_add: ao 0x1a09a40: inprogress:
poller=0x1a09aa0, flags=ic
libxl: debug: libxl_event.c:1540:libxl__ao__destroy: ao 0x1a09a40: destroy
libxl_device_disk_add failed.
xc: debug: hypercall buffer: total allocations:8 total releases:8
xc: debug: hypercall buffer: current allocations:0 maximum allocations:2
xc: debug: hypercall buffer: cache current size:1
xc: debug: hypercall buffer: cache hits:6 misses:1 toobig:1



what did work:

[ ]# dd if=/dev/zero of=/path/to/zero.iso bs=4k count=20k
[ ]# xl -vvv block-attach templ-sl6
format=raw,vdev=hdb,access=ro,backendtype=tap,devtype=cdrom,target=/path/to/zero.iso

output:
-------------
libxl: debug: libxl.c:3211:libxl_device_disk_add: ao 0x1040a40: create:
how=(nil) callback=(nil) poller=0x1040aa0
libxl: debug: libxl_device.c:245:libxl__device_disk_set_backend: Disk vdev=hdc
spec.backend=tap
DEBUG libxl__blktap_devpath 37 aio:/tmp/file.iso
DEBUG libxl__blktap_devpath 40 /dev/xen/blktap-2/tapdev1
libxl: debug: libxl_event.c:558:libxl__ev_xswatch_register: watch w=0x1040c18
wpath=/local/domain/0/backend/vbd/43/5632/state token=3/0: register slotnum=3
libxl: debug: libxl.c:3211:libxl_device_disk_add: ao 0x1040a40: inprogress:
poller=0x1040aa0, flags=i
libxl: debug: libxl_event.c:503:watchfd_callback: watch w=0x1040c18
wpath=/local/domain/0/backend/vbd/43/5632/state token=3/0: event
epath=/local/domain/0/backend/vbd/43/5632/state
libxl: debug: libxl_event.c:646:devstate_watch_callback: backend
/local/domain/0/backend/vbd/43/5632/state wanted state 2 still waiting state 1
libxl: debug: libxl_event.c:503:watchfd_callback: watch w=0x1040c18
wpath=/local/domain/0/backend/vbd/43/5632/state token=3/0: event
epath=/local/domain/0/backend/vbd/43/5632/state
libxl: debug: libxl_event.c:642:devstate_watch_callback: backend
/local/domain/0/backend/vbd/43/5632/state wanted state 2 ok
libxl: debug: libxl_event.c:595:libxl__ev_xswatch_deregister: watch
w=0x1040c18 wpath=/local/domain/0/backend/vbd/43/5632/state token=3/0:
deregister slotnum=3
libxl: debug: libxl_event.c:607:libxl__ev_xswatch_deregister: watch
w=0x1040c18: deregister unregistered
libxl: debug: libxl_device.c:933:device_hotplug: calling hotplug script:
/etc/xen/scripts/block add
libxl: debug: libxl_event.c:1568:libxl__ao_complete: ao 0x1040a40: complete,
rc=0
libxl: debug: libxl_event.c:1540:libxl__ao__destroy: ao 0x1040a40: destroy
xc: debug: hypercall buffer: total allocations:10 total releases:10
xc: debug: hypercall buffer: current allocations:0 maximum allocations:2
xc: debug: hypercall buffer: cache current size:2
xc: debug: hypercall buffer: cache hits:7 misses:2 toobig:1


what also worked:
----------------------------
xl -vvv block-attach templ-sl6
format=raw,vdev=hdb,access=ro,backendtype=phy,devtype=cdrom,target=/dev/loop1


--
BA NV
IT & Security

_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xen.org/xen-users


Ian.Campbell at citrix

Jul 31, 2013, 8:41 AM

Post #4 of 11 (81 views)
Permalink
Re: attach an iso file to a PV guest [In reply to]

On Wed, 2013-07-31 at 17:17 +0200, Maarten Vanraes wrote:
> Op woensdag 31 juli 2013 15:36:39 schreef Ian Campbell:
> > On Wed, 2013-07-31 at 16:20 +0200, Maarten Vanraes wrote:
> > > i'm using the xl tools and i want to attach an iso file to a PV.
> >
> > Which version of Xen and what does your guest config file contain?
> >
> > Please can you provide the result of attempting "xl -vvv create $cfg" with
> > your $cfg
>
> thanks to your suggestion to use -vvv i can now see more on what's going on...
>
> this is xen 4.2.2 using the centos repository with kernel:
> 3.4.46-8.el6.centos.alt.x86_64
>
>
> what didn't work:
> [ ]# xl -vvv block-attach templ-sl6
> format=raw,vdev=hdb,access=ro,backendtype=tap,devtype=cdrom,target=/path/to/SL-64.iso
>
> output:
> -----------
> libxl: debug: libxl.c:3211:libxl_device_disk_add: ao 0x1a09a40: create:
> how=(nil) callback=(nil) poller=0x1a09aa0
> libxl: debug: libxl_device.c:245:libxl__device_disk_set_backend: Disk vdev=hdb
> spec.backend=tap
> DEBUG libxl__blktap_devpath 37 aio:/etc/xen/isos/ScientificLinux/SL-64-
> x86_64-2013-03-18-Install-DVD.iso
> libxl: error: libxl.c:1866:device_disk_add: failed to get blktap devpath for
> 0x1a09bf0

Weird. There were some oddities with cdrom and/or blktap in 4.2, which
may be improved in 4.3.

Can you try without the backendtype=tap bit (just say nothing). I hope
this will cause libxl to automatically pick something which actually
works.

Unless you know you have some specific requirement for blktap this is
good advice in general.

Ian.


_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xen.org/xen-users


maarten at ba

Jul 31, 2013, 8:51 AM

Post #5 of 11 (81 views)
Permalink
Re: attach an iso file to a PV guest [In reply to]

Op woensdag 31 juli 2013 16:41:47 schreef Ian Campbell:
> On Wed, 2013-07-31 at 17:17 +0200, Maarten Vanraes wrote:
> > Op woensdag 31 juli 2013 15:36:39 schreef Ian Campbell:
> > > On Wed, 2013-07-31 at 16:20 +0200, Maarten Vanraes wrote:
> > > > i'm using the xl tools and i want to attach an iso file to a PV.
> > >
> > > Which version of Xen and what does your guest config file contain?
> > >
> > > Please can you provide the result of attempting "xl -vvv create $cfg"
> > > with
> > > your $cfg
> >
> > thanks to your suggestion to use -vvv i can now see more on what's going
> > on...
> >
> > this is xen 4.2.2 using the centos repository with kernel:
> > 3.4.46-8.el6.centos.alt.x86_64
> >
> >
> > what didn't work:
> > [ ]# xl -vvv block-attach templ-sl6
> > format=raw,vdev=hdb,access=ro,backendtype=tap,devtype=cdrom,target=/path/t
> > o/SL-64.iso
> >
> > output:
> > -----------
> > libxl: debug: libxl.c:3211:libxl_device_disk_add: ao 0x1a09a40: create:
> > how=(nil) callback=(nil) poller=0x1a09aa0
> > libxl: debug: libxl_device.c:245:libxl__device_disk_set_backend: Disk
> > vdev=hdb spec.backend=tap
> > DEBUG libxl__blktap_devpath 37 aio:/etc/xen/isos/ScientificLinux/SL-64-
> > x86_64-2013-03-18-Install-DVD.iso
> > libxl: error: libxl.c:1866:device_disk_add: failed to get blktap devpath
> > for 0x1a09bf0
>
> Weird. There were some oddities with cdrom and/or blktap in 4.2, which
> may be improved in 4.3.
>
> Can you try without the backendtype=tap bit (just say nothing). I hope
> this will cause libxl to automatically pick something which actually
> works.
>
> Unless you know you have some specific requirement for blktap this is
> good advice in general.

Well, it's because not specifying it, that i tried specifying it...

when i didn't specify it, there were 2 extra lines:

the first was:
"libxl: debug: libxl_device.c:245:libxl__device_disk_set_backend: Disk
vdev=hdb spec.backend=unknown"

i don't remember the second one, but the 3rd one was the one with backend=tap


but, this is really some oddity, i never thought that the contents of a file
was inspected before actually adding it to the guest...

even hybrid iso files had this issue...

i was trying to use pvgrub's cdrom boot specification to install a machine...

i'm now gonna use loop mode... which is the only thing that works
--
BA NV
IT & Security

_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xen.org/xen-users


Ian.Campbell at citrix

Jul 31, 2013, 8:56 AM

Post #6 of 11 (81 views)
Permalink
Re: attach an iso file to a PV guest [In reply to]

On Wed, 2013-07-31 at 17:51 +0200, Maarten Vanraes wrote:
> Op woensdag 31 juli 2013 16:41:47 schreef Ian Campbell:
> > On Wed, 2013-07-31 at 17:17 +0200, Maarten Vanraes wrote:
> > > Op woensdag 31 juli 2013 15:36:39 schreef Ian Campbell:
> > > > On Wed, 2013-07-31 at 16:20 +0200, Maarten Vanraes wrote:
> > > > > i'm using the xl tools and i want to attach an iso file to a PV.
> > > >
> > > > Which version of Xen and what does your guest config file contain?
> > > >
> > > > Please can you provide the result of attempting "xl -vvv create $cfg"
> > > > with
> > > > your $cfg
> > >
> > > thanks to your suggestion to use -vvv i can now see more on what's going
> > > on...
> > >
> > > this is xen 4.2.2 using the centos repository with kernel:
> > > 3.4.46-8.el6.centos.alt.x86_64
> > >
> > >
> > > what didn't work:
> > > [ ]# xl -vvv block-attach templ-sl6
> > > format=raw,vdev=hdb,access=ro,backendtype=tap,devtype=cdrom,target=/path/t
> > > o/SL-64.iso
> > >
> > > output:
> > > -----------
> > > libxl: debug: libxl.c:3211:libxl_device_disk_add: ao 0x1a09a40: create:
> > > how=(nil) callback=(nil) poller=0x1a09aa0
> > > libxl: debug: libxl_device.c:245:libxl__device_disk_set_backend: Disk
> > > vdev=hdb spec.backend=tap
> > > DEBUG libxl__blktap_devpath 37 aio:/etc/xen/isos/ScientificLinux/SL-64-
> > > x86_64-2013-03-18-Install-DVD.iso
> > > libxl: error: libxl.c:1866:device_disk_add: failed to get blktap devpath
> > > for 0x1a09bf0
> >
> > Weird. There were some oddities with cdrom and/or blktap in 4.2, which
> > may be improved in 4.3.
> >
> > Can you try without the backendtype=tap bit (just say nothing). I hope
> > this will cause libxl to automatically pick something which actually
> > works.
> >
> > Unless you know you have some specific requirement for blktap this is
> > good advice in general.
>
> Well, it's because not specifying it, that i tried specifying it...
>
> when i didn't specify it, there were 2 extra lines:
>
> the first was:
> "libxl: debug: libxl_device.c:245:libxl__device_disk_set_backend: Disk
> vdev=hdb spec.backend=unknown"

backend=unknown at this stage is ok, I think. At some point there should
have been logging (with -vvv) about which bakcned to choose.

> but, this is really some oddity, i never thought that the contents of a file
> was inspected before actually adding it to the guest...

It shouldn't be (I'm pretty sure it isn't in fact), I think there is
probably some other underlying issue.

Ian.



_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xen.org/xen-users


maarten at ba

Aug 1, 2013, 2:22 AM

Post #7 of 11 (75 views)
Permalink
Re: attach an iso file to a PV guest [In reply to]

Op woensdag 31 juli 2013 16:56:31 schreef Ian Campbell:
> On Wed, 2013-07-31 at 17:51 +0200, Maarten Vanraes wrote:
> > Op woensdag 31 juli 2013 16:41:47 schreef Ian Campbell:
> > > On Wed, 2013-07-31 at 17:17 +0200, Maarten Vanraes wrote:
> > > > Op woensdag 31 juli 2013 15:36:39 schreef Ian Campbell:
> > > > > On Wed, 2013-07-31 at 16:20 +0200, Maarten Vanraes wrote:
> > > > > > i'm using the xl tools and i want to attach an iso file to a PV.
> > > > >
> > > > > Which version of Xen and what does your guest config file contain?
> > > > >
> > > > > Please can you provide the result of attempting "xl -vvv create
> > > > > $cfg"
> > > > > with
> > > > > your $cfg
> > > >
> > > > thanks to your suggestion to use -vvv i can now see more on what's
> > > > going
> > > > on...
> > > >
> > > > this is xen 4.2.2 using the centos repository with kernel:
> > > > 3.4.46-8.el6.centos.alt.x86_64
> > > >
> > > >
> > > > what didn't work:
> > > > [ ]# xl -vvv block-attach templ-sl6
> > > > format=raw,vdev=hdb,access=ro,backendtype=tap,devtype=cdrom,target=/pa
> > > > th/t
> > > > o/SL-64.iso
> > > >
> > > > output:
> > > > -----------
> > > > libxl: debug: libxl.c:3211:libxl_device_disk_add: ao 0x1a09a40:
> > > > create:
> > > > how=(nil) callback=(nil) poller=0x1a09aa0
> > > > libxl: debug: libxl_device.c:245:libxl__device_disk_set_backend: Disk
> > > > vdev=hdb spec.backend=tap
> > > > DEBUG libxl__blktap_devpath 37
> > > > aio:/etc/xen/isos/ScientificLinux/SL-64-
> > > > x86_64-2013-03-18-Install-DVD.iso
> > > > libxl: error: libxl.c:1866:device_disk_add: failed to get blktap
> > > > devpath
> > > > for 0x1a09bf0
> > >
> > > Weird. There were some oddities with cdrom and/or blktap in 4.2, which
> > > may be improved in 4.3.
> > >
> > > Can you try without the backendtype=tap bit (just say nothing). I hope
> > > this will cause libxl to automatically pick something which actually
> > > works.
> > >
> > > Unless you know you have some specific requirement for blktap this is
> > > good advice in general.
> >
> > Well, it's because not specifying it, that i tried specifying it...
> >
> > when i didn't specify it, there were 2 extra lines:
> >
> > the first was:
> > "libxl: debug: libxl_device.c:245:libxl__device_disk_set_backend: Disk
> > vdev=hdb spec.backend=unknown"
>
> backend=unknown at this stage is ok, I think. At some point there should
> have been logging (with -vvv) about which bakcned to choose.
>
> > but, this is really some oddity, i never thought that the contents of a
> > file was inspected before actually adding it to the guest...
>
> It shouldn't be (I'm pretty sure it isn't in fact), I think there is
> probably some other underlying issue.

could be


in any case, i'm attempting to go further with phy and manually using
losetup... (i know it's not the best thing)

however, i'm getting pvgrub not working

the documentation of pvgrub tells me i should use (cd) and in the grub shell,
i can see (cd) as available option with tab completion, but it tells me disk
not found.

so, i tried doing like it was a normal disk, but i found no menu.lst file.

i also tried
extra="kernel=(hd0)/images/xen/vmlinuz initrd=(hd0)/images/xen/initrd.img"

which didn't work...

but manually in the grub shell entering

kernel (hd0)/images/xen/vmlinuz
initrd (hd0)/images/xen/initrd.img
root (hd0)
boot

that works.

i found in documentation that pvgrub has el torito, so i don't know what is
going on...


so i also tried mounting the iso, copying the vmlinux and initrd.img and
specifying it as kernel/initrd in the xl conf... but that didn't seem to work
either...


any thoughts on how to proceed?

_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xen.org/xen-users


Ian.Campbell at citrix

Aug 1, 2013, 7:51 AM

Post #8 of 11 (73 views)
Permalink
Re: attach an iso file to a PV guest [In reply to]

On Thu, 2013-08-01 at 11:22 +0200, Maarten Vanraes wrote:
> Op woensdag 31 juli 2013 16:56:31 schreef Ian Campbell:
> > On Wed, 2013-07-31 at 17:51 +0200, Maarten Vanraes wrote:
> > > Op woensdag 31 juli 2013 16:41:47 schreef Ian Campbell:
> > > > On Wed, 2013-07-31 at 17:17 +0200, Maarten Vanraes wrote:
> > > > > Op woensdag 31 juli 2013 15:36:39 schreef Ian Campbell:
> > > > > > On Wed, 2013-07-31 at 16:20 +0200, Maarten Vanraes wrote:
> > > > > > > i'm using the xl tools and i want to attach an iso file to a PV.
> > > > > >
> > > > > > Which version of Xen and what does your guest config file contain?
> > > > > >
> > > > > > Please can you provide the result of attempting "xl -vvv create
> > > > > > $cfg"
> > > > > > with
> > > > > > your $cfg
> > > > >
> > > > > thanks to your suggestion to use -vvv i can now see more on what's
> > > > > going
> > > > > on...
> > > > >
> > > > > this is xen 4.2.2 using the centos repository with kernel:
> > > > > 3.4.46-8.el6.centos.alt.x86_64
> > > > >
> > > > >
> > > > > what didn't work:
> > > > > [ ]# xl -vvv block-attach templ-sl6
> > > > > format=raw,vdev=hdb,access=ro,backendtype=tap,devtype=cdrom,target=/pa
> > > > > th/t
> > > > > o/SL-64.iso
> > > > >
> > > > > output:
> > > > > -----------
> > > > > libxl: debug: libxl.c:3211:libxl_device_disk_add: ao 0x1a09a40:
> > > > > create:
> > > > > how=(nil) callback=(nil) poller=0x1a09aa0
> > > > > libxl: debug: libxl_device.c:245:libxl__device_disk_set_backend: Disk
> > > > > vdev=hdb spec.backend=tap
> > > > > DEBUG libxl__blktap_devpath 37
> > > > > aio:/etc/xen/isos/ScientificLinux/SL-64-
> > > > > x86_64-2013-03-18-Install-DVD.iso
> > > > > libxl: error: libxl.c:1866:device_disk_add: failed to get blktap
> > > > > devpath
> > > > > for 0x1a09bf0
> > > >
> > > > Weird. There were some oddities with cdrom and/or blktap in 4.2, which
> > > > may be improved in 4.3.
> > > >
> > > > Can you try without the backendtype=tap bit (just say nothing). I hope
> > > > this will cause libxl to automatically pick something which actually
> > > > works.
> > > >
> > > > Unless you know you have some specific requirement for blktap this is
> > > > good advice in general.
> > >
> > > Well, it's because not specifying it, that i tried specifying it...
> > >
> > > when i didn't specify it, there were 2 extra lines:
> > >
> > > the first was:
> > > "libxl: debug: libxl_device.c:245:libxl__device_disk_set_backend: Disk
> > > vdev=hdb spec.backend=unknown"
> >
> > backend=unknown at this stage is ok, I think. At some point there should
> > have been logging (with -vvv) about which bakcned to choose.
> >
> > > but, this is really some oddity, i never thought that the contents of a
> > > file was inspected before actually adding it to the guest...
> >
> > It shouldn't be (I'm pretty sure it isn't in fact), I think there is
> > probably some other underlying issue.
>
> could be
>
>
> in any case, i'm attempting to go further with phy and manually using
> losetup... (i know it's not the best thing)
>
> however, i'm getting pvgrub not working
>
> the documentation of pvgrub tells me i should use (cd) and in the grub shell,
> i can see (cd) as available option with tab completion, but it tells me disk
> not found.
>
> so, i tried doing like it was a normal disk, but i found no menu.lst file.
>
> i also tried
> extra="kernel=(hd0)/images/xen/vmlinuz initrd=(hd0)/images/xen/initrd.img"
>
> which didn't work...
>
> but manually in the grub shell entering
>
> kernel (hd0)/images/xen/vmlinuz
> initrd (hd0)/images/xen/initrd.img
> root (hd0)
> boot
>
> that works.
>
> i found in documentation that pvgrub has el torito, so i don't know what is
> going on...

el torito doesn't make much sense in a PV world I don't think.

I don't know much about using pvgrub I'm afraid.

> so i also tried mounting the iso, copying the vmlinux and initrd.img and
> specifying it as kernel/initrd in the xl conf... but that didn't seem to work
> either...

THat should certainly work, logs and full guest config + console would
be needed to debug any further though I'm afraid.
>
>
> any thoughts on how to proceed?



_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xen.org/xen-users


maarten at ba

Aug 1, 2013, 8:00 AM

Post #9 of 11 (73 views)
Permalink
Re: attach an iso file to a PV guest [In reply to]

Op donderdag 1 augustus 2013 15:51:29 schreef Ian Campbell:
> On Thu, 2013-08-01 at 11:22 +0200, Maarten Vanraes wrote:
> > Op woensdag 31 juli 2013 16:56:31 schreef Ian Campbell:
> > > On Wed, 2013-07-31 at 17:51 +0200, Maarten Vanraes wrote:
> > > > Op woensdag 31 juli 2013 16:41:47 schreef Ian Campbell:
> > > > > On Wed, 2013-07-31 at 17:17 +0200, Maarten Vanraes wrote:
> > > > > > Op woensdag 31 juli 2013 15:36:39 schreef Ian Campbell:
> > > > > > > On Wed, 2013-07-31 at 16:20 +0200, Maarten Vanraes wrote:
> > > > > > > > i'm using the xl tools and i want to attach an iso file to a
> > > > > > > > PV.
> > > > > > >
> > > > > > > Which version of Xen and what does your guest config file
> > > > > > > contain?
> > > > > > >
> > > > > > > Please can you provide the result of attempting "xl -vvv create
> > > > > > > $cfg"
> > > > > > > with
> > > > > > > your $cfg
> > > > > >
> > > > > > thanks to your suggestion to use -vvv i can now see more on what's
> > > > > > going
> > > > > > on...
> > > > > >
> > > > > > this is xen 4.2.2 using the centos repository with kernel:
> > > > > > 3.4.46-8.el6.centos.alt.x86_64
> > > > > >
> > > > > >
> > > > > > what didn't work:
> > > > > > [ ]# xl -vvv block-attach templ-sl6
> > > > > > format=raw,vdev=hdb,access=ro,backendtype=tap,devtype=cdrom,target
> > > > > > =/pa
> > > > > > th/t
> > > > > > o/SL-64.iso
> > > > > >
> > > > > > output:
> > > > > > -----------
> > > > > > libxl: debug: libxl.c:3211:libxl_device_disk_add: ao 0x1a09a40:
> > > > > > create:
> > > > > > how=(nil) callback=(nil) poller=0x1a09aa0
> > > > > > libxl: debug: libxl_device.c:245:libxl__device_disk_set_backend:
> > > > > > Disk
> > > > > > vdev=hdb spec.backend=tap
> > > > > > DEBUG libxl__blktap_devpath 37
> > > > > > aio:/etc/xen/isos/ScientificLinux/SL-64-
> > > > > > x86_64-2013-03-18-Install-DVD.iso
> > > > > > libxl: error: libxl.c:1866:device_disk_add: failed to get blktap
> > > > > > devpath
> > > > > > for 0x1a09bf0
> > > > >
> > > > > Weird. There were some oddities with cdrom and/or blktap in 4.2,
> > > > > which
> > > > > may be improved in 4.3.
> > > > >
> > > > > Can you try without the backendtype=tap bit (just say nothing). I
> > > > > hope
> > > > > this will cause libxl to automatically pick something which actually
> > > > > works.
> > > > >
> > > > > Unless you know you have some specific requirement for blktap this
> > > > > is
> > > > > good advice in general.
> > > >
> > > > Well, it's because not specifying it, that i tried specifying it...
> > > >
> > > > when i didn't specify it, there were 2 extra lines:
> > > >
> > > > the first was:
> > > > "libxl: debug: libxl_device.c:245:libxl__device_disk_set_backend: Disk
> > > > vdev=hdb spec.backend=unknown"
> > >
> > > backend=unknown at this stage is ok, I think. At some point there should
> > > have been logging (with -vvv) about which bakcned to choose.
> > >
> > > > but, this is really some oddity, i never thought that the contents of
> > > > a
> > > > file was inspected before actually adding it to the guest...
> > >
> > > It shouldn't be (I'm pretty sure it isn't in fact), I think there is
> > > probably some other underlying issue.
> >
> > could be
> >
> >
> > in any case, i'm attempting to go further with phy and manually using
> > losetup... (i know it's not the best thing)
> >
> > however, i'm getting pvgrub not working
> >
> > the documentation of pvgrub tells me i should use (cd) and in the grub
> > shell, i can see (cd) as available option with tab completion, but it
> > tells me disk not found.
> >
> > so, i tried doing like it was a normal disk, but i found no menu.lst file.
> >
> > i also tried
> > extra="kernel=(hd0)/images/xen/vmlinuz initrd=(hd0)/images/xen/initrd.img"
> >
> > which didn't work...
> >
> > but manually in the grub shell entering
> >
> > kernel (hd0)/images/xen/vmlinuz
> > initrd (hd0)/images/xen/initrd.img
> > root (hd0)
> > boot
> >
> > that works.
> >
> > i found in documentation that pvgrub has el torito, so i don't know what
> > is
> > going on...
>
> el torito doesn't make much sense in a PV world I don't think.
>
> I don't know much about using pvgrub I'm afraid.

wel pvgrub + eltorito would mean i could boot from iso and install from it,
directly on a pv guest.

the weird part is that pvgrub works from the grub shell with
(hd0)/images/xen/vmlinuz + (hd0)/images/xen/initrd.img

but not if you copy them to the host and boot directly from those... how odd?

> > so i also tried mounting the iso, copying the vmlinux and initrd.img and
> > specifying it as kernel/initrd in the xl conf... but that didn't seem to
> > work either...
>
> THat should certainly work, logs and full guest config + console would
> be needed to debug any further though I'm afraid.

i'll try to supply those... iinm, it errors out on finding drivers... which is
weird since that initrd.img contains those drivers since it works with pvgrub
in the grub shell...

> > any thoughts on how to proceed?
--
BA NV
IT & Security

_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xen.org/xen-users


maarten at ba

Aug 6, 2013, 1:30 AM

Post #10 of 11 (40 views)
Permalink
Re: attach an iso file to a PV guest [In reply to]

Op donderdag 1 augustus 2013 17:00:37 schreef Maarten Vanraes:
[...]
> > > any thoughts on how to proceed?

i saw a number of mistakes i made...

1. you cannot specify "root = '' " (not even to make it empty) ==> you get the
pvgrub shell
2. the config uses ramdisk = "" (not initrd)

after all this, with pvgrub it just doesn't want to recognize the iso as a
CD...


i changed back to original setup, where i use the kernel/initrd from on the CD
directly in the xl conf.

i noticed there that the SL6 CD doesn't recognize it as a CDROM and tried
until it does.

now, it's recognized as CD, but doesn't find any files on it.

it keeps giving: "drive status is Invalid argument"

this is my current disk config:

disk = [
'format=raw,vdev=xvda,access=ro,devtype=cdrom,backendtype=phy,target=/dev/loop0',
'tap2:aio:/etc/xen/templates/sl6.img,xvdb1,w', ]


(the order seems to be important, the CD must be the first one). no matter what
vdev you specify, it will always try xvda or xvda1 (depending if you specify
disk or partition)

both give the same response:

trying to mount CD device /dev/xvda on /mnt/stage2
drive status is Invalid argument


does anyone have another idea?

--
BA NV
IT & Security

_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xen.org/xen-users


maarten at ba

Aug 8, 2013, 2:33 AM

Post #11 of 11 (37 views)
Permalink
Re: attach an iso file to a PV guest [In reply to]

i'm trying to make templates for usage with paravirtualisation...

what is the best way to create those?

i tried installing from iso in PV, but that doesn't work.

i tried installing in HVM from iso, but that didn't work either, you can't
specify partitions, you need to specify full disks... and the hardware differs
too much for hvm to be used as template for PV.

would network install work under pv?

mvg,

Maarten

Op dinsdag 6 augustus 2013 10:30:42 schreef Maarten Vanraes:
> Op donderdag 1 augustus 2013 17:00:37 schreef Maarten Vanraes:
> [...]
>
> > > > any thoughts on how to proceed?
>
> i saw a number of mistakes i made...
>
> 1. you cannot specify "root = '' " (not even to make it empty) ==> you get
> the pvgrub shell
> 2. the config uses ramdisk = "" (not initrd)
>
> after all this, with pvgrub it just doesn't want to recognize the iso as a
> CD...
>
>
> i changed back to original setup, where i use the kernel/initrd from on the
> CD directly in the xl conf.
>
> i noticed there that the SL6 CD doesn't recognize it as a CDROM and tried
> until it does.
>
> now, it's recognized as CD, but doesn't find any files on it.
>
> it keeps giving: "drive status is Invalid argument"
>
> this is my current disk config:
>
> disk = [
> 'format=raw,vdev=xvda,access=ro,devtype=cdrom,backendtype=phy,target=/dev/lo
> op0', 'tap2:aio:/etc/xen/templates/sl6.img,xvdb1,w', ]
>
>
> (the order seems to be important, the CD must be the first one). no matter
> what vdev you specify, it will always try xvda or xvda1 (depending if you
> specify disk or partition)
>
> both give the same response:
>
> trying to mount CD device /dev/xvda on /mnt/stage2
> drive status is Invalid argument
>
>
> does anyone have another idea?
--
BA NV
IT & Security

_______________________________________________
Xen-users mailing list
Xen-users [at] lists
http://lists.xen.org/xen-users

Xen users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.