From: Fabio Fantoni Subject: xen 4.6.0 on jessie dom0 unable to start domUs and questions about systemd and build deps Date: Sat, 10 Oct 2015 15:08:54 +0200 Message-ID: <56190DE6.5080805@m2r.biz> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080806020906020105000408" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Wei Liu , mcgrof@suse.com, Ian Jackson , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------080806020906020105000408 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Length: 13275 Content-Transfer-Encoding: quoted-printable Hi, I built xen 4.6.0 from source on jessie 64 bit system. I cleaned some deps from too many of previous systems, built successufull xen and upstream qemu with these dependencies: aptitude install build-essential git-core patch python-dev uuid-dev gettext libncurses5-dev libyajl-dev libaio-dev pkg-config libglib2.0-dev libssl-dev libpixman-1-dev bridge-utils wget bcc iasl bin86 texinfo libc6-dev-i386 e2fslibs-dev gcc-multilib gcc liblzma-dev zlib1g-dev libc6-dev libsystemd-daemon-dev # Installed seabios package from unstable # Additional qemu deps aptitude install libcurl4-openssl-dev libncurses5-dev libjpeg-dev # additional spice and usbredir deps (latest spice rebuild from unstable instead) aptitude install libspice-protocol-dev libspice-server-dev libusbredirparser-dev libusb-1.0-0-dev I have dubt about some deps not installed because not blocked by configure but that I remember was used in past, for example: bison flex binutils graphviz gawk iproute these or other deps are required even if configure don't check/stop and built successfull=3F I did these changes in Config.mk: debug =3F=3D y PYTHON_PREFIX_ARG =3F=3D configure options used: ./configure --prefix=3D/usr --disable-blktap1 --disable-qemu-traditional --disable-rombios --with-system-seabios=3D/usr/share/seabios/bios-256k.bin --with-extra-qemuu-configure-args=3D"--enable-spice --enable-usb-redir" --disable-blktap2 -enable-systemd there was an error in generated config/Tools.mk I solved manually (replacing @debug@ with y), already reported here: http://lists.xen.org/archives/html/xen-devel/2015-10/msg01184.html I enabled xen services with systemd: systemctl enable xencommons systemctl enable xendomains I missed or did wrong something=3F And used this grub entry: > menuentry 'Jessie con Linux 3.16.0-4-amd64 e XEN 4.6 - RAID' --class > debian --class gnu-linux --class gnu --class os { > set root=3D'(lvm/RAID-ROOT)' > echo 'Caricamento Hypervisor Xen 4.6...' > multiboot /boot/xen.gz placeholder dom0_mem=3D2G,max:2G > echo 'Caricamento Linux 3.16.0-4-amd64...' > module /boot/vmlinuz-3.16.0-4-amd64 placeholder > root=3D/dev/mapper/RAID-ROOT ro quiet > echo 'Caricamento ramdisk iniziale...' > module --nounzip /boot/initrd.img-3.16.0-4-amd64 > } I tried to remove swiotlb=3D65762 from kernel parameters used for year as workaround that I not remember good, should be still neded=3F DomU fails to start: > xl -vvv create /etc/xen/W10.cfg > Parsing config from /etc/xen/W10.cfg > libxl: debug: libxl_create.c:1557:do_domain_create: ao 0x1825260: > create: how=3D(nil) callback=3D(nil) poller=3D0x18252f0 > libxl: debug: libxl_device.c:269:libxl__device_disk_set_backend: Disk > vdev=3Dhda spec.backend=3Dunknown > libxl: debug: libxl_device.c:298:libxl__device_disk_set_backend: Disk > vdev=3Dhda, using backend phy > libxl: debug: libxl_device.c:269:libxl__device_disk_set_backend: Disk > vdev=3Dhdb spec.backend=3Dunknown > libxl: debug: libxl_device.c:298:libxl__device_disk_set_backend: Disk > vdev=3Dhdb, using backend phy > libxl: debug: libxl_create.c:945:initiate_domain_create: running > bootloader > libxl: debug: libxl_bootloader.c:324:libxl__bootloader_run: not a PV > domain, skipping bootloader > libxl: debug: libxl_event.c:691:libxl__ev_xswatch_deregister: watch > w=3D0x1826d28: deregister unregistered > libxl: detail: libxl_dom.c:239:hvm_set_viridian_features: base group > enabled > libxl: detail: libxl_dom.c:239:hvm_set_viridian_features: freq group > enabled > libxl: detail: libxl_dom.c:239:hvm_set_viridian_features: > time_ref_count group enabled > xc: detail: elf_parse_binary: phdr: paddr=3D0x100000 memsz=3D0x5bbc4 > xc: detail: elf_parse_binary: memory: 0x100000 -> 0x15bbc4 > xc: detail: VIRTUAL MEMORY ARRANGEMENT: > xc: detail: Loader: 0000000000100000->000000000015bbc4 > xc: detail: Modules: 0000000000000000->0000000000000000 > xc: detail: TOTAL: 0000000000000000->00000000f8000000 > xc: detail: ENTRY: 0000000000100630 > xc: detail: PHYSICAL MEMORY ALLOCATION: > xc: detail: 4KB PAGES: 0x0000000000000200 > xc: detail: 2MB PAGES: 0x00000000000003bf > xc: detail: 1GB PAGES: 0x0000000000000002 > xc: detail: elf_load_binary: phdr 0 at 0x7f0f7a73e000 -> 0x7f0f7a790151 > domainbuilder: detail: xc_dom_gnttab_hvm_seed: called, pfn=3D0x108000 > libxl: debug: libxl_device.c:269:libxl__device_disk_set_backend: Disk > vdev=3Dhda spec.backend=3Dphy > libxl: debug: libxl_event.c:639:libxl__ev_xswatch_register: watch > w=3D0x1828820 wpath=3D/local/domain/0/backend/vbd/1/768/state token=3D3/0: > register slotnum=3D3 > libxl: debug: libxl_device.c:269:libxl__device_disk_set_backend: Disk > vdev=3Dhdb spec.backend=3Dphy > libxl: debug: libxl_device.c:269:libxl__device_disk_set_backend: Disk > vdev=3Dhdb spec.backend=3Dphy > libxl: debug: libxl_event.c:639:libxl__ev_xswatch_register: watch > w=3D0x1829a30 wpath=3D/local/domain/0/backend/vbd/1/832/state token=3D2/1: > register slotnum=3D2 > libxl: debug: libxl_create.c:1580:do_domain_create: ao 0x1825260: > inprogress: poller=3D0x18252f0, flags=3Di > libxl: debug: libxl_event.c:576:watchfd_callback: watch w=3D0x1828820 > wpath=3D/local/domain/0/backend/vbd/1/768/state token=3D3/0: event > epath=3D/local/domain/0/backend/vbd/1/768/state > libxl: debug: libxl_event.c:880:devstate_callback: backend > /local/domain/0/backend/vbd/1/768/state wanted state 2 ok > libxl: debug: libxl_event.c:677:libxl__ev_xswatch_deregister: watch > w=3D0x1828820 wpath=3D/local/domain/0/backend/vbd/1/768/state token=3D3/0: > deregister slotnum=3D3 > libxl: debug: libxl_device.c:937:device_backend_callback: calling > device_backend_cleanup > libxl: debug: libxl_event.c:691:libxl__ev_xswatch_deregister: watch > w=3D0x1828820: deregister unregistered > libxl: error: libxl.c:1972:libxl__get_domid: failed to get own domid > (domid) > libxl: error: libxl_device.c:987:device_hotplug: Failed to get domid > libxl: debug: libxl_event.c:691:libxl__ev_xswatch_deregister: watch > w=3D0x1828920: deregister unregistered > libxl: debug: libxl_event.c:545:watchfd_callback: watch > epath=3D/local/domain/0/backend/vbd/1/768/state token=3D3/0: empty slot > libxl: debug: libxl_event.c:576:watchfd_callback: watch w=3D0x1829a30 > wpath=3D/local/domain/0/backend/vbd/1/832/state token=3D2/1: event > epath=3D/local/domain/0/backend/vbd/1/832/state > libxl: debug: libxl_event.c:884:devstate_callback: backend > /local/domain/0/backend/vbd/1/832/state wanted state 2 still waiting > state 1 > libxl: debug: libxl_event.c:576:watchfd_callback: watch w=3D0x1829a30 > wpath=3D/local/domain/0/backend/vbd/1/832/state token=3D2/1: event > epath=3D/local/domain/0/backend/vbd/1/832/state > libxl: debug: libxl_event.c:880:devstate_callback: backend > /local/domain/0/backend/vbd/1/832/state wanted state 2 ok > libxl: debug: libxl_event.c:677:libxl__ev_xswatch_deregister: watch > w=3D0x1829a30 wpath=3D/local/domain/0/backend/vbd/1/832/state token=3D2/1: > deregister slotnum=3D2 > libxl: debug: libxl_device.c:937:device_backend_callback: calling > device_backend_cleanup > libxl: debug: libxl_event.c:691:libxl__ev_xswatch_deregister: watch > w=3D0x1829a30: deregister unregistered > libxl: error: libxl.c:1972:libxl__get_domid: failed to get own domid > (domid) > libxl: error: libxl_device.c:987:device_hotplug: Failed to get domid > libxl: debug: libxl_event.c:691:libxl__ev_xswatch_deregister: watch > w=3D0x1829b30: deregister unregistered > libxl: error: libxl_create.c:1174:domcreate_launch_dm: unable to add > disk devices > libxl: error: libxl_dm.c:1956:kill_device_model: unable to find device > model pid in /local/domain/1/image/device-model-pid > libxl: error: libxl.c:1628:libxl__destroy_domid: > libxl__destroy_device_model failed for 1 > libxl: error: libxl.c:1972:libxl__get_domid: failed to get own domid > (domid) > libxl: error: libxl_device.c:795:libxl__initiate_device_remove: unable > to get my domid > libxl: debug: libxl_event.c:691:libxl__ev_xswatch_deregister: watch > w=3D0x182baa0: deregister unregistered > libxl: error: libxl.c:1972:libxl__get_domid: failed to get own domid > (domid) > libxl: error: libxl.c:1972:libxl__get_domid: failed to get own domid > (domid) > libxl: error: libxl_device.c:795:libxl__initiate_device_remove: unable > to get my domid > libxl: debug: libxl_event.c:691:libxl__ev_xswatch_deregister: watch > w=3D0x182bd90: deregister unregistered > libxl: error: libxl.c:1972:libxl__get_domid: failed to get own domid > (domid) > libxl: error: libxl.c:1665:devices_destroy_cb: libxl__devices_destroy > failed for 1 > libxl: debug: libxl.c:1719:devices_destroy_cb: forked pid 1009 for > destroy of domain 1 > libxl: debug: libxl_event.c:1874:libxl__ao_complete: ao 0x1825260: > complete, rc=3D-3 > libxl: debug: libxl_event.c:1843:libxl__ao__destroy: ao 0x1825260: destroy > libxl: debug: libxl.c:1458:libxl_domain_destroy: ao 0x18290e0: create: > how=3D(nil) callback=3D(nil) poller=3D0x18252f0 > libxl: error: libxl.c:1591:libxl__destroy_domid: non-existant domain 1 > libxl: error: libxl.c:1549:domain_destroy_callback: unable to destroy > guest with domid 1 > libxl: error: libxl.c:1476:domain_destroy_cb: destruction of domain 1 > failed > libxl: debug: libxl_event.c:1874:libxl__ao_complete: ao 0x18290e0: > complete, rc=3D-21 > libxl: debug: libxl.c:1467:libxl_domain_destroy: ao 0x18290e0: > inprogress: poller=3D0x18252f0, flags=3Dic > libxl: debug: libxl_event.c:1843:libxl__ao__destroy: ao 0x18290e0: destroy > xc: debug: hypercall buffer: total allocations:977 total releases:977 > xc: debug: hypercall buffer: current allocations:0 maximum allocations:3 > xc: debug: hypercall buffer: cache current size:3 > xc: debug: hypercall buffer: cache hits:967 misses:3 toobig:7 In attachment domU xl cfg. Xen service seems started: > systemctl status xencommons > =E2 xencommons.service - LSB: Start/stop xenstored and xenconsoled > Loaded: loaded (/etc/init.d/xencommons) > Active: active (running) since sab 2015-10-10 14:23:40 CEST; 29min ago > Process: 761 ExecStart=3D/etc/init.d/xencommons start (code=3Dexited, > status=3D0/SUCCESS) > CGroup: /system.slice/xencommons.service > =E2=E2859 /usr/sbin/xenconsoled --pid-file=3D/var/run/xenconsoled.pid > =E2=E2917 /usr/lib/xen/bin/qemu-system-i386 -xen-domid 0 > -xen-attach -name dom0 -nographic -M xenpv -daemonize -monitor > /dev/null -serial /dev/null -parallel /dev/null ... > > ott 10 14:23:36 univirt xencommons[761]: Starting xenconsoled... > ott 10 14:23:36 univirt xencommons[761]: Starting QEMU as disk backend > for dom0 > systemctl status xendomains > =E2 xendomains.service - Xendomains - start and stop guests on boot and > shutdown > Loaded: loaded (/usr/lib/systemd/system/xendomains.service; enabled) > Active: active (exited) since sab 2015-10-10 14:23:37 CEST; 30min ago > Process: 851 ExecStart=3D/usr/lib/xen/bin/xendomains start > (code=3Dexited, status=3D0/SUCCESS) > Process: 849 ExecStartPre=3D/bin/grep -q control_d > /proc/xen/capabilities (code=3Dexited, status=3D0/SUCCESS) > Main PID: 851 (code=3Dexited, status=3D0/SUCCESS) > CGroup: /system.slice/xendomains.service But there are strange things: > xl list > Name ID Mem VCPUs State Time(s) > (null) 0 2048 8 r----- > 15.3 and: > xenstore-ls > tool =3D "" > xenstored =3D "" > local =3D "" > domain =3D "" > 0 =3D "" > device-model =3D "" > 0 =3D "" > state =3D "running" > backend =3D "" > vbd =3D "" > 1 =3D "" > 768 =3D "" > frontend =3D "/local/domain/1/device/vbd/768" > params =3D "/mnt/vm/disks/W10.disk1.xm" > script =3D "/etc/xen/scripts/block" > frontend-id =3D "1" > online =3D "1" > removable =3D "0" > bootable =3D "1" > state =3D "6" > dev =3D "hda" > type =3D "phy" > mode =3D "w" > device-type =3D "disk" > discard-enable =3D "1" > 832 =3D "" > frontend =3D "/local/domain/1/device/vbd/832" > params =3D "/mnt/vm/iso/Windows10pro64bit.iso" > script =3D "/etc/xen/scripts/block" > frontend-id =3D "1" > online =3D "1" > removable =3D "1" > bootable =3D "1" > state =3D "6" > dev =3D "hdb" > type =3D "phy" > mode =3D "r" > device-type =3D "cdrom" > discard-enable =3D "0" > vm =3D "" > libxl =3D "" data about a domU not started correctly... I not understand what is exactly is wrong. Checking xen services I found a xendriverdomain service added recently but not in systemd: http://xenbits.xen.org/gitweb/=3Fp=3Dxen.git;a=3Dcommit;h=3D2909ad4c96ba5527b35ac87c089116cd0320a5e7 is this needed but missed in systemd support=3F Thanks for any reply and sorry for my bad english. --------------080806020906020105000408 Content-Type: text/plain; charset=UTF-8; name="W10.cfg" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="W10.cfg" name='W10' builder="hvm" #device_model_override="/usr/lib/xen/bin/qemu-gdb" memory=4096 vcpus=2 acpi_s3=0 acpi_s4=0 #hdtype="ahci" vif=['bridge=xenbr0,mac=00:16:3e:fe:7a:b9'] disk=['/mnt/vm/disks/W10.disk1.xm,raw,hda,rw','/mnt/vm/iso/Windows10pro64bit.iso,raw,hdb,ro,cdrom'] #disk=['/mnt/vm/disks/W10.disk1.cow-sn1,qcow2,hda,rw',',raw,hdb,ro,cdrom'] boot='cd' device_model_version="qemu-xen" viridian=1 xen_platform_pci=1 vnc=0 keymap="it" on_crash="destroy" vga="qxl" spice=1 spicehost='0.0.0.0' spiceport=6000 spicedisable_ticketing=1 spicevdagent=1 spice_clipboard_sharing=0 spiceusbredirection=4 soundhw="hda" localtime=1 #usbversion=3 ms_vm_genid="generate" device_model_args=["-trace","events=/etc/xen/qemu-trace-options"] --------------080806020906020105000408 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --------------080806020906020105000408--