canonical / tdx

Intel confidential computing - TDX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Guest Ubuntu version override doesn't appear to work

bktan8 opened this issue · comments

I tried to override the Ubuntu version for the guest creation, but it appears the exported variables are not working. Here I tried to create a guest with Ubuntu 23.10, but it still used 24.04.

sdp@sdp:~/dx/guest-tools/image$ git checkout noble-24.04
Switched to branch 'noble-24.04'
Your branch is up to date with 'origin/noble-24.04'.
sdp@sdp:~/tdx/guest-tools/image$ git branch
  main
* noble-24.04

sdp@sdp:~/tdx/guest-tools/image$ export OFFICIAL_UBUNTU_IMAGE="https://cloud-images.ubuntu.com/releases/mantic/release/"
export CLOUD_IMG="ubuntu-23.10-server-cloudimg-amd64.img"

sdp@sdp:~/tdx/guest-tools/image$ echo $OFFICIAL_UBUNTU_IMAGE
https://cloud-images.ubuntu.com/releases/mantic/release/

sdp@sdp:~/tdx/guest-tools/image$ echo $CLOUD_IMG
ubuntu-23.10-server-cloudimg-amd64.img

sdp@sdp:~/tdx/guest-tools/image$ sudo ./create-td-image.sh 
SUCCESS: Installation of required tools
--2024-05-01 01:13:30--  https://cloud-images.ubuntu.com/releases/noble/release//SHA256SUMS
Resolving cloud-images.ubuntu.com (cloud-images.ubuntu.com)... 185.125.190.40, 185.125.190.37, 2620:2d:4000:1::17, ...
Connecting to cloud-images.ubuntu.com (cloud-images.ubuntu.com)|185.125.190.40|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7605 (7.4K)
Saving to: ‘SHA256SUMS’

SHA256SUMS                                 100%[========================================================================================>]   7.43K  --.-KB/s    in 0s      

2024-05-01 01:13:31 (167 MB/s) - ‘SHA256SUMS’ saved [7605/7605]

Invalid download file according to sha256sum, re-download
--2024-05-01 01:13:32--  https://cloud-images.ubuntu.com/releases/noble/release//ubuntu-24.04-server-cloudimg-amd64.img
Resolving cloud-images.ubuntu.com (cloud-images.ubuntu.com)... 185.125.190.40, 185.125.190.37, 2620:2d:4000:1::1a, ...
Connecting to cloud-images.ubuntu.com (cloud-images.ubuntu.com)|185.125.190.40|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 475004928 (453M) [application/octet-stream]
Saving to: ‘/home/sdp/tdx/guest-tools/image/ubuntu-24.04-server-cloudimg-amd64.img’

tdx/guest-tools/image/ubuntu-24.04-server-  28%[========================>                                                                ] 131.05M  21.2MB/s    eta 19s    ^C

2 things here:

  • sudo -E ./create-td-image.sh instead of sudo ./create-td-image.sh . This will be addressed in a coming merge request
  • for now, the guest image creation scripts on 24-04 branch cannot generate image for 23.10, please use the main branch to generate a 23.10 guest