hyper-v虚拟机linux,Hyper-v 上支持的 Ubuntu 虚拟机

如果为虚拟机上的特定 Hyper-v 特定网络适配器配置了 网络管理器 ,则静态 IP 注入可能不起作用。Static IP injection may not work if Network Manager has been configured for a given Hyper-V-specific network adapter on the virtual machine. 若要确保静态 IP 注入正常运行,请确保网络管理器已完全关闭,或已通过其 ifcfg-eth0-ethX 文件在特定网络适配器上关闭网络管理器。To ensure smooth functioning of static IP injection please ensure that Network Manager is turned off completely or has been turned off for a specific network adapter through its ifcfg-ethX file.

使用虚拟光纤通道设备时,请确保已填充逻辑单元号 0 (LUN 0) 。While using virtual fiber channel devices, ensure that logical unit number 0 (LUN 0) has been populated. 如果尚未填充 LUN 0,Linux 虚拟机可能无法以本机方式装入光纤通道设备。If LUN 0 has not been populated, a Linux virtual machine might not be able to mount fiber channel devices natively.

如果在执行实时虚拟机备份操作的过程中有打开的文件句柄,则在某些角落情况下,在还原时,备份的 Vhd 可能需要执行文件系统一致性检查 (fsck) 。If there are open file handles during a live virtual machine backup operation, then in some corner cases, the backed-up VHDs might have to undergo a file system consistency check (fsck) on restore.

如果虚拟机有连接的 iSCSI 设备或直接连接存储 (也称为传递磁盘) ,则实时备份操作可能会失败。Live backup operations can fail silently if the virtual machine has an attached iSCSI device or direct-attached storage (also known as a pass-through disk).

长期支持 (LTS) 版本使用最新的虚拟硬件支持 (HWE) 内核,最新的 Linux Integration Services。On long term support (LTS) releases use latest virtual Hardware Enablement (HWE) kernel for up to date Linux Integration Services.

若要在16.04、18.04 和20.04 上安装 Azure 优化内核,请运行以下命令作为根 (或 sudo) :To install the Azure-tuned kernel on 16.04, 18.04 and 20.04, run the following commands as root (or sudo):

# apt-get update

# apt-get install linux-azure

动态内存支持仅适用于64位虚拟机。Dynamic memory support is only available on 64-bit virtual machines.

如果来宾操作系统的内存过低,则动态内存操作可能会失败。Dynamic Memory operations can fail if the guest operating system is running too low on memory. 下面是一些最佳做法:The following are some best practices:

启动内存和最小内存应等于或大于分发供应商建议的内存量。Startup memory and minimal memory should be equal to or greater than the amount of memory that the distribution vendor recommends.

通常会消耗系统中的全部可用内存的应用程序,仅消耗最多80% 的可用 RAM。Applications that tend to consume the entire available memory on a system are limited to consuming up to 80 percent of available RAM.

如果使用的是 Windows Server 2019、Windows Server 2016 或 Windows Server 2012/2012 R2 操作系统上的动态内存,请以 128 mb (MB) 的倍数指定 启动内存、 最小内存 和 最大内存 参数。If you are using Dynamic Memory on Windows Server 2019, Windows Server 2016 or Windows Server 2012/2012 R2 operating systems, specify Startup memory, Minimum memory, and Maximum memory parameters in multiples of 128 megabytes (MB). 否则,可能会导致 Hot-Add 故障,在来宾操作系统上可能无法看到任何内存的增加。Failure to do so can lead to Hot-Add failures, and you might not see any memory increase on a guest operating system.

在 Windows Server 2019、Windows Server 2016 或 Windows Server 2012 R2 中,如果没有 Linux 软件更新,键/值对基础结构可能会无法正常工作。In Windows Server 2019, Windows Server 2016 or Windows Server 2012 R2, the key/value pair infrastructure might not function correctly without a Linux software update. 请与您的分销商联系以获取软件更新,以防您看到此功能的问题。Contact your distribution vendor to obtain the software update in case you see problems with this feature.

在 Windows Server 2012 R2 上,第2代虚拟机默认启用安全启动,某些 Linux 虚拟机将无法启动,除非禁用了安全启动选项。On Windows Server 2012 R2, Generation 2 virtual machines have secure boot enabled by default and some Linux virtual machines will not boot unless the secure boot option is disabled. 你可以在 Hyper-v 管理器 中虚拟机设置的 "固件" 部分禁用安全启动,也可以使用 Powershell 禁用它:You can disable secure boot in the Firmware section of the settings for the virtual machine in Hyper-V Manager or you can disable it using Powershell:

Set-VMFirmware -VMName "VMname" -EnableSecureBoot Off

尝试复制现有第2代 VHD 虚拟机的 VHD 以创建新的第2代虚拟机之前,请执行以下步骤:Before attempting to copy the VHD of an existing Generation 2 VHD virtual machine to create new Generation 2 virtual machines, follow these steps:

登录到现有第2代虚拟机。Log in to the existing Generation 2 virtual machine.

将目录更改为启动 EFI 目录:Change directory to the boot EFI directory:

# cd /boot/efi/EFI

将 ubuntu 目录复制到名为 boot 的新目录中:Copy the ubuntu directory in to a new directory named boot:

# sudo cp -r ubuntu/ boot

将目录更改为新创建的启动目录:Change directory to the newly created boot directory:

# cd boot

重命名 shimx64 文件:Rename the shimx64.efi file:

# sudo mv shimx64.efi bootx64.efi

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值