On 10/10/2011 03:52 PM, Alex wrote:
I made this change by editing the xml, restarting libvirtd, then
using
virsh to define the xml file and received this message:
virsh # define /etc/libvirt/qemu/bwimail02.xml
error: Failed to define domain from /etc/libvirt/qemu/bwimail02.xml
error: missing source information for device vda
Have I done something wrong, or am I missing something?
Yes, you goofed by directly editing /etc/libvirt. By doing that, you
are going behind libvirt's back - if your edits happen to work, then a
libvirtd restart will use them, but if you introduce a typo or other
problem, then it is your fault that libvirt can't get things to work.
If you had instead gone through the libvirt API (such as by using 'virsh
edit bwimail02'), then libvirt would do some sanity checking up front
and refuse to install your changes unless they were safe.
That said, your typo:
<source dev='/dev/server02_vg1_2tb/lv_vm03_swap'/>
is that you used <source dev=/> instead of <source file=/>. Even if the
source is a raw block device on the host, you still call it out using
file= in the xml.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org