Hide Forgot
Description of problem: I created a new KVM virtual machine, specifying a 1 TB raw image. According to the manpage for virt-install, the default is to create a sparse file, however, it creating a fully allocated file instead. Version-Release number of selected component (if applicable): 1.2.8 How reproducible: Haven't tried to reproduce it. Steps to Reproduce: virt-install --network bridge:br0 --name myVm --ram=32000 --vcpus=16 --disk /var/lib/libvirt/images/myVm.img,size=1000 --cdrom install.iso --os-type=linux --os-variant=rhel7 --graphics=spice Actual results: Creates fully allocated raw qemu disk. Expected results: Creates sparse raw qemu disk. Additional info: Both host and guest use XFS on physical partitions.
Update. I tried the same kind command, but specified sparse=true, and it created a sparse file. However, I believe this is a bug, because it doesn't follow the documented default behavior.
I can reproduce bug issue with package: virt-manager-1.4.0-2.el7.noarch virt-install-1.4.0-2.el7.noarch libvirt-2.0.0-10.el7.x86_64 qemu-kvm-rhev-2.6.0-27.el7.x86_64 steps: 1. Create a new vm with disk format=raw # virt-install --name myVm2raw --ram=2048 --vcpus=2 --disk /var/lib/libvirt/images/myVm2raw.img,size=10,format=raw --cdrom RHEL-7.3-20161019.0-Server-x86_64-dvd1.iso --os-type=linux --os-variant=rhel7 --graphics=spice 2. When installation starts, check image file. # qemu-img info /var/lib/libvirt/images/myVm2raw.img image: /var/lib/libvirt/images/myVm2raw.img file format: raw virtual size: 10G (10737418240 bytes) disk size: 10G Result: Creates fully allocated raw disk.
Upstream commit: commit b1c0a1c2d9f20bc10e426edf1972407e13a7c72c Author: Pavel Hrdina <phrdina> Date: Mon Jan 16 17:08:28 2017 +0100 virtinst/cli: set default value for disk sparse to "yes"
Try to verify this bug with new build: virt-manager-1.4.1-1.el7.noarch virt-install-1.4.1-1.el7.noarch virt-manager-common-1.4.1-1.el7.noarch libvirt-3.1.0-2.el7.x86_64 Steps: 1. Create a new vm with disk format=raw # virt-install --name myVm2raw --ram=2048 --vcpus=2 --disk /var/lib/libvirt/images/myVm2raw.img,size=10,format=raw --location http://download.eng.pek2.redhat.com/pub/rhel/released/RHEL-7/7.3-RC-3/Server/x86_64/os/ --os-type=linux --os-variant=rhel7 --graphics=spice 2. When installation starts, check image file. # qemu-img info myVm2raw.img image: myVm2raw.img file format: raw virtual size: 10G (10737418240 bytes) disk size: 1.2G Result: virt-install command creates sparse raw qemu disk by default. So move this bug from ON_QA to VERIFIED.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:2072