Bug 1968183 - Running an imported VM with TPM which wasn't running while exporting fails
Summary: Running an imported VM with TPM which wasn't running while exporting fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.4.7
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ovirt-4.4.7
: ---
Assignee: Shmuel Melamud
QA Contact: Tamir
URL:
Whiteboard:
Depends On:
Blocks: 1932484
TreeView+ depends on / blocked
 
Reported: 2021-06-06 15:36 UTC by Tamir
Modified: 2021-07-06 07:27 UTC (History)
2 users (show)

Fixed In Version: ovirt-engine-4.4.7.3
Clone Of:
Environment:
Last Closed: 2021-07-06 07:27:59 UTC
oVirt Team: Virt
Embargoed:
ahadas: ovirt-4.4+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 115186 0 master MERGED core: Preserve padding in TPM data on import from OVA 2021-06-10 08:21:37 UTC

Description Tamir 2021-06-06 15:36:02 UTC
Created attachment 1789124 [details]
Added logs

Description of problem:

Running an imported VM with TPM that was exported while it wasn't running and it was ran before (Step 3) fails with the error:

"VDSM host_mixed_1 command CreateBrokerVDS failed: Failed to handle external VM data: {'exception_class': <class 'binascii.Error'>, 'exception_arg_1': 'Incorrect padding', 'reason': 'Failed to decode base64 data'}"


Version-Release number of selected component (if applicable):
  - Engine instance with RHV 4.4.7-1 (ovirt-engine-4.4.7-0.23.el8ev) and RHEL 8.4 installed.
  - 3 hosts with RHV 4.4.7-1 and RHEL 8.4, vdsm-4.40.70.1-1.el8ev, qemu 15:5.2.0-16.module+el8.4.0+10806+b7d97207

How reproducible:
100%

Steps to Reproduce:

In Admin Portal:

1. Create a 4.5 data center and a 4.5 cluster.
2. Install the host and create a new NFS storage domain.
3. Create a VM with disk and bios type UEFI and with TPM enabled.
4. Run the VM.
5. Add a file and encrypt it using TPM. (Add data to the TPM)
6. Stop the VM.
7. Export the VM to OVA.
8. Remove the VM.
9. Import the VM from the OVA.
10. Run the VM.

Actual results:
1. The 4.5 data center and the 4.5 cluster were created.
2. The host was installed and the NFS storage domain was created.
3. The VM was created.
4. The VM is running.
5. Added data to the TPM.
6. The VM has been stopped.
7. The VM has been exported to OVA file.
8. The VM has been removed.
9. The VM has been imported back using the OVA.
10. The VM couldn't run with the following error from the events tab:
"VDSM host_mixed_1 command CreateBrokerVDS failed: Failed to handle external VM data: {'exception_class': <class 'binascii.Error'>, 'exception_arg_1': 'Incorrect padding', 'reason': 'Failed to decode base64 data'}"


Expected results:
1-9 steps are as expected.
10. The VM should be running at this point.

Comment 1 Arik 2021-06-07 11:40:35 UTC
Interesting to see what the volume actually contains, if it's empty or not

Comment 2 Tamir 2021-06-17 14:20:52 UTC
Verified on RHV 4.4.7-3. All looks good to me.

Env:
  - Engine instance with RHV 4.4.7-3 (ovirt-engine-4.4.7.3-0.3.el8ev) and RHEL 8.4 installed.
  - 3 hosts with RHV 4.4.7-3 and RHEL 8.4, vdsm-4.40.70.3-1.el8ev

I ran all the tests in the [RFE] Export/import VMs/templates with TPM polarion requirement and those tests passed.

I also ran the bug steps again and it worked fine.

In Admin Portal:

1. Create a 4.5 data center and a 4.5 cluster.
2. Install the host and create a new NFS storage domain.
3. Create a VM with disk and bios type UEFI and with TPM enabled.
4. Run the VM.
5. Add a file and encrypt it using TPM. (Add data to the TPM)
6. Stop the VM.
7. Export the VM to OVA.
8. Remove the VM.
9. Import the VM from the OVA.
10. Run the VM.

Actual results as expected:
1. The 4.5 data center and the 4.5 cluster were created.
2. The host was installed and the NFS storage domain was created.
3. The VM was created.
4. The VM is running.
5. Added data to the TPM.
6. The VM has been stopped.
7. The VM has been exported to OVA file.
8. The VM has been removed.
9. The VM has been imported back using the OVA.
10. The VM is running fine.

Comment 3 Sandro Bonazzola 2021-07-06 07:27:59 UTC
This bugzilla is included in oVirt 4.4.7 release, published on July 6th 2021.

Since the problem described in this bug report should be resolved in oVirt 4.4.7 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.