Date: Mon, 17 Feb 2025 15:58:02 +0100 From: Roger Pau =?utf-8?B?TW9ubsOp?= <roger.pau@citrix.com> To: Subbsd <subbsd@gmail.com> Cc: freebsd-xen@freebsd.org Subject: Re: FreeBSD 14.2-p1, XEN 4.19.0.20241112, unable to create domain Message-ID: <Z7NOemJ9GKrXPQly@macbook.local> In-Reply-To: <CAFt_eMoOrG_hBFPOtSo9%2BVgt34Vu4x3eTfo7Zi5j_OVYjCezjQ@mail.gmail.com> References: <CAFt_eMoOrG_hBFPOtSo9%2BVgt34Vu4x3eTfo7Zi5j_OVYjCezjQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Feb 16, 2025 at 08:58:57PM +0300, Subbsd wrote: > The domain is not created when i try to use the following config file: > > xen.cfg: > ``` > name = "freebsd1" > memory = 4096 > vcpus = 4 > vif = [ "bridge=bridge2" ] > boot="d" > vga = "stdvga" > videoram=32 > opengl=1 opengl is not relevant for FreeBSD, that's a legacy option used by qemu-xen-traditional only, which FreeBSD has never supported. > vncconsole=1 > vncunused=0 > debug_engine='none' debug_engine is not an xl.cfg option. > on_poweroff="destroy"; > on_reboot="restart"; > on_crash="destroy"; > usbdevice = 'tablet' > hap="1" > nestedhvm="0" > apic=1 > acpi=1 You don't need t omanually specify hap, nestedhvm, apic or acpi with those values, as those are already the defaults. > localtime=1 > usb=1 > vnc = 1 > spice = 0 > vnclisten = "0.0.0.0" > vncpasswd="xxx" > vncdisplay="0" > disk = [ > '/usr/jails/jails-data/freebsd1-data/dsk1.vhd,raw,xvda,rw', > '/usr/jails/src/iso/cbsd-iso-FreeBSD-14.2-RELEASE-amd64-disc1.iso,raw,hdb:cdrom,r' > ] > builder = "hvm" > serial="pty" > vncconsole=1 vncconsole is not an xl.cfg option. > ``` > > Other settings: > > /boot/loader.conf: > ``` > boot_multicons="YES" > boot_serial="YES" > console="comconsole,vidconsole" > > xen_kernel="/boot/xen" > xen_cmdline="dom0_mem=4096M dom0_max_vcpus=4 dom0=pvh com1=115200,8n1 > guest_loglvl=all loglvl=all" > ``` > > /etc/rc.conf: > ``` > xencommons_enable="YES" > xendriverdomain_enable="YES" Please don't enable xendriverdomain_enable on dom0, it won't work correctly. > ``` > > ``` > ps axfww | grep xen > 1846 - I 0:00.28 /usr/local/sbin/xenstored --pid-file > /var/run/xen/xenstored.pid > 1851 - I 0:00.07 /usr/local/sbin/xenconsoled > ``` > > Result: > ``` > /usr/local/sbin/xl -vvv create -c ./xen.cfg > Parsing config from ./xen.cfg > libxl: debug: libxl_create.c:2122:do_domain_create: ao 0x3452b042e0a0: > create: how=0x0 callback=0x0 poller=0x3452b04230a0 > libxl: detail: libxl_create.c:672:libxl__domain_make: passthrough: disabled > libxl: detail: libxl_create.c:680:libxl__domain_make: altp2m: disabled > libxl: debug: libxl_device.c:445:libxl__device_disk_set_backend: Disk > vdev=xvda spec.backend=unknown specification=xen > libxl: debug: libxl_device.c:485:libxl__device_disk_set_backend: Disk > vdev=xvda, using backend phy > libxl: debug: libxl_device.c:445:libxl__device_disk_set_backend: Disk > vdev=hdb spec.backend=qdisk specification=xen > libxl: debug: libxl_create.c:1377:initiate_domain_create: Domain > 6:running bootloader > libxl: debug: libxl_bootloader.c:410:libxl__bootloader_run: Domain > 6:not a PV/PVH domain, skipping bootloader > libxl: debug: libxl_event.c:863:libxl__ev_xswatch_deregister: watch > w=0x3452b0451dc8: deregister unregistered > libxl: debug: libxl_numa.c:502:libxl__get_numa_candidate: New best > NUMA placement candidate found: nr_nodes=1, nr_cpus=10, nr_vcpus=8, > free_memkb=128705 > libxl: detail: libxl_dom.c:228:numa_place_domain: NUMA placement > candidate with 1 nodes, 10 cpus and 128705 KB free selected > domainbuilder: detail: xc_dom_allocate: cmdline="", features="" > domainbuilder: detail: xc_dom_kernel_file: > filename="/usr/local/lib/xen/boot/hvmloader" > domainbuilder: detail: xc_dom_malloc_filemap : 170 kB > libxl: debug: libxl_dom.c:838:libxl__load_hvm_firmware_module: Loading > BIOS: /usr/local/share/seabios/bios.bin > domainbuilder: detail: xc_dom_boot_xen_init: ver 4.19, caps > xen-3.0-x86_64 hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 > domainbuilder: detail: xc_dom_parse_image: called > domainbuilder: detail: xc_dom_find_loader: trying multiboot-binary loader ... > domainbuilder: detail: loader probe failed > domainbuilder: detail: xc_dom_find_loader: trying HVM-generic loader ... > domainbuilder: detail: loader probe OK > xc: detail: ELF: phdr: paddr=0x100000 memsz=0x2fea0 > xc: detail: ELF: memory: 0x100000 -> 0x12fea0 > domainbuilder: detail: xc_dom_compat_check: supported guest type: xen-3.0-x86_64 > domainbuilder: detail: xc_dom_compat_check: supported guest type: > hvm-3.0-x86_32 <= matches > domainbuilder: detail: xc_dom_compat_check: supported guest type: > hvm-3.0-x86_32p > domainbuilder: detail: xc_dom_compat_check: supported guest type: hvm-3.0-x86_64 > domainbuilder: detail: xc_dom_mem_init: mem 4064 MB, pages 0xfe000 > pages, 4k each > domainbuilder: detail: xc_dom_mem_init: 0xfe000 pages > domainbuilder: detail: xc_dom_boot_mem_init: called > domainbuilder: detail: range: start=0x0 end=0xf0000000 > domainbuilder: detail: range: start=0x100000000 end=0x10e000000 > xc: detail: PHYSICAL MEMORY ALLOCATION: > xc: detail: 4KB PAGES: 0x0000000000000200 > xc: detail: 2MB PAGES: 0x00000000000003ef > xc: detail: 1GB PAGES: 0x0000000000000002 > domainbuilder: detail: xc_dom_build_image: called > domainbuilder: detail: xc_dom_pfn_to_ptr_retcount: domU mapping: pfn > 0x100+0x30 at 0x82fe2a000 > domainbuilder: detail: xc_dom_alloc_segment: kernel : 0x100000 > -> 0x12fea0 (pfn 0x100 + 0x30 pages) > xc: detail: ELF: phdr 0 at 0x830a5a000 -> 0x830a833ac > domainbuilder: detail: xc_dom_pfn_to_ptr_retcount: domU mapping: pfn > 0x130+0x40 at 0x83125a000 > domainbuilder: detail: xc_dom_alloc_segment: System Firmware module > : 0x130000 -> 0x170000 (pfn 0x130 + 0x40 pages) > domainbuilder: detail: xc_dom_pfn_to_ptr_retcount: domU mapping: pfn > 0x170+0x1 at 0x83309a000 > domainbuilder: detail: xc_dom_alloc_segment: HVM start info : > 0x170000 -> 0x1708a8 (pfn 0x170 + 0x1 pages) > domainbuilder: detail: xc_dom_build_image : virt_alloc_end : 0x171000 > domainbuilder: detail: xc_dom_build_image : virt_pgtab_end : 0x0 > domainbuilder: detail: xc_dom_boot_image: called > domainbuilder: detail: domain builder memory footprint > domainbuilder: detail: allocated > domainbuilder: detail: malloc : 5848 bytes > domainbuilder: detail: anon mmap : 0 bytes > domainbuilder: detail: mapped > domainbuilder: detail: file mmap : 170 kB > domainbuilder: detail: domU mmap : 452 kB > domainbuilder: detail: vcpu_hvm: called > domainbuilder: detail: compat_gnttab_hvm_seed: d6: pfn=0x10e000 > domainbuilder: detail: xc_dom_set_gnttab_entry: d6 gnt[0] -> d0 0xfefff > domainbuilder: detail: xc_dom_set_gnttab_entry: d6 gnt[1] -> d0 0xfeffc > domainbuilder: detail: xc_dom_release: called > libxl: debug: libxl_device.c:445:libxl__device_disk_set_backend: Disk > vdev=xvda spec.backend=phy specification=xen > libxl: debug: libxl_event.c:813:libxl__ev_xswatch_register: watch > w=0x3452b04904d0 wpath=/local/domain/0/backend/vbd/6/51712/state > token=3/0: register slotnum=3 > libxl: debug: libxl_device.c:445:libxl__device_disk_set_backend: Disk > vdev=hdb spec.backend=qdisk specification=xen > libxl: debug: libxl_device.c:1268:device_hotplug: Domain 6:No hotplug > script to execute > libxl: debug: libxl_event.c:863:libxl__ev_xswatch_deregister: watch > w=0x3452b04909d0: deregister unregistered > libxl: debug: libxl_create.c:2161:do_domain_create: ao 0x3452b042e0a0: > inprogress: poller=0x3452b04230a0, flags=i > libxl: debug: libxl_event.c:751:watchfd_callback: watch > w=0x3452b04904d0 wpath=/local/domain/0/backend/vbd/6/51712/state > token=3/0: event epath=/local/domain/0/backend/vbd/6/51712/state > libxl: debug: libxl_event.c:1051:devstate_callback: backend > /local/domain/0/backend/vbd/6/51712/state wanted state 2 ok > libxl: debug: libxl_event.c:850:libxl__ev_xswatch_deregister: watch > w=0x3452b04904d0 wpath=/local/domain/0/backend/vbd/6/51712/state > token=3/0: deregister slotnum=3 > libxl: debug: libxl_device.c:1181:device_backend_callback: Domain > 6:calling device_backend_cleanup > libxl: debug: libxl_event.c:863:libxl__ev_xswatch_deregister: watch > w=0x3452b04904d0: deregister unregistered > libxl: debug: libxl_device.c:1283:device_hotplug: Domain 6:calling > hotplug script: /usr/local/etc/xen/scripts/block > /local/domain/0/backend/vbd/6/51712 > libxl: debug: libxl_device.c:1284:device_hotplug: Domain 6:extra args: > libxl: debug: libxl_device.c:1290:device_hotplug: Domain 6: add > libxl: debug: libxl_device.c:1292:device_hotplug: Domain 6:env: > libxl: debug: libxl_aoutils.c:593:libxl__async_exec_start: forking to > execute: /usr/local/etc/xen/scripts/block > /local/domain/0/backend/vbd/6/51712 > libxl: debug: libxl_event.c:720:watchfd_callback: watch > epath=/local/domain/0/backend/vbd/6/51712/state token=3/0: empty slot > libxl: debug: libxl_event.c:863:libxl__ev_xswatch_deregister: watch > w=0x3452b04905d0: deregister unregistered > libxl: debug: libxl_device.c:1268:device_hotplug: Domain 6:No hotplug > script to execute > libxl: debug: libxl_event.c:863:libxl__ev_xswatch_deregister: watch > w=0x3452b04905d0: deregister unregistered > libxl: debug: libxl_dm.c:180:libxl__domain_get_device_model_uid: > Domain 6:dm_restrict disabled, starting QEMU as root > libxl: debug: libxl_disk.c:1346:libxl__device_disk_find_local_path: > Directly accessing local RAW disk > /usr/jails/jails-data/freebsd1-data/dsk1.vhd > libxl: debug: libxl_disk.c:1346:libxl__device_disk_find_local_path: > Directly accessing local RAW disk > /usr/jails/src/iso/cbsd-iso-FreeBSD-14.2-RELEASE-amd64-disc1.iso > libxl: debug: libxl_dm.c:3001:libxl__spawn_local_dm: Domain 6:Spawning > device-model /usr/local/lib/xen/bin/qemu-system-i386 with arguments: > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: > /usr/local/lib/xen/bin/qemu-system-i386 > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -xen-domid > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: 6 > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -no-shutdown > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -chardev > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: > socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-6,server=on,wait=off > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -mon > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: > chardev=libxl-cmd,mode=control > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -chardev > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: > socket,id=libxenstat-cmd,path=/var/run/xen/qmp-libxenstat-6,server=on,wait=off > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -mon > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: > chardev=libxenstat-cmd,mode=control > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -nodefaults > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -no-user-config > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -name > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: freebsd1 > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -vnc > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: > 0.0.0.0:0,password=on > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -display > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: none > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -serial > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: pty > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -device > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: VGA,vgamem_mb=32 > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -boot > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: order=d > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -usb > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -usbdevice > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: tablet > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -smp > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: 4,maxcpus=4 > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -device > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: > rtl8139,id=nic0,netdev=net0,mac=00:16:3e:3b:68:4b > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -netdev > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: > type=tap,id=net0,ifname=xnb6.0-emu,br=bridge2,script=no,downscript=no > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -machine > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: > xenfv,suppress-vmdesc=on > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -m > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: 4064 > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -drive > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: > file=/usr/jails/jails-data/freebsd1-data/dsk1.vhd,if=ide,index=0,media=disk,format=raw,cache=writeback > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -drive > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: > if=none,readonly=on,id=ide-832,file=/usr/jails/src/iso/cbsd-iso-FreeBSD-14.2-RELEASE-amd64-disc1.iso,format=raw > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: -device > libxl: debug: libxl_dm.c:3003:libxl__spawn_local_dm: Domain 6: > ide-cd,id=ide-832,drive=ide-832,bus=ide.0,unit=1 > libxl: debug: libxl_dm.c:3005:libxl__spawn_local_dm: Domain 6:Spawning > device-model /usr/local/lib/xen/bin/qemu-system-i386 with additional > environment: > libxl: debug: libxl_dm.c:3007:libxl__spawn_local_dm: Domain 6: > XEN_QEMU_CONSOLE_LIMIT=1048576 > libxl: debug: libxl_dm.c:3007:libxl__spawn_local_dm: Domain 6: XEN_DOMAIN_ID=6 > libxl: debug: libxl_event.c:813:libxl__ev_xswatch_register: watch > w=0x3452b04520c0 wpath=/local/domain/0/device-model/6/state token=3/1: > register slotnum=3 > libxl: debug: libxl_event.c:751:watchfd_callback: watch > w=0x3452b04520c0 wpath=/local/domain/0/device-model/6/state token=3/1: > event epath=/local/domain/0/device-model/6/state > libxl: debug: libxl_exec.c:407:spawn_watch_event: domain 6 device > model: spawn watch p=(null) > libxl: debug: libxl_event.c:751:watchfd_callback: watch > w=0x3452b04520c0 wpath=/local/domain/0/device-model/6/state token=3/1: > event epath=/local/domain/0/device-model/6/state > libxl: debug: libxl_exec.c:407:spawn_watch_event: domain 6 device > model: spawn watch p=running > libxl: debug: libxl_event.c:850:libxl__ev_xswatch_deregister: watch > w=0x3452b04520c0 wpath=/local/domain/0/device-model/6/state token=3/1: > deregister slotnum=3 > libxl: debug: libxl_exec.c:129:libxl_report_child_exitstatus: domain 6 > device model (dying as expected) [10807] died due to fatal signal > Killed > libxl: debug: libxl_event.c:863:libxl__ev_xswatch_deregister: watch > w=0x3452b04520c0: deregister unregistered > libxl: debug: libxl_qmp.c:1884:libxl__ev_qmp_send: Domain 6: ev > 0x3452b04520d8, cmd 'query-chardev' > libxl: debug: libxl_qmp.c:1324:qmp_ev_lock_aquired: Domain > 6:Connecting to /var/run/xen/qmp-libxl-6 > libxl: error: libxl_qmp.c:1402:qmp_ev_fd_callback: Domain 6:received > POLLHUP|POLLERR from QMP socket > libxl: error: libxl_qmp.c:1439:qmp_ev_fd_callback: Domain 6:Error > happened with the QMP connection to QEMU This was fixed recently in: https://lore.kernel.org/xen-devel/20250116084332.1864967-1-dwmw2@infradead.org/ However I haven't picked those up for the Xen FreeBSD package yet, will try to do tomorrow. Regards, Roger.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Z7NOemJ9GKrXPQly>