Created attachment 1899160 [details] create fail log and screenshot Description of problem: Ubuntu 22.04 VM create from template fail, and can not remove template. Version-Release number of selected component (if applicable): 4.5.1 How reproducible: 1. Create Ubuntu OS. 2. Make template (Click seal), named ubuntu-22.04_template 3. Create Vm from template ubuntu-22.04_template 4. Fail to creation 5. Remove ubuntu-22.04_template and get fail. It will alert a depend disk, but the disk ID is not exist. Steps to Reproduce: 1. 2. 3. Actual results: 1. Can not create ubuntu vm from template. 2. Can not delete template when 1. failed. Expected results: Additional info: Please see attached file.
The documentation text flag should only be set after 'doc text' field is provided. Please provide the documentation text and set the flag to '?' again.
(In reply to Tzu-Yi Liao from comment #0) > 1. Can not create ubuntu vm from template. It works for me. The difference is that my fstab uses UUIDs to mount the disks, while yours uses paths and has trouble with them: guestfsd: error: mount_options_stub: /dev/disk/by-id/dm-uuid-LVM-bPjAuocnvLvMyvC1YMLCFoSreaRJ2zV5Kmr9XJYF6OI8595rv7Dhkd4GvRe06Zmt: No such file or directory It seems your VM uses a disk arrangement that libguestfs cannot understand and/or process. > 2. Can not delete template when 1. failed. But this shouldn't happen. Could you please provide Engine and Vdsm logs with the corresponding action and its failure?
I haven't succeeded to reproduce the issue. Creation of the sealed template goes without errors and template removal also succeeds. Tzu-Yi, can you please reproduce the bug in your environment and put here the Engine and VDSM logs?
(In reply to Shmuel Melamud from comment #3) > I haven't succeeded to reproduce the issue. Creation of the sealed template > goes without errors and template removal also succeeds. > > Tzu-Yi, can you please reproduce the bug in your environment and put here > the Engine and VDSM logs? Hello Sir, Sorry for my late. Here is my steps today: Steps: 1. Create Ubuntu 22.04 VM (UEFI), named u22.04-uefi. 2. Create template named u22.04-uefi-seal from VM, and click "seal". 3. Create VM from u22.04-uefi-seal using thin, get fail. 4. Create VM from u22.04-uefi-seal using clone, get fail. 5. Remove u22.04-uefi (Success). 6. Remove template u22.04-uefi-seal (Fail). (Message: Cannot remove Template. The following Disk(s) are based on it: (ba7c756f-5d38-4c34-a5b8-9b0cc9ceed5b) .) Thank you very much. Steven
Created attachment 1905715 [details] engine and vdsm log #c4 attachment file
(In reply to Tzu-Yi Liao from comment #4) > (In reply to Shmuel Melamud from comment #3) > > I haven't succeeded to reproduce the issue. Creation of the sealed template > > goes without errors and template removal also succeeds. > > > > Tzu-Yi, can you please reproduce the bug in your environment and put here > > the Engine and VDSM logs? > > Hello Sir, > Sorry for my late. > > Here is my steps today: > Steps: > 1. Create Ubuntu 22.04 VM (UEFI), named u22.04-uefi. > 2. Create template named u22.04-uefi-seal from VM, and click "seal". > 3. Create VM from u22.04-uefi-seal using thin, get fail. > 4. Create VM from u22.04-uefi-seal using clone, get fail. > 5. Remove u22.04-uefi (Success). > 6. Remove template u22.04-uefi-seal (Fail). (Message: Cannot remove > Template. The following Disk(s) are based on it: > (ba7c756f-5d38-4c34-a5b8-9b0cc9ceed5b) .) > > Thank you very much. > > Steven I reproduce today. Both UEFI and BIOS type are failed. Prepare: 1. Destroy data domain. 2. Delete all files on share storage(NFS). 3. Mount data domain. Steps (Phase1): 1. Create Ubuntu 22.04 VM (UEFI), named ubuntu2204-uefi, using LVM. 2. Create Ubuntu 22.04 VM (UEFI), named ubuntu2204-bios, using LVM. 3. Create template named t-u2204-uefi-seal from VM ubuntu2204-uefi, and click "seal", using QCOW2. 4. Create template named t-u2204-bios-seal from VM ubuntu2204-bios, and click "seal", using QCOW2. 5. Create VM from t-u2204-uefi-seal (using clone and thin), get fail. 6. Create VM from t-u2204-bios-seal (using clone and thin), get fail. 7. Remove t-u2204-uefi-seal, get fail (Cannot remove Template. The following Disk(s) are based on it: (a7067015-d04f-43fe-94d4-67ddea3058a5) .). 8. Remove VM from t-u2204-bios-seal, get fail (Cannot remove Template. The following Disk(s) are based on it: (7df7c81a-4f2c-4845-9659-51eb1eece0dd) .). Steps (Phase2): 1. Create template named t-u2204-uefi from VM ubuntu2204-uefi, using QCOW2. 2. Create template named t-u2204-bios from VM ubuntu2204-bios, using QCOW2. 3. Create VM from t-u2204-uefi (using clone and thin), create success and can be poweron. 4. Create VM from t-u2204-bios (using clone and thin), create success and can be poweron. 5. Delete VMs from 3. and 4. 6. Remove t-u2204-bios success. 7. Remove t-u2204-uefi success. Does seal function is not support Ubuntu? If so, how can I remove template manually. Thanks for everyone.
Thank you for the additional info. I cannot reproduce the scenario above but I could reproduce the problem with a non-removable template in a bit different way: 1. Create an Ubuntu VM (it would probably work with other guest OSes too). 2. Run the VM and change the entry for the root file system in /etc/fstab to a non-existent device path (e.g. "/dev/xxxxx / ..."). 3. Shut down the VM and make a template from it, *without* sealing. 4. Try to create thin and cloned VMs from the template, *with* sealing. It fails, the VMs are not created. 5. Try to remove the template. It fails with "Cannot remove Template. The following Disk(s) are based on it: (DISK-UUID) ." The reported DISK-UUID is not present among the disks listed in Storage -> Disks. BTW, sealing works for my Ubuntu VMs, both non-LVM and LVM (but the fstab entries are of different form than in your case). You probably managed to create a configuration that virt-sysprep cannot recognize. We cannot do anything about it but the problem with a non-removable template looks like an oVirt bug.
Final steps to reproduce: 1. Create an Ubuntu VM (it would probably work with other Linuxes too). 2. Run the VM and change the entry for the root file system in /etc/fstab to a non-existent device path (e.g. "/dev/xxxxx / ..."). 3. Shut down the VM and make a template from it, *without* sealing. 4. Try to create a thin-provisioned VM from the template, *with* sealing. It fails, the VM is not created. 5. Try to remove the template. It fails with "Cannot remove Template. The following Disk(s) are based on it: (DISK-UUID) ." The DISK-UUID is an image group ID, so it is not present among the disks listed in Storage -> Disks.
This bug has low overall severity and is not going to be further verified by QE. If you believe special care is required, feel free to properly align relevant severity, flags and keywords to raise PM_Score or use one of the Bumps ('PrioBumpField', 'PrioBumpGSS', 'PrioBumpPM', 'PrioBumpQA') in Keywords to raise it's PM_Score above verification threashold ({QE_LOWPRIO_SCORE}).
This bug has low overall severity and passed an automated regression suite, and is not going to be further verified by QE. If you believe special care is required, feel free to re-open to ON_QA status.