Description of problem: After creating a virtual machine with the GUI it fails to be created in xen. Here is a dump of the log: Sun, 09 Dec 2007 10:32:05 DEBUG Creating guest from '<domain type='xen'> <name>fff</name> <currentMemory>1048576</currentMemory> <memory>1048576</memory> <uuid>b56c5dfe-cf11-4d07-2c87-de3f8b506a63</uuid> <os> <type>hvm</type> <loader>/usr/lib/xen/boot/hvmloader</loader> <boot dev='cdrom'/> </os> <features> <apic/><acpi/><pae/> </features> <on_poweroff>destroy</on_poweroff> <on_reboot>destroy</on_reboot> <on_crash>destroy</on_crash> <vcpu>2</vcpu> <devices> <emulator>/usr/lib64/xen/bin/qemu-dm</emulator> <console device='pty'/> <disk type='block' device='disk'> <source dev='/dev/LVM_XEN_OS/fail_over_os'/> <target dev='hda'/> </disk> <disk type='file' device='cdrom'> <source file='/mnt/isos/ISO's/Microsoft/Windows/Server STD 2003 R2 SP2/Disk1a.iso'/> <target dev='hdc'/> <readonly/> </disk> <interface type='bridge'> <source bridge='xenbr0'/> <mac address='00:16:3e:77:26:ed'/> </interface> <graphics type='vnc' port='-1' keymap='en-us' /> </devices> </domain> ' Sun, 09 Dec 2007 10:32:05 ERROR Unable to complete install 'libvirt.libvirtError virDomainCreateLinux() failed XML description for domain is not well formed or invalid Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/create.py", line 681, in do_install dom = guest.start_install(False, meter = meter) File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 649, in start_install return self._do_install(consolecb, meter) File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 666, in _do_install self.domain = self.conn.createLinux(install_xml, 0) File "/usr/lib64/python2.4/site-packages/libvirt.py", line 503, in createLinux if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self) libvirtError: virDomainCreateLinux() failed XML description for domain is not well formed or invalid ' I have fully updated the machine using RHN. Version-Release number of selected component (if applicable): RHEL5.1 fully patched How reproducible: Everytime Steps to Reproduce: Install RHEL5.1 Update using RHN Create VM Actual results: virt-manager aborts the create with above error Expected results: vm should be created Additional info:
Hi Guys, Forgot to add... If I copy and paste that "config" into a file and ask xen to start it it fails as below: xm create w2k3.cfg Using config file "./w2k3.cfg". Error: Errors were found at line 1 while processing ./w2k3.cfg: <domain type='xen'>
Your problem is that the directory containing your ISO image has a single quote character in the path. This results in malformed XML: <source file='/mnt/isos/ISO's/Microsoft/Windows/Server STD 2003 R2 SP2/Disk1a.iso'/> Now, virt-manager /virt-install should take care of escaping any embedded quotes (or other special XML characters), so we need to fix this bug. In the meantime though, the workaround is trivial - name your directories sanely - ie don't have quotes in the directory names. BTW, wrt the 'xm' command - that expects a different format of config - if you want to create domains using XML, you should instead use 'virsh create [xmlfile]' - see 'man virsh' for more details on that option - of course you still need to remove the quote character from the directory name & XML before it'll work with virsh.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
Thanks - I dont know why, but i moved the ISO to another directory and manually editted the file. all is fine as you expected :) Thanks !
oh - sorry - and confirmed it works with virt-manager
Created attachment 291174 [details] Escape quotes in disk paths
Created attachment 291175 [details] Escape & and ' in XML attrs Uploaded wrong patch before, this is correct one.
Available in python-virtinst 0.300.2-1.el5
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2008-0371.html