Hide Forgot
We have a virtual machine guest running on CentOS-7 KVM that is taking more disk space than the pre-allocated space, guest was made through Virt-Manager. Now, there is almost no space left on the hypervisor. Guest has 12TB encrypted /opt partition but actual use is 1 TB. Hypervisor had 14TB which now used by the guest qcow2 image. Both hypervisor and guest are CentOS-7. Guest currently has no snapshot either. I recently come across virt-sparsify tool, but when using "virt-sparsify --in-place some.qcow2 --key" it is not asking for key. I am hoping if someone can tell me the right syntax. Tried all the following options given in the help, but none of them worked, and keep getting syntax error. There is not much information online about virt-sparsify key option. --key /opt:key:"encryption password" --key /opt:file:enc_pass_file
There is no '--key' option for virt-sparsify command. You can use '--echo-keys' or '--keys-from-stdin' option instead. Please see the man page.
(In reply to YongkuiGuo from comment #2) > There is no '--key' option for virt-sparsify command. You can use > '--echo-keys' or '--keys-from-stdin' option instead. Please see the man page. It is a new option in libguestfs 1.40.0, in virt-sparsify and other OCaml tools. Which version of libguestfs are you using? What is the OS where you are using it? (In reply to Jawad Rajput from comment #0) > Tried all the following options given in the help, but none of them worked, > and keep getting syntax error. There is not much information online about > virt-sparsify key option. http://libguestfs.org/virt-sparsify.1.html describes it. > --key /opt:key:"encryption password" > > --key /opt:file:enc_pass_file The first part of the selector for --key is the encrypted device.
Thanks Pino for the response. The OS is CentOS Linux release 7.6.1810 (Core) and libguestfs is 1.38.2. # uname -r 3.10.0-957.21.3.el7.x86_64 # rpm -qa libguestfs libguestfs-1.38.2-12.el7_6.2.x86_64
(In reply to YongkuiGuo from comment #2) > There is no '--key' option for virt-sparsify command. You can use > '--echo-keys' or '--keys-from-stdin' option instead. Please see the man page. Thanks Yong, I will give it a try.
(In reply to Jawad Rajput from comment #4) > Thanks Pino for the response. The OS is CentOS Linux release 7.6.1810 (Core) > and libguestfs is 1.38.2. virt-sparsify in this version does not have --key. The version that will be in RHEL 7.7 (and thus CentOS 7.7) will have it.