Virsh Verzeichnis Pool

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen

Verzeichnis erstelle

  • sudo mkdir -p /mnt/data/images

Virsh XML Definition

  • cat virsh-dir.xml
<pool type="dir">
  <name>images-on-doom</name>
  <target>
    <path>/mnt/data/images</path>
  </target>
</pool>

Pool definieren

  • virsh pool-define virsh-dir.xml

Pools listen

  • virsh pool-list --all
 Name                 State      Autostart
-------------------------------------------
 default              active     yes
 images-on-doom       inactive   no

Pool aktivieren

  • virsh pool-start images-on-doom

Pool für den Autostart markieren

  • virsh pool-autostart images-on-doom

Pools listen

  • virsh pool-list --all
 Name                 State      Autostart
-------------------------------------------
 default              active     yes
 images-on-doom       active     yes

Dump Pool

  • virsh pool-dumpxml images
<pool type='dir'>
  <name>images</name>
  <uuid>fd376830-81e6-4c85-a827-d710106d7bc2</uuid>
  <capacity unit='bytes'>98293264384</capacity>
  <allocation unit='bytes'>46400319488</allocation>
  <available unit='bytes'>51892944896</available>
  <source>
  </source>
  <target>
    <path>/var/lib/libvirt/images</path>
    <permissions>
      <mode>0711</mode>
      <owner>0</owner>
      <group>0</group>
    </permissions>
  </target>
</pool>

Destroy

  • virsh pool-destroy images
Pool images zerstört

Undefine

  • virsh pool-undefine images
Pool images wurde zurücksetzt