diff --git a/cli/internal/terraform/terraform/qemu/modules/instance_group/main.tf b/cli/internal/terraform/terraform/qemu/modules/instance_group/main.tf index fce332975..151909dca 100644 --- a/cli/internal/terraform/terraform/qemu/modules/instance_group/main.tf +++ b/cli/internal/terraform/terraform/qemu/modules/instance_group/main.tf @@ -14,6 +14,12 @@ resource "libvirt_domain" "instance_group" { vcpu = var.vcpus machine = var.machine firmware = local.firmware + dynamic "cpu" { + for_each = var.boot_mode == "direct-linux-boot" ? [1] : [] + content { + mode = "host-passthrough" + } + } dynamic "nvram" { for_each = var.boot_mode == "uefi" ? [1] : [] content { @@ -21,11 +27,8 @@ resource "libvirt_domain" "instance_group" { template = var.nvram } } - dynamic "xml" { - for_each = var.boot_mode == "uefi" ? [1] : [] - content { - xslt = file("${path.module}/domain.xsl") - } + xml { + xslt = file("${path.module}/${local.xslt_filename}") } kernel = local.kernel initrd = local.initrd @@ -36,7 +39,6 @@ resource "libvirt_domain" "instance_group" { } disk { volume_id = element(libvirt_volume.boot_volume.*.id, count.index) - scsi = true } disk { volume_id = element(libvirt_volume.state_volume.*.id, count.index) @@ -75,4 +77,5 @@ locals { initrd = var.boot_mode == "direct-linux-boot" ? var.initrd_volume_id : null cmdline = var.boot_mode == "direct-linux-boot" ? [{ "_" = var.kernel_cmdline }] : null firmware = var.boot_mode == "uefi" ? var.firmware : null + xslt_filename = var.boot_mode == "direct-linux-boot" ? "tdx_domain.xsl" : "domain.xsl" } diff --git a/cli/internal/terraform/terraform/qemu/modules/instance_group/tdx_domain.xsl b/cli/internal/terraform/terraform/qemu/modules/instance_group/tdx_domain.xsl new file mode 100644 index 000000000..76fb167c9 --- /dev/null +++ b/cli/internal/terraform/terraform/qemu/modules/instance_group/tdx_domain.xsl @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + destroy + restart + destroy + + + + + + + + + + + + + + + + + + + + + + 0x10000001 + vsock:2:4050 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/disk-mapper/cmd/main.go b/disk-mapper/cmd/main.go index 023cee66d..0f367d5d6 100644 --- a/disk-mapper/cmd/main.go +++ b/disk-mapper/cmd/main.go @@ -40,7 +40,7 @@ const ( gcpStateDiskPath = "/dev/disk/by-id/google-state-disk" azureStateDiskPath = "/dev/disk/azure/scsi1/lun0" awsStateDiskPath = "/dev/sdb" - qemuStateDiskPath = "/dev/vda" + qemuStateDiskPath = "/dev/vdb" openstackStateDiskPath = "/dev/vdb" )