7.3. 使用 AMD SEV SNP 在 Azure 上配置 RHEL 虚拟机
带有安全嵌套分页(SEV-SNP)的 AMD 安全加密虚拟化是 Azure Virtual Machines (VM)上的 Red Hat Enterprise Linux (CVM)的机密虚拟机(CVM)的安全类型,仅适用于 AMD EPYC 处理器系列。SEV-SNP 提供可信引导环境,以便整个过程变得安全且保护,以便虚拟机监控程序和云服务供应商无法访问数据。
先决条件
-
已安装
openssh和openssh-clients软件包。 - 已安装 Azure CLI 工具。详情请参阅 安装 Azure CLI。
- 您已从上述 Azure 实例类型启动了实例。详情请查看 CVM 支持的虚拟机大小。
流程
使用 Azure CLI 实用程序登录到 Azure:
$ az login为所选可用区创建 Azure 资源组:
$ az group create --name <example_resource_group> --location eastus使用 SEV-SNP 部署 RHEL 实例,例如
Standard_DC4as_V5实例类型:$ az vm create --resource-group <example_resource_group> \ --name <example-rhel-9-instance> \ --image <"RedHat:rhel-cvm:9_5_cvm:latest"> \ --size <Standard_DC4as_V5> \ --admin-username <example_azure_user> \ --generate-ssh-keys \ --security-type ConfidentialVM \ --os-disk-security-encryption-type DiskWithVMGuestState连接到 RHEL 实例:
$ ssh <example_azure_user>@<example_ip_address_of_VM>
验证
检查内核日志以验证 SEV-SNP 的状态:
$ sudo dmesg | grep -i sev... [ 0.547223] Memory Encryption Features active: AMD SEV [ 4.843171] kvm-guest: setup_efi_kvm_sev_migration : EFI live migration variable not found ...