Debian 8 + Xen + Virt-manager HOWTO
Rédigé par Xavier - -
Xen + libvirt is an interesting choice of toolstack, it makes network-management and guest installation easier and enables graphical remote management of the VMs. However, Debian Wheezy has several issues, I have never been able to boot something using xen + virt-manager, so I strongly recommend Jessie which is pretty stable. In this howto, I use two servers : xen-01 (for Xen + libvirt, headless) and xen-console (for virt-manager, with Xfce desktop). You can use virtual or physical machines but I had issues with VMware because Xen keeps freezing when you try to boot a domU. However, Virtualbox works fine.
Server 1 : xen-01
Install xen-hypervisor and libvirt-bin, then make Xen the default boot option in grub :
# apt-get install xen-hypervisor libvirt-bin # dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen # update-grub # reboot
The remote connection will use ssh as root, which is not permitted with Jessie. There are two solutions : either use public and private key authentication, or simply allow root password authentication in /etc/ssh/sshd_config :
PermitRootLogin yes
Don't forget to reload/restart ssh.
# service ssh restart
Server 2 : xen-console
Install virt-manager and ssh-askpass which is needed for ssh password prompt :
# apt-get install virt-manager ssh-askpass
Start virt-manager and click File then Add Connection...

Click File then New virtual machine.
In Step 1, select Network Install (HTTP, FTP, or NFS) :

In Step 2, you can use the following URL for debian wheezy : http://ftp.debian.org/debian/dists/wheezy/main/installer-amd64/

In Step 3, 256MB should be enough :

In Step 4, 10.0 GB is good :

In Step 5, give a name to your vm then click Finish.

If everything went well, your guest system should now be running :

Proceed with a normal Debian installation. Since this is a network installation, you will need a working internet access. When the installation is over, the domU (guest) will reboot and you should see a normal login prompt :
