<div dir="ltr"><div class="gmail_default" style="color:rgb(0,102,0)"><font face="verdana, sans-serif"><br clear="all"></font></div><div><font face="verdana, sans-serif"><br></font></div><font face="verdana, sans-serif">-- <br>
<font><div style="color:rgb(0,102,0);display:inline" class="gmail_default"></div></font><span style="color:rgb(0,0,0);line-height:15px;background-color:rgb(235,236,228)">Hi. I'm running <div style="color:rgb(0,102,0);display:inline" class="gmail_default">
Ubuntu Precise </div>12.04 LTS. I created some virtual machines using vmbuilder, and then migrated those from their .qcow files to lvm. However, those virtual machines are still using disk type "file":</span><br style="color:rgb(0,0,0);line-height:15px;background-color:rgb(235,236,228)">
</font><div class="" style="margin:5px 20px 20px;padding:0px;color:rgb(0,0,0);line-height:15px;background-color:rgb(235,236,228)"><div class="" style="margin:0px;padding:0px"><font face="verdana, sans-serif">Code:</font></div>
<pre class="" style="margin-top:0px;margin-bottom:0px;padding:6px;line-height:14px;border:1px inset;overflow:scroll;direction:ltr;background-image:none;background-color:rgb(239,239,239);height:108px;background-repeat:repeat no-repeat">
<font face="verdana, sans-serif">    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/dev/vg1/lvname'/>
      <target dev='hda' bus='ide'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' unit='0'/>
    </disk></font></pre></div><font face="verdana, sans-serif"><span style="color:rgb(0,0,0);line-height:15px;background-color:rgb(235,236,228)">Now I've noticed that this disk should probably have type "block" - using this is supposed to provide superior performance. It would also make Berteaud's virt-backup script happy and willing to snapshot the lvm making the backup very quick. So I tried setting up the disk like this:</span><br style="color:rgb(0,0,0);line-height:15px;background-color:rgb(235,236,228)">
<br style="color:rgb(0,0,0);line-height:15px;background-color:rgb(235,236,228)"></font><div class="" style="margin:5px 20px 20px;padding:0px;color:rgb(0,0,0);line-height:15px;background-color:rgb(235,236,228)"><div class="" style="margin:0px;padding:0px">
<font face="verdana, sans-serif">Code:</font></div><pre class="" style="margin-top:0px;margin-bottom:0px;padding:6px;line-height:14px;border:1px inset;overflow:scroll;direction:ltr;background-image:none;background-color:rgb(239,239,239);height:96px;background-repeat:repeat no-repeat">
<font face="verdana, sans-serif"><disk type='block' device='disk'>
      <driver name='qemu' type='raw'/>
      <source dev='/dev/vg1/lvname'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk></font></pre></div><font face="verdana, sans-serif"><span style="color:rgb(0,0,0);line-height:15px;background-color:rgb(235,236,228)">I had to edit fstab to look for the disk on vda instead of hda but it came up. However performance was terrible. It seemed like it was going to lock up, although it never did.</span><br style="color:rgb(0,0,0);line-height:15px;background-color:rgb(235,236,228)">
<br style="color:rgb(0,0,0);line-height:15px;background-color:rgb(235,236,228)"><span style="color:rgb(0,0,0);line-height:15px;background-color:rgb(235,236,228)">So my question<div style="color:rgb(0,102,0);display:inline" class="gmail_default">
 is:</div></span><span style="background-color:rgb(235,236,228);color:rgb(0,0,0);line-height:15px"> <div style="color:rgb(0,102,0);display:inline" class="gmail_default"></div><b>How should I be setting up my LVM-based virtual machines to use virtio block devices ?</b></span><br>
<br style="color:rgb(0,0,0);line-height:15px;background-color:rgb(235,236,228)"><font><br></font><font>     IT Manager      978-632-1513</font><br><img src="http://www.seamanpaper.com/seamanlogo.jpg" width="200" height="45"><div style="font-family:verdana,sans-serif;color:rgb(0,102,0);display:inline" class="gmail_default">
</div></font><br>
</div>