Infertux
2012-Oct-04 17:56 UTC
[Pkg-xen-devel] Bug#689646: xen-utils-4.1: fails to create HVM domU
Package: xen-utils-4.1 Version: 4.1.3-2 Severity: important Dear Maintainer, Creating a new HVM domU fails with the following error: map shared IO page returned error 22 I've narrowed it down to qemu-dm which fails to start: # /usr/lib/xen-4.1/bin/qemu-dm [...] qemu_map_cache_init nr_buckets = 10000 size 4194304 errno0 = 2 domid = -1 shared page at pfn 0 errno1 = 3 errno2 = 22 map shared IO page returned error 22 I added some errno debug then rebuilt and reinstalled the package using apt-src, here is the diff: diff --git a/qemu/hw/xen_machine_fv.c b/qemu/hw/xen_machine_fv.c index a353ee6..fe7a914 100644 --- a/qemu/hw/xen_machine_fv.c +++ b/qemu/hw/xen_machine_fv.c @@ -297,10 +297,14 @@ static void xen_init_fv(ram_addr_t ram_size, int vga_ram_size, #ifdef CONFIG_STUBDOM /* the hvmop is not supported on older hypervisors */ xc_set_hvm_param(xc_handle, domid, HVM_PARAM_DM_DOMAIN, DOMID_SELF); #endif + fprintf(logfile, "errno0 = %d\n", errno); + fprintf(logfile, "domid = %d\n", domid); xc_get_hvm_param(xc_handle, domid, HVM_PARAM_IOREQ_PFN, &ioreq_pfn); fprintf(logfile, "shared page at pfn %lx\n", ioreq_pfn); + fprintf(logfile, "errno1 = %d\n", errno); shared_page = xc_map_foreign_range(xc_handle, domid, XC_PAGE_SIZE, PROT_READ|PROT_WRITE, ioreq_pfn); + fprintf(logfile, "errno2 = %d\n", errno); if (shared_page == NULL) { fprintf(logfile, "map shared IO page returned error %d\n", errno); exit(-1); It seems the root issue is ioreq_pfn which is zero but I'm not sure where to go from here. -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-3-amd64 (SMP w/8 CPU cores) Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/dash Versions of packages xen-utils-4.1 depends on: ii e2fslibs 1.42.5-1 ii libc6 2.13-35 ii libgnutls26 2.12.20-1 ii libncurses5 5.9-10 ii libpci3 1:3.1.9-5 ii libtinfo5 5.9-10 ii libuuid1 2.20.1-5.2 ii libxen-4.1 4.1.3-2 ii libxenstore3.0 4.1.3-2 ii python 2.7.3~rc2-1 ii python2.7 2.7.3~rc2-2.1 ii xen-utils-common 4.1.3-2 ii zlib1g 1:1.2.7.dfsg-13 Versions of packages xen-utils-4.1 recommends: ii bridge-utils 1.5-4 ii qemu-keymaps 1.1.2+dfsg-2 ii qemu-utils 1.1.2+dfsg-2 ii xen-hypervisor-4.1-amd64 [xen-hypervisor-4.1] 4.1.3-2 Versions of packages xen-utils-4.1 suggests: ii xen-docs-4.1 4.1.3-2 -- no debconf information
Ian Campbell
2012-Oct-04 18:35 UTC
[Pkg-xen-devel] Bug#689646: xen-utils-4.1: fails to create HVM domU
On Thu, 2012-10-04 at 19:56 +0200, Infertux wrote:> Creating a new HVM domU fails with the following error: > map shared IO page returned error 22How are you creating the domain? Please can you supply the config file you are using and the actual commands you are running. The interesting logs are likely to be under /var/log/xen.> I've narrowed it down to qemu-dm which fails to start: > # /usr/lib/xen-4.1/bin/qemu-dmYou can't just run qemu bare like that, it needs the toolstack to have created the shell of the domain and to pass the correct options. The fact that it appears to produce the same error message is probably a coincidence. Ian. -- Ian Campbell I'm a soldier, not a diplomat. I can only tell the truth. -- Kirk, "Errand of Mercy", stardate 3198.9
Infertux
2012-Oct-04 20:55 UTC
[Pkg-xen-devel] Bug#689646: xen-utils-4.1: fails to create HVM domU
Package: xen-utils-4.1 Version: 4.1.3-2 Followup-For: Bug #689646 On Thu, 2012-10-04 at 19:35 +0100, Ian Campbell wrote:> How are you creating the domain? Please can you supply the config file > you are using and the actual commands you are running.# xl create /etc/xen/hvm.cfg Parsing config file /etc/xen/hvm.cfg libxl: error: libxl_dom.c:287:libxl__build_hvm hvm building failed [FYI, it hangs for about 5 seconds here before giving up with the next two lines] libxl: error: libxl_device.c:470:libxl__wait_for_device_model Device Model not ready xl: fatal error: libxl_create.c:535, rc=-1: libxl__confirm_device_model_startup I'm attaching the config file.> The interesting logs are likely to be under /var/log/xen.# cat /var/log/xen/qemu-dm-hvm.log domid: 17 -videoram option does not work with cirrus vga device model. Videoram set to 4M. qemu: ignoring not-understood drive `xvda2' qemu: ignoring not-understood drive `xvda1' Watching /local/domain/0/device-model/17/logdirty/cmd Watching /local/domain/0/device-model/17/command Watching /local/domain/17/cpu qemu_map_cache_init nr_buckets = 10000 size 4194304 shared page at pfn 0 map shared IO page returned error 22 -------------- next part -------------- kernel = 'hvmloader' builder = 'hvm' device_model = 'qemu-dm' kernel = '/boot/vmlinuz-3.2.0-3-amd64' ramdisk = '/boot/initrd.img-3.2.0-3-amd64' vcpus = '2' memory = '512' root = '/dev/xvda2 ro' name = 'hvm' disk = [ 'file:/srv/xen/hvm/domains/hvm/disk.img,xvda2,w', 'file:/srv/xen/hvm/domains/hvm/swap.img,xvda1,w', ] on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'restart'
Ian Campbell
2012-Oct-05 07:07 UTC
[Pkg-xen-devel] Bug#689646: xen-utils-4.1: fails to create HVM domU
On Thu, 2012-10-04 at 22:55 +0200, Infertux wrote:> Package: xen-utils-4.1 > Version: 4.1.3-2 > Followup-For: Bug #689646 > > On Thu, 2012-10-04 at 19:35 +0100, Ian Campbell wrote: > > How are you creating the domain? Please can you supply the config file > > you are using and the actual commands you are running. > > # xl create /etc/xen/hvm.cfg > Parsing config file /etc/xen/hvm.cfgYour config file is a strange mix of PV and HVM-isms, has it ever worked for you with any toolstack? You have kernel = hvmloader and builder = hvm (both HVM-isms) but then you specify specific kernels (overriding the hvmloader case) and ramdisk (PV-isms) and use a split disk layout (also a PV-ism). Ian. -- Ian Campbell I B M U B M We all B M For I B M!!!! -- H.A.R.L.I.E.
Infertux
2012-Oct-05 15:11 UTC
[Pkg-xen-devel] Bug#689646: xen-utils-4.1: fails to create HVM domU
Package: xen-utils-4.1 Followup-For: Bug #689646 On Thu, 2012-10-05 at 08:07 +0100, Ian Campbell wrote:> Your config file is a strange mix of PV and HVM-isms, has it ever worked > for you with any toolstack? > > You have kernel = hvmloader and builder = hvm (both HVM-isms) but then > you specify specific kernels (overriding the hvmloader case) and ramdisk > (PV-isms) and use a split disk layout (also a PV-ism).Indeed, I don't know where this file comes from in the first place but it works like a charm with a decent config. You can safely close this bug report, sorry for the noise. Cheers.
Debian Bug Tracking System
2012-Oct-05 16:45 UTC
[Pkg-xen-devel] Bug#689646: marked as done (xen-utils-4.1: fails to create HVM domU)
Your message dated Fri, 05 Oct 2012 17:41:15 +0100 with message-id <1349455275.20946.145.camel at zakaz.uk.xensource.com> and subject line Re: Bug#689646: xen-utils-4.1: fails to create HVM domU has caused the Debian Bug report #689646, regarding xen-utils-4.1: fails to create HVM domU to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner at bugs.debian.org immediately.) -- 689646: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=689646 Debian Bug Tracking System Contact owner at bugs.debian.org with problems -------------- next part -------------- An embedded message was scrubbed... From: Infertux <infertux at infertux.com> Subject: xen-utils-4.1: fails to create HVM domU Date: Thu, 04 Oct 2012 19:56:30 +0200 Size: 4062 URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20121005/172d1285/attachment.mht> -------------- next part -------------- An embedded message was scrubbed... From: Ian Campbell <ijc at hellion.org.uk> Subject: Re: Bug#689646: xen-utils-4.1: fails to create HVM domU Date: Fri, 05 Oct 2012 17:41:15 +0100 Size: 3333 URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20121005/172d1285/attachment-0001.mht>
Possibly Parallel Threads
- [PATCH V2] qemu-xen-traditionnal, Fix dirty logging during migration.
- [PATCH 6/8] HVM save restore: guest memory handling
- [PATCH] xenpm: make argument parsing and error handling more consistent
- [PATCH 00/15] RFC xen device model support
- Making a hypercall in DomU