存储池-
显示卷和池的信息
[root@kvm1 ~]# virsh
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # pool-list --help
NAME
pool-list - list pools
SYNOPSIS
pool-list [--inactive] [--all] [--transient] [--persistent] [--autostart] [--no-autostart] [--type <string>] [--details] [--uuid] [--name]
DESCRIPTION
Returns list of pools.
OPTIONS
--inactive list inactive pools
--all list inactive & active pools
--transient list transient pools
--persistent list persistent pools
--autostart list pools with autostart enabled
--no-autostart list pools with autostart disabled
--type <string> only list pool of specified type(s) (if supported)
--details display extended details for pools
--uuid list UUID of active pools only
--name list name of active pools only
virsh # pool-list
Name State Autostart
-------------------------------------------
default active yes
iso active yes
vm active yes
virsh # pool-info vm
Name: vm
UUID: 90b41c50-7235-4083-bbe3-ccf19d5493f2
State: running
Persistent: yes
Autostart: yes
Capacity: 98.30 GiB
Allocation: 3.12 GiB
Available: 95.18 GiB
virsh #
基于目录的存储池
准备目录
设置目录权限
[root@kvm1 /]# mkdir guest_images
[root@kvm1 /]# chown root:root /guest_images/
[root@kvm1 /]# chmod 700 /guest_images/
[root@kvm1 /]# ll
[root@kvm1 /]# ls -la /guest_images/
total 0
drwx------ 2 root root 6 Jun 8 20:40 .
dr-xr-xr-x. 20 root root 285 Jun 8 20:40 ..
[root@kvm1 /]# ll -laZ /guest_images/
drwx------ root root ? .
dr-xr-xr-x. root root system_u:object_r:root_t:s0 ..
[root@kvm1 /]# semanage fcontext -a -t virt_image_t '/guest_images(/*)?'
[root@kvm1 /]# ll -laZ /guest_images/
drwx------ root root ? .
dr-xr-xr-x. root root system_u:object_r:root_t:s0 ..
[root@kvm1 /]#

浙公网安备 33010602011771号