From marco.guazzone at gmail.com Tue Nov 11 14:50:19 2014 From: marco.guazzone at gmail.com (Marco Guazzone) Date: Tue, 11 Nov 2014 15:50:19 +0100 Subject: [Fedora-xen] [f20] Problem with libvirt + Xen XL toolstack Message-ID: Hello, Since when libvirt has introduced support for the Xen XL toolstack, I was unable to make it work together. With Fedora 20 x86_64, still I have problems and the only way to use libvirt+Xen is to use the old xend toolstack. Can anybody help me? Here's below is my test. Sorry, the mail is very long... 1. Disable SElinux $ vi /etc/selinux/config SELINUXTYPE=disabled 2. Install Xen and libvirt $ yum install xen $ yum install libvirt-daemon-xen libvirt-client 3. Disable Network Manager $ systemctl disable NetworkManager $ systemctl stop NetworkManager 4- Create network bridge $ vi /etc/sysconfig/network- scripts/ifcfg-br0 DEVICE=br0 TYPE=Bridge BOOTPROTO=none ONBOOT=yes IPADDR=10.10.15.2 NETMASK=255.255.255.0 STP=yes DELAY=0 DEFROUTE=yes USERCTL=no NM_CONTROLLED=no $ vi /etc/sysconfig/network-scripts/ifcfg-em2 NAME=em2 TYPE=Ethernet BOOTPROTO=none ONBOOT=yes BRIDGE=br0 PEERDNS=yes PEERROUTES=yes DEFROUTE=yes USERCTL=no NM_CONTROLLED=no 5. Enable classic networking $ systemctl enable network $ systemctl start network 6. Reboot with Xen 7. Check xend toolstack is disabled $ systemctl is-enabled xend disabled 8. Create a test VM $ qemu-img-xen create -f raw test.img 10G $ vi testvm.cfg name = "testvm" uuid = "93f08541-bfd5-4ac4-851d-c619a4516a13" builder = "hvm" maxmem = 3072 memory = 2048 vcpus = 1 on_crash = "restart" disk = [ "file:/root/images/testvm.img,hda,w", "file:/root/iso/CentOS-7.0-1406- x86_64-Minimal.iso,hdc:cdrom,r" ] vif = [ "bridge=br0,script=vif-bridge" ] boot = "cd" sdl = 0 vnc = 1 vncunused = 1 xen_platform_pci = 1 $ xl create testvm.cfg 9. Open vncviewer and perform installation 10. Shutdown just created VM 11. Create a libvirt XML file $ virsh -c xen:/// domxml-from-native xen-xm testvm.cfg > testvm.xml testvm 93f08541-bfd5-4ac4-851d-c619a4516a13 3145728 2097152 1 hvm /usr/lib/xen/boot/hvmloader destroy restart restart