Description of problem: On Fedora26 xen host, 'virsh' cannot create xen hvm guest with "MB" and "GB" unit. There is no problem to pass "KiB", "MiB" or "GiB" as memory unit to create guest. Here is the doc link of configure file, it should support pass "MB" or "GB" as memory unit. https://libvirt.org/formatdomain.html#elementsMemoryAllocation Here is error messages: [root@dell-per415-02 fedora26]# virsh create guest2_fedora26_alpha.xml error: Failed to create domain from guest2_fedora26_alpha.xml error: internal error: libxenlight failed to create new domain 'guest2_fedora26' [root@dell-per415-02 libxl]# tail /var/log/libvirt/libxl/libxl-driver.log 2017-06-11 14:31:10.699+0000: xc: panic: xc_dom_boot.c:141: xc_dom_boot_mem_init: can't allocate low memory for domain: Out of memory 2017-06-11 14:31:10.699+0000: libxl: libxl_dom.c:653:libxl__build_dom: xc_dom_boot_mem_init failed: No such file or directory 2017-06-11 14:31:10.699+0000: libxl: libxl_create.c:1223:domcreate_rebuild_done: cannot (re-)build domain: -3 [root@dell-per415-02 fedora26]# grep 'memory' guest2_fedora26_alpha.xml <memory unit='MB'>1000</memory> Version-Release number of selected component (if applicable): Fedora 26 latest xen version(xen-4.8.1-2.fc26.x86_64) RHEL Version: N/A How reproducible: 100% Steps to Reproduce: 1. Install Fedora 26 Alpha release and xen packages. 2. Upgrade xen to the latest version. 2. Boot into xen environment and create the hvm guest configuration. 3. Change memory unit to "MB". 4. Create guest via "virsh create xxxx.xml". Actual results: The guest failed to be created. Expected results: The guest should be able to be started normally. Additional info: Some packages information: [root@dell-per415-02 fedora26]# rpm -qa|egrep "xen-4|libvirt-3|kernel-4" kernel-4.11.0-0.rc3.git0.2.fc26.x86_64 libvirt-3.2.1-1.fc26.x86_64 xen-4.8.1-2.fc26.x86_64 Verified it on RHEL7.3 kvm host, cannot reproduce such problem when passed "MB" to create kvm guest. libvirt-2.0.0-10.el7.x86_64
What is the XML after you did 'virsh edit'? Please provide the dumpxml after that The 'units' parameter seems to be 'write only' at least in my testing, and should be converted to KiB the next time you read the XML. Is it possible your memory setting is too large for the host?
Created attachment 1295845 [details] virsh dumpxml file
(In reply to Cole Robinson from comment #1) > What is the XML after you did 'virsh edit'? Please provide the dumpxml after > that > > The 'units' parameter seems to be 'write only' at least in my testing, and > should be converted to KiB the next time you read the XML. Yes. It converts the 'GiB' to "KiB" when I use 'virsh edit' or dumpxml to see the configuration. >Is it possible > your memory setting is too large for the host? No. I just set 1 GB in my testing, and there is enough memory on the host. As it is ok on KVM host, the configuration format should be correct and supported.
Okay so this isn't related to the units= parameter specifically, just that for whatever reason a xen VM with 1GB is failing with: 2017-06-11 14:31:10.699+0000: xc: panic: xc_dom_boot.c:141: xc_dom_boot_mem_init: can't allocate low memory for domain: Out of memory The memory model of kvm vs xen is quite different so you can't necessarily expect that the same memory amount will be accepted by both. How much total memory does your machine have? There's some debugging ideas here for a similar report on a xen list: https://lists.xenproject.org/archives/html/xen-users/2015-02/msg00028.html
Closing since I presume this is just due to low VM memory situation as mentioned in Comment #4, please reopen if you think otherwise