canonical / tdx

Intel confidential computing - TDX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do I compile a specific VM?

DiWangShePi opened this issue · comments

I saw in the repository's instructions that the preparation part of creating an Ubuntu 23.10 VM can be done in any Ubuntu 22.04 and above operating system, I was wondering if I could create an Ubuntu 22.04 VM?
If so, what should I do? Intel/tdx-tools seems to have been achieved.

Hi @DiWangShePi ,

Did you figure that problem out?

I also want to customize my TD guest VM (by using Ubuntu 22.04 with my own kernel source code). Executing the default scripts seems to not work.

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/PEK-702.

This message was autogenerated

Hi @Icegrave0391

Unfortunately, I haven't solved this issue yet. If you have any progress later, I would really like you to share it through this issue.

Best.

@DiWangShePi Hello, 22.04 is not supported as a TD guest, you can use 22.04 image but have to use a more recent kernel (the kernel version for 22.04 is 5.15). Do you have any specific reason to not move to 24.04 ?

Hi @hector-cao

Great to hear your response. I really don't have a particular reason. I just want to confirm that the previous failure is due to technical support or I am missing some steps.

However, if conditions permit, I would still like to try to boot a Ubuntu 22.04 virtual machine with TDX protection. If I understand you correctly, I can do this by manually switching the kernel? I wonder if you can tell me where I can find a suitable kernel?

Best.

We do not deliver a tdx guest kernel for Jammy. You can try to build one your self, more details can be found in this issue : #113

Hi @DiWangShePi ,

I successfully booted a guest TD kernel version of linux-6.6, while using Ubuntu 24.04 image.

Here are some suggestions from my experience:

  1. Use the default Ubuntu 24.04 image, but downgrade your guest kernel.

  2. Add an early printk support by editing the boot CMDLINE to diagnose what's going wrong.

For run_td.sh, I prefer to avoid the -daemonize option to boot the guest, as it omits the boot messages. Instead, for debugging purposes, you could add the option -serial mon: studio to interact with your TD guest via the terminal.

I would also add the following grub configuration in /etc/default/grub.d/50-cloudimg-settings.cfg:

GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0 earlyprintk=serial

The earlyprintk=serial really helps to test some weird cases in which the guest is failed during booting.

You could refer to this issue for more details: #124.