Typically, VHDs created using Hyper-V are aligned correctly. VHD images on Azure must have a virtual size aligned to 1 MB. Rebuild the initrd with the hv_vmbus and hv_storvsc kernel modules: sudo mkinitrd -preload=hv_storvsc -preload=hv_vmbus -v -f initrd-`uname -r`.img `uname -r` Sudo cp initrd-`uname -r`.img initrd-`uname -r`.img.bak Here is one example for rebuilding the initrd by using the mkinitrd utility:īack up the existing initrd image: sudo cd /boot Consult your distribution's documentation or support for the proper procedure. The mechanism for rebuilding the initrd or initramfs image may vary depending on the distribution. This known issue is for systems based on the upstream Red Hat distribution, and possibly others. When using a different virtualization system (such as VirtualBox, KVM, and so on) to prepare your Linux image, you may need to rebuild the initrd so that at least the hv_vmbus and hv_storvsc kernel modules are available on the initial ramdisk. If you have a VM that was created outside of Hyper-V, the Linux installers may not include the drivers for Hyper-V in the initial ramdisk (initrd or initramfs), unless the VM detects that it's running on a Hyper-V environment. Installing kernel modules without Hyper-VĪzure runs on the Hyper-V hypervisor, so Linux requires certain kernel modules to run in Azure. A workaround for this would be to apply custom data using user data however, unlike custom data user data is not encrypted. ( Cloud-init >= 21.2 removes the udf requirement.) however without the udf module enabled the cdrom will not mount during provisioning preventing custom data from being applied. Remove users and system accounts, public keys, sensitive data, unnecessary software and application. Use the most up-to-date distribution version, packages, and software. When converting from a raw disk to VHD you must ensure that the raw disk size is a multiple of 1 MB before conversion, as described in the following steps. The Linux agent can be configured to create a swap file on the temporary resource disk, as described in the following steps.Īll VHDs on Azure must have a virtual size aligned to 1 MB (1024 × 1024 bytes). For more information, see Red Hat KB 436883.ĭon't configure a swap partition on the OS disk. Systems running custom kernels older than 2.6.37, or RHEL-based kernels older than 2.6.32-504 must set the boot parameter numa=off on the kernel command line in nf. This issue primarily impacts older distributions using the upstream Red Hat 2.6.32 kernel, and was fixed in Red Hat Enterprise Linux (RHEL) 6.6 (kernel-2.6.32-504). Linux kernel versions earlier than 2.6.37 don't support NUMA on Hyper-V with larger VM sizes. The Azure Linux agent must mount the UDF file system to read its configuration and provision the VM. At first boot on Azure the provisioning configuration is passed to the Linux VM by using UDF-formatted media that is attached to the guest. Kernel support for mounting UDF file systems is necessary. Using standard partitions will avoid LVM name conflicts with cloned VMs, particularly if an OS disk is ever attached to another identical VM for troubleshooting. When installing the Linux system, we recommend that you use standard partitions, rather than Logical Volume Manager (LVM) which is the default for many installations. The maximum size allowed for the VHD is 1,023 GB. The vfat kernel module must be enabled in the kernel If you're using VirtualBox, select Fixed size rather than the default (dynamically allocated) when creating the disk.Īzure supports Gen1 (BIOS boot) & Gen2 (UEFI boot) Virtual machines. You can convert the disk to VHD format using Hyper-V Manager or the Convert-VHD cmdlet. The Hyper-V virtual hard disk (VHDX) format isn't supported in Azure, only fixed VHD. This article focuses on general guidance for running your Linux distribution on Azure. Even if you meet all the criteria below, you may need to significantly tweak your Linux system for it to run properly. This article can't be comprehensive, as every distribution is different. Support for Linux images in Microsoft AzureĪll other, non-Azure Marketplace, distributions running on Azure have a number of prerequisites.Linux on Azure - Endorsed Distributions.For these endorsed distributions, pre-configured Linux images are provided in the Azure Marketplace. The Azure platform SLA applies to virtual machines running the Linux OS only when one of the endorsed distributions is used. Applies to: ✔️ Linux VMs ✔️ Flexible scale sets
0 Comments
Leave a Reply. |