* Xex 4.3.1 issues with HVM + drbd (qemu-system-i386 No such file or directory)
@ 2014-03-31 22:51 Miguel Clara
2014-03-31 23:02 ` Miguel Clara
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Miguel Clara @ 2014-03-31 22:51 UTC (permalink / raw)
To: xen-devel@lists.xensource.com
[-- Attachment #1.1: Type: text/plain, Size: 438 bytes --]
I'm trying to use drbd disks in a FreeBSD HVM+PV guest but it seems Xnew
qemu doesn't want to do it, this is the error I get:
cat /var/log/xen/qemu-dm-freebsd-01.log
qemu-system-i386: -drive
file=drbd-freebsd-01,if=ide,index=0,media=disk,format=raw,cache=writeback:
could not open disk image drbd-freebsd-01: No such file or directory
I wil ltry with qemu-traditonal but wonder if this is a known issue...
The Dom0 runs on Debain 7
[-- Attachment #1.2: Type: text/html, Size: 615 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Xex 4.3.1 issues with HVM + drbd (qemu-system-i386 No such file or directory)
2014-03-31 22:51 Xex 4.3.1 issues with HVM + drbd (qemu-system-i386 No such file or directory) Miguel Clara
@ 2014-03-31 23:02 ` Miguel Clara
2014-04-01 8:51 ` Ian Campbell
2014-04-01 10:39 ` Roger Pau Monné
2 siblings, 0 replies; 4+ messages in thread
From: Miguel Clara @ 2014-03-31 23:02 UTC (permalink / raw)
To: xen-devel@lists.xensource.com
[-- Attachment #1.1: Type: text/plain, Size: 820 bytes --]
qemu-traditional is a no go too, I get a different error, I think it in the
list before, I'll search about that, in any case I would prefer to have
this work with new qemu.
vcpu-set: watch node error.
[xenstore_process_vcpu_set_event]: /local/domain/4/cpu has no CPU!
On Mon, Mar 31, 2014 at 11:51 PM, Miguel Clara <miguelmclara@gmail.com>wrote:
>
> I'm trying to use drbd disks in a FreeBSD HVM+PV guest but it seems Xnew
> qemu doesn't want to do it, this is the error I get:
>
>
> cat /var/log/xen/qemu-dm-freebsd-01.log
>
> qemu-system-i386: -drive
> file=drbd-freebsd-01,if=ide,index=0,media=disk,format=raw,cache=writeback:
> could not open disk image drbd-freebsd-01: No such file or directory
>
>
> I wil ltry with qemu-traditonal but wonder if this is a known issue...
>
> The Dom0 runs on Debain 7
>
>
>
[-- Attachment #1.2: Type: text/html, Size: 1377 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Xex 4.3.1 issues with HVM + drbd (qemu-system-i386 No such file or directory)
2014-03-31 22:51 Xex 4.3.1 issues with HVM + drbd (qemu-system-i386 No such file or directory) Miguel Clara
2014-03-31 23:02 ` Miguel Clara
@ 2014-04-01 8:51 ` Ian Campbell
2014-04-01 10:39 ` Roger Pau Monné
2 siblings, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2014-04-01 8:51 UTC (permalink / raw)
To: Miguel Clara; +Cc: xen-devel@lists.xensource.com
On Mon, 2014-03-31 at 23:51 +0100, Miguel Clara wrote:
>
> I'm trying to use drbd disks in a FreeBSD HVM+PV guest but it seems
> Xnew qemu doesn't want to do it, this is the error I get:
>
>
>
> cat /var/log/xen/qemu-dm-freebsd-01.log
>
>
> qemu-system-i386: -drive
> file=drbd-freebsd-01,if=ide,index=0,media=disk,format=raw,cache=writeback: could not open disk image drbd-freebsd-01: No such file or directory
At least some of these issues have been fixed in 4.4.0, I don't know if
they were backported to later 4.3.x or not.
I'd recommend using at least 4.4.0.
Ian.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Xex 4.3.1 issues with HVM + drbd (qemu-system-i386 No such file or directory)
2014-03-31 22:51 Xex 4.3.1 issues with HVM + drbd (qemu-system-i386 No such file or directory) Miguel Clara
2014-03-31 23:02 ` Miguel Clara
2014-04-01 8:51 ` Ian Campbell
@ 2014-04-01 10:39 ` Roger Pau Monné
2 siblings, 0 replies; 4+ messages in thread
From: Roger Pau Monné @ 2014-04-01 10:39 UTC (permalink / raw)
To: Miguel Clara, xen-devel@lists.xensource.com
On 01/04/14 00:51, Miguel Clara wrote:
>
> I'm trying to use drbd disks in a FreeBSD HVM+PV guest but it seems Xnew
> qemu doesn't want to do it, this is the error I get:
>
>
> cat /var/log/xen/qemu-dm-freebsd-01.log
>
> qemu-system-i386: -drive
> file=drbd-freebsd-01,if=ide,index=0,media=disk,format=raw,cache=writeback:
> could not open disk image drbd-freebsd-01: No such file or directory
>
>
> I wil ltry with qemu-traditonal but wonder if this is a known issue...
The issue comes from the fact that drbd block devices are not known
until the hotplug script is executed, but even then, the resulting
block device that's passed into blkback is not written anywhere (apart
from the major:minor numbers written to xenstore). One solution to the
problem is to use qemu-xen-traditional stubdomains, but this is not
available with qemu-xen yet.
I have a crappy patch that fetches the major:minor numbers from
xenstore after the hotplug script has run and passes that to qemu-xen
command line, I think it should solve the problem, but I don't have a
drbd setup in order to test it, could you please give it a spin?
If this works OK I can clean the patch and properly submit it.
---
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 8abed7b..7c903ab 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -42,6 +42,39 @@ static const char *qemu_xen_path(libxl__gc *gc)
#endif
}
+static const char *qemu_fetch_device_path(libxl__gc *gc, uint32_t domid,
+ const libxl_device_disk *disk)
+{
+ libxl__device device;
+ char *be_path;
+ const char *phys_dev;
+ unsigned int major, minor;
+ int rc;
+
+ if (disk->backend != LIBXL_DISK_BACKEND_PHY)
+ return disk->pdev_path;
+
+ rc = libxl__device_from_disk(gc, domid, (libxl_device_disk *)disk, &device);
+ if (rc)
+ return NULL;
+
+ be_path = libxl__device_backend_path(gc, &device);
+ if (!be_path)
+ return NULL;
+
+ rc = libxl__xs_read_checked(gc, XBT_NULL,
+ GCSPRINTF("%s/physical-device", be_path),
+ &phys_dev);
+ if (rc)
+ return NULL;
+
+ rc = sscanf(phys_dev, "%x:%x", &major, &minor);
+ if (rc != 2)
+ return NULL;
+
+ return GCSPRINTF("/dev/block/%u:%u", major, minor);
+}
+
static int libxl__create_qemu_logfile(libxl__gc *gc, char *name)
{
char *logfile;
@@ -694,7 +727,8 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
else
drive = libxl__sprintf
(gc, "file=%s,if=ide,index=%d,media=cdrom,format=%s,cache=writeback,id=ide-%i",
- disks[i].pdev_path, disk, format, dev_number);
+ qemu_fetch_device_path(gc, guest_domid, &disks[i]),
+ disk, format, dev_number);
} else {
if (disks[i].format == LIBXL_DISK_FORMAT_EMPTY) {
LIBXL__LOG(ctx, LIBXL__LOG_WARNING, "cannot support"
@@ -717,11 +751,13 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
if (strncmp(disks[i].vdev, "sd", 2) == 0)
drive = libxl__sprintf
(gc, "file=%s,if=scsi,bus=0,unit=%d,format=%s,cache=writeback",
- disks[i].pdev_path, disk, format);
+ qemu_fetch_device_path(gc, guest_domid, &disks[i]),
+ disk, format);
else if (disk < 4)
drive = libxl__sprintf
(gc, "file=%s,if=ide,index=%d,media=disk,format=%s,cache=writeback",
- disks[i].pdev_path, disk, format);
+ qemu_fetch_device_path(gc, guest_domid, &disks[i]),
+ disk, format);
else
continue; /* Do not emulate this disk */
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-04-01 10:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-31 22:51 Xex 4.3.1 issues with HVM + drbd (qemu-system-i386 No such file or directory) Miguel Clara
2014-03-31 23:02 ` Miguel Clara
2014-04-01 8:51 ` Ian Campbell
2014-04-01 10:39 ` Roger Pau Monné
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.