<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 10/13/2013 09:47 PM, Phil Turmel
      wrote:<br>
    </div>
    <blockquote cite="mid:525B4D29.3000405@turmel.org" type="cite">
      <pre wrap="">I use LVM for my virtual machines, but the biggest bang for the buck
comes from the <b class="moz-txt-star"><span class="moz-txt-tag">*</span>host<span class="moz-txt-tag">*</span></b> LVM.  Specifically, I create logical volumes on my
host, one per virtual disk.  The "VBoxManage" tool can create a mapping
in a tiny .vmdk file that provides 1:1 sector mapping for that virtual
hard drive into the logical volume.  This make a certain tasks absurdly
easy:

1) Resizing.  Disconnect the mapping from its VM, delete it, extend the
LV with your preferred LVM tool, recreate and reconnect the mapping.
Presto!  VM now sees larger drive just as if you had performed a
disk-to-larger-disk copy.

2) Host access.  The "kpartx" tool can see the embedded partition table
and set up device mappings to its partitions <b class="moz-txt-star"><span class="moz-txt-tag">*</span>from the host<span class="moz-txt-tag">*</span></b>.  (With the
VM shut down, of course.)  This makes it possible to scan my untrusted
VM disks for viruses (w/ clamav) <b class="moz-txt-star"><span class="moz-txt-tag">*</span>without running the VM<span class="moz-txt-tag">*</span></b>.  Or do
anything else I need with those files.</pre>
    </blockquote>
    <br>
    I do the same thing with LVM in the containers; I just have
    LVM-inside-LVM (my hosts always use LVM).&nbsp; The guests have their own
    LVMs, too; specifically, I put each guest's hard disk drives each on
    a single LV, which contains the internal LVM.&nbsp; I can get to resizing
    it from the host if I want to, but since I'm usually in the middle
    of a task, it's quicker to add a virtual HDD, integrate it, and move
    on.&nbsp; Five minutes of time required and no downtime!<br>
    <br>
    <div class="moz-signature">-- <br>
      <table border="0">
        <tbody>
          <tr>
            <td> <img src="cid:part1.08080002.09090206@naunetcorp.com"
                alt="Naunet Corporation Logo"> </td>
            <td> Michael B. Trausch<br>
              <br>
              President, <strong>Naunet Corporation</strong><br>
              &#9742; (678) 287-0693 x130 or (855) NAUNET-1 x130<br>
              FAX: (678) 783-7843<br>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>