Im on a Thinkpad E431 with i7 processor and [MemTotal: 11679824 kB]
Im with Debian 9 Stretch with kernel 4.9.0-3-amd64 without LVM
Im used to VirtualBox that is simple and functional but I need now the nested vm feature that there is not in VirtualBox.
I need only a Windows 10 Enterprise VM with a lot of containers and others VMs nested to use as development environment.
The nested vm feature is present on Xen and its how Im installing it most complete possible on a fresh Debian:

su  
apt-get update  
apt-get upgrade  
apt-get dist-upgrade  
apt-get install linux-headers-$(uname -r) build-essential  
apt-get install pulseaudio pulseaudio-module-bluetooth pavucontrol bluez-firmware blueman  
apt-get install tmux tree galculator net-tools sudo  
sudo adduser myuser sudo  
uname -r  
[ -d /sys/firmware/efi ] && echo Xen fail under UEFI || echo Xen works under BIOS  
sudo apt-get install firmware-linux-nonfree e2fslibs-dev  
sudo shutdown -r now  
sudo apt-get install uml-utilities vde2 bridge-utils samba openvswitch-switch  
sudo adduser myuser vde2-net  
sudo adduser root vde2-net  
sudo shutdown -r now  
# The following packages replaces libvirt-bin:  libvirt-daemon-system libvirt-dev libvirt-clients  
sudo apt-get install qemu qemu-block-extra qemu-guest-agent kvm qemu-kvm qemu-system qemu-system-arm qemu-system-common qemu-system-mips qemu-system-misc qemu-system-ppc qemu-system-sparc qemu-system-x86 qemu-user binfmt-support qemu-user-static qemu-utils libvirt-daemon libvirt-daemon-system libvirt-dev libvirt-clients libvirt-daemon-system libvirt-clients virtinst virt-viewer seabios sgabios ovmf debootstrap xen-system-amd64 xen-linux-system-amd64 xen-hypervisor-4.8-amd64 libxen-4.8 libxen-dev libxenstore3.0 xen-utils-4.8 xen-utils-common xenstore-utils xen-tools virt-manager  
sudo ln -sf /usr/bin/qemu-* /usr/lib/xen-4.8/bin/  
sudo adduser myuser libvirt  
sudo adduser myuser libvirt-qemu  
sudo adduser root libvirt  
sudo adduser root libvirt-qemu  

As you can see im installing the packages indicated on:
libvirtError: operation failed: could not query memory balloon allocation
and to test the another recommendation there i tried install the damnsmalllinux with 1000 of RAM and the error was the same.
The error is:

Unable to complete install: 'operation failed: Failed to balloon domain0 memory'

Traceback (most recent call last):  
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 88, in cb_wrapper callback(asyncjob, *args, **kwargs)  
  File "/usr/share/virt-manager/virtManager/create.py", line 2288, in _do_async_install guest.start_install(meter=meter)  
  File "/usr/share/virt-manager/virtinst/guest.py", line 461, in start_install doboot, transient)  
  File "/usr/share/virt-manager/virtinst/guest.py", line 396, in _create_guest self.domain = self.conn.createXML(install_xml or final_xml, 0)  
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3523, in createXML if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)  
libvirtError: operation failed: Failed to balloon domain0 memory

Im searching a lot and trying improve the script above for more than a week before ask here.
I was with another error before making, as you can see on script above, the links of qemu files inside xen folder.
What im doing wrong ?

closed as off-topic by Michael Hampton Feb 3 at 23:28

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – Michael Hampton
If this question can be reworded to fit the rules in the help center, please edit the question.

On last release there is a bug, the team is working hard to solve but today is impossible install XEN on Debian, I advise you reinstall a fresh Debian and use Virtualbox without nested virtualization or migrate to Windows, Windows today is very stable and there is Hyper-V with native nested virtualization.

You can use Qubes too, its a linux with Xen packaging, a type of “Xen distribution” with security by compartmentalization principle.
After install this OS you will have a working Xen platform and will be able to deal with your nested vm need configuration.

See this issue: issue on github

I also got the error Failed to balloon domain0 memory when using virt-manager to connect to a Xen server with a Debian dom0.

I was able to fix this by forcing my dom0 to use a lower amount of memory during boot. This is also mentioned in debian wiki.

Edit /etc/default/grub.d/xen.cfg and add the following line:

GRUB_CMDLINE_XEN="dom0_mem=1024M,max:1024M"

Then run update-grub to apply the changes and reboot the system. This will set the default memory to 1024MB and also limit it to 1024MB. After the reboot I was able to create virtual machine using virt-manager.

You dont need migrate to windows to have nested virt. as @MarkJoe stated, just install VMware Player, that is free, and configure nested virt. there like this:

settings screen

The link above is for CentOS but can be installed on any Linux

Not the answer you're looking for? Browse other questions tagged or ask your own question.