I use xl.cfg "disk" entries like the following to mount a virtual CDROM
in a Xen domU:

    'format=raw, vdev=0x5, access=ro, devtype=cdrom, 
target=/images/NetBSD-9.0-amd64.iso'

However since upgrading my -current source tree I've been seeing:

        xenbus0: ignoring device/vbd/4 type cdrom

As shown in this patch I had to comment out the core of the mentioned
change to be able to use an ISO image again as a virtual CDROM again:


--- xenbus_probe.c.~1.55.~      2020-05-30 17:32:39.672816814 -0700
+++ xenbus_probe.c      2020-06-08 14:13:45.025527521 -0700
@@ -443,6 +443,14 @@
                                kmem_free(xbusd, xbusd->xbusd_sz);
                                break;
                        }
+//revision 1.51
+//date: 2020-04-28 06:21:01 -0700;  author: bouyer;  state: Exp;  lines: +30 
-9;  commitid: 5XOy6F9zbgN8C96C;
+//Skip block device  with device-type "cdrom", as their emulation can't be
+//disabled; and the backend driver doesn't handle them either.
+//Fix hang when booting with 'ioemu:hdc:cdrom' type disks.
+//While there convert some printf to aprint_error()
+//
+#if 0 /* XXX breaks use of ISO files! */
                        if (strcmp(xa.xa_type, "vbd") == 0) {
                                char dtype[10];
                                if (xenbus_read(NULL, xbusd->xbusd_path,
@@ -461,6 +469,7 @@
                                        continue;
                                }
                        }
+#endif
                        err = read_backend_details(xbusd);
                        if (err != 0) {
                                aprint_error_dev(xenbus_dev,


Now it works again:

        xbd4 at xenbus0 id 4: Xen Virtual Block Device Interface
        xbd4: using event channel 12
        ...
        boot device: xbd4
        root on xbd4a dumps on xbd4b
        root file system type: cd9660

--
                                        Greg A. Woods <[email protected]>

Kelowna, BC     +1 250 762-7675           RoboHack <[email protected]>
Planix, Inc. <[email protected]>     Avoncote Farms <[email protected]>

Attachment: pgpyhCAjH0HNg.pgp
Description: OpenPGP Digital Signature

Reply via email to