<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Hi,<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">We are running on CentOS 7.0. We want to move our VMs (kvm/qemu) from qcow/image files to logical volumes under LVM. <br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">I have moved one of them but I had a little trouble editing the disk properly and I wonder what is the correct way to do it. Specifically, in the XML under the devices/disk section why does the source say "<span style="font-family:monospace,monospace">source file=</span>", and not "<span style="font-family:monospace,monospace">source dev=</span>"?  The reason I ask is that I have a number of other machines to move and I don't want to mess them up.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">The source file entry for the disk was like this in our xml file:      <span style="font-family:monospace,monospace"> <source file='/var/lib/libvirt/images/pxetest.qcow2'/></span><br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">I got the vm to work by converting the image to raw, then dumping via dd into the LV, and editing the XML using virsh as follows:<br><span style="font-family:monospace,monospace">    <disk type='file' device='disk'><br>      <driver name='qemu' type='raw' cache='none'/><br>      <<b>source file</b>='/dev/kvm_temp/pxetest'/><br>      <target dev='vda' bus='virtio'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/><br>    </disk></span><br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">By comparison I have a test machine on another real host upon which I loaded a VM and put its disk into a logical volume. Its disk section looks like this:<br><span style="font-family:monospace,monospace"><br>    <disk type='block' device='disk'><br>      <driver name='qemu' type='raw' cache='none' io='native'/><br>      <<b>source dev</b>='/dev/kvm_hosts/pxetest2'/><br>      <target dev='hda' bus='ide'/><br>      <address type='drive' controller='0' bus='0' target='0' unit='0'/><br>    </disk></span><br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">The source file / source dev thing really has me wondering.<br></div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><span style="color:rgb(11,83,148)"><span style="background-color:rgb(255,255,255)"><font face="courier new,monospace"><br></font><b><font face="courier new,monospace">- Mike Schwager<br></font></b></span></span></div><span style="color:rgb(11,83,148)"><span style="background-color:rgb(255,255,255)"><b><font face="courier new,monospace">  Linux Network Engineer, Mocho Trading LLC<br></font></b></span></span></div><font face="courier new,monospace"><br></font><div><div><font face="courier new,monospace"><br></font></div></div></div></div></div></div></div></div></div>
</div>

<br>
This message is for the named person(s) use only. It may contain confidential proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Mocho Trading LLC reserves the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity.