-
-
Save JPalmerGithub/e32b0dc0ff2783278b6e1fcdd5f82c8c to your computer and use it in GitHub Desktop.
Revisions
-
plembo revised this gist
Aug 29, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ $ virsh pool-list --all **NOTE: If a default pool already exists, follow [this gist](https://gist.github.com/plembo/5e108dc8000850442d756fc3747d31a3) to relocate it to your preferred storage volume.** Assuming no pre-existing default pool exists and you want the physical path of the new pool to be /data1/libvirt/images, create that directory (```sudo mkdir -p /data1/libvirt/images```) and run the following commands: ```bash $ virsh pool-define-as default dir --target "/data1/libvirt/images" -
plembo revised this gist
Aug 29, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,6 +9,8 @@ $ virsh pool-list --all ----------------------------- ``` **NOTE: If a default pool already exists, follow [this gist](https://gist.github.com/plembo/5e108dc8000850442d756fc3747d31a3) to relocate it to your preferred storage volume.** Assuming you want the physical path of the new pool to be /data1/libvirt/images, create that directory (```sudo mkdir -p /data1/libvirt/images```) and run the following commands: ```bash -
plembo revised this gist
Aug 29, 2022 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,13 +13,12 @@ Assuming you want the physical path of the new pool to be /data1/libvirt/images, ```bash $ virsh pool-define-as default dir --target "/data1/libvirt/images" $ virsh pool-build default $ virsh pool-start default $ virsh pool-autostart default ``` Check the status with virsh-info: ```bash $ virsh pool-info default Name: default @@ -32,7 +31,7 @@ Allocation: 1.15 GiB Available: 914.66 GiB ``` And then the configuration with pool-dumpxml: ```xml $ virsh pool-dumpxml default -
plembo revised this gist
Aug 29, 2022 . 1 changed file with 29 additions and 29 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,47 +9,47 @@ $ virsh pool-list --all ----------------------------- ``` Assuming you want the physical path of the new pool to be /data1/libvirt/images, create that directory (```sudo mkdir -p /data1/libvirt/images```) and run the following commands: ```bash $ virsh pool-define-as default dir --target "/data1/libvirt/images" $ virsh pool-define-as default dir --target "/data1/libvirt/images" $ virsh pool-build default $ virsh pool-start default $ virsh pool-autostart default ``` Check the configuration with virsh-info: ```bash $ virsh pool-info default Name: default UUID: 8b806f67-87b4-403b-ae64-c652c0764641 State: running Persistent: yes Autostart: yes Capacity: 915.82 GiB Allocation: 1.15 GiB Available: 914.66 GiB ``` And then with pool-dumpxml: ```xml $ virsh pool-dumpxml default <pool type='dir'> <name>default</name> <uuid>8b806f67-87b4-403b-ae64-c652c0764641</uuid> <capacity unit='bytes'>983349346304</capacity> <allocation unit='bytes'>1238208512</allocation> <available unit='bytes'>982111137792</available> <source> </source> <target> <path>/d1/libvirt/images</path> <permissions> <mode>0755</mode> <owner>0</owner> <group>0</group> </permissions> </target> </pool> -
plembo renamed this gist
Aug 29, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Create the default KVM storage pool for images Some distributions create the defaut KVM (libvirtd) storage pool for images when they install KVM, others do this upon the creation of the first KVM guest. Creating the default pool from scratch is pretty straightforward. Here's how to do it with virsh. First verify there is no existing default pool: -
plembo revised this gist
Aug 29, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -52,4 +52,4 @@ Compare this with a pool definition generated on the creation of the first image </target> </pool> ``` You'll notice right away that there a few things missing here, like the capacity values and permissions for the directory. Everything should work without these, but what I do is edit the definition to at least set up the permissions. -
plembo revised this gist
Aug 29, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ # Relocate the default KVM storage pool for images Some distributions create the defaut KVM (libvirtd) storage pool for images when they install KVM, others do this upon the creation of the first KVM guest. Creating the default pool from scratch is pretty straightforward. Here's how to do it with virsh. First verify there is no existing default pool: -
plembo renamed this gist
Aug 29, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Relocate the default KVM storage pool for images Some distributions create the defaut KVM (libvirt) storage pool for images when they install KVM, others do this upon the creation of the first KVM guest. Creating the default pool from scratch is pretty straightforward. Here's how to do it with virsh. First verify there is no existing default pool: -
plembo revised this gist
Aug 29, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Change the location of the default KVM storage pool for images Some distributions create the defaut KVM (libvirt) storage pool for images when they install KVM, others do this upon the creation of the first KVM guest. Creating the default pool from scratch is pretty straightforward. Here's how to do it with virsh. First verify there is no existing default pool: -
plembo revised this gist
Aug 29, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Change the default KVM storage pool for images Some distributions create the defaut KVM (libvirt) storage pool for images when they install KVM, others do this upon the creation of the first KVM guest. Creating the default pool from scratch is pretty straightforward. Here's how to do it with virsh. First verify there is no existing default pool: -
plembo revised this gist
Aug 28, 2022 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,7 +27,7 @@ $ virsh pool-dumpxml default <source> </source> <target> <path>/data1/libvirt/images</path> </target> </pool> ``` @@ -43,7 +43,7 @@ Compare this with a pool definition generated on the creation of the first image <source> </source> <target> <path>/data1/libvirt/images</path> <permissions> <mode>0711</mode> <owner>64055</owner> @@ -53,4 +53,3 @@ Compare this with a pool definition generated on the creation of the first image </pool> ``` You'll notice right away that there a few things missing here, like the capacity values and permissions for the directory. Things should work without these, but what I do is edit the definition to at least set up the permissions. -
plembo created this gist
Jul 16, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,56 @@ # Create the default KVM storage pool for images Some distributions create the defaut KVM (libvirt) storage pool for images when they install KVM, others do this upon the creation of the first KVM guest. Creating the default pool from scratch is pretty straightforward. Here's how to do it with virsh. First verify there is no existing default pool: ``` $ virsh pool-list --all Name State Autostart ----------------------------- ``` Assuming you want the physical path of the new pool to be /data1/libvirt/images, create that directory (```sudo mkdir -p /data1/libvirt/images```) and run the following command: ``` $ virsh pool-define-as default dir --target /data1/libvirt/images ``` Check the configuration: ```xml $ virsh pool-dumpxml default <pool type='dir'> <name>default</name> <uuid>a93c414a-5380-4f53-8236-a28b6d1e2ee8</uuid> <capacity unit='bytes'>0</capacity> <allocation unit='bytes'>0</allocation> <available unit='bytes'>0</available> <source> </source> <target> <path>/d1/libvirt/images</path> </target> </pool> ``` Compare this with a pool definition generated on the creation of the first image on another machine: ```xml <pool type='dir'> <name>default</name> <uuid>63eb0fa4-6b1e-40e2-92cf-41dced138fc7</uuid> <capacity unit='bytes'>3937758330880</capacity> <allocation unit='bytes'>836987985920</allocation> <available unit='bytes'>3100770344960</available> <source> </source> <target> <path>/d1/libvirt/images</path> <permissions> <mode>0711</mode> <owner>64055</owner> <group>108</group> </permissions> </target> </pool> ``` You'll notice right away that there a few things missing here, like the capacity values and permissions for the directory. Things should work without these, but what I do is edit the definition to at least set up the permissions.