代码改变世界

创建VM报错“Storage parameter error.”

2022-05-10 11:52  Tanwheey  阅读(289)  评论(0编辑  收藏  举报

报错“there is not enough free space on the storage pool to create the volume.”

 

 

 

 解决办法:回退选择“Select or create custom storage”,点击“Manage...”查看镜像存放位置,可以通过扩展磁盘大小。

 

 查磁盘大小,换镜像安装目录

1、df -h

 

 2、选择“Select or create custom storage”,创建并选择/home/lib/libvirt/images/rhel8.5

 

 

 

 

扩展VM空间:qemu-img resize /var/lib/libvirt/images/<virtual-disk-name>.qcow2 +195G
缩小VM空间:qemu-img resize --shrink /var/lib/libvirt/images/<virtual-disk-name>.qcow2 -195G
> /var/lib/libvirt/images is the default location for images, which
> is supported by SELinux.

It would be nice then if virt-manager defaulted to storing images there then,
rather than under $HOME.

 查看硬盘分区类型:

#fdisk -l

 

 UEFI+GPT与BIOS+MBR

最小单位

硬盘最小单位:sectors(扇区)=每个扇区512byte

系统文件最小单位:block(块)=每个块4096byte,8个连续扇区组成(默认,可以根据需求更改)

文件系统不是一个扇区一个扇区的来读数据,太慢了,所以有了block(块)的概念,它是一个块一个块的读取的,block才是文件存取的最小单位。

扇区大小:

 

块大小: