[Fedora-xen] [f20] Problem with libvirt + Xen XL toolstack
Marco Guazzone
marco.guazzone at gmail.com
Tue Nov 11 14:50:19 UTC 2014
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
<domain type='xen'>
<name>testvm</name>
<uuid>93f08541-bfd5-4ac4-851d-c619a4516a13</uuid>
<memory unit='KiB'>3145728</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='xenfv'>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='hd'/>
<boot dev='hd'/>
</os>
<clock offset='variable' adjustment='0' basis='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<source file='/root/images/testvm.img'/>
<target dev='hda' bus='ide'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<source file='/root/iso/CentOS-7.0-1406-x86_64-Minimal.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
</disk>
<interface type='bridge'>
<mac address='00:00:00:00:00:00'/>
<source bridge='br0'/>
<script path='vif-bridge'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
</devices>
</domain>
12. Start the VM with libvirt
$ virsh create testvm.xml
BOOOM:
error: Failed to create domain from testvm.xml
error: End of file while reading data: Input/output error
error: One or more references were leaked after disconnect from the hypervisor
error: Failed to reconnect to the hypervisor
Thank you very much for your time.
Best,
-- Marco
More information about the xen
mailing list