Adding an alternative storage pool

by mandel on January 10th, 2012

This is here for me to remember the next time I need to do this task:

  1. Copy the default pool definition:

    virsh pool-dumpxml default > pool.xml
  2. edit pool.xml changing the following vars:

    <pool type='dir'>
      <name>{$name}</name>
      <uuid>{$id}</uuid>
      <capacity>43544694784</capacity>
      <allocation>30412328960</allocation>
      <available>13132365824</available>
      <source>
      </source>
      <target>
        <path>{$path}</path>
        <permissions>
          <mode>0700</mode>
          <owner>-1</owner>
          <group>-1</group>
        </permissions>
      </target>
    </pool>
  3. virsh pool-create pool.xml
  4. virsh pool-refresh name

Doing the above you can add a new pool, for example one that is not in you ssd.