{"id":12160,"date":"2024-03-08T11:19:17","date_gmt":"2024-03-08T11:19:17","guid":{"rendered":"https:\/\/www.itwriting.com\/blog\/?p=12160"},"modified":"2024-04-08T07:40:58","modified_gmt":"2024-04-08T07:40:58","slug":"amazon-linux-2023-on-hyper-v","status":"publish","type":"post","link":"https:\/\/www.itwriting.com\/blog\/12160-amazon-linux-2023-on-hyper-v.html","title":{"rendered":"Amazon Linux 2023 on Hyper-V"},"content":{"rendered":"\n<p>Amazon Linux 2023 came out in March 2023, somewhat late as it was originally called Amazon Linux 2022. It took even longer to provide images for running it outside AWS, but these did <a href=\"https:\/\/docs.aws.amazon.com\/linux\/al2023\/ug\/outside-ec2.html\" data-type=\"link\" data-id=\"https:\/\/docs.aws.amazon.com\/linux\/al2023\/ug\/outside-ec2.html\" target=\"_blank\" rel=\"noreferrer noopener\">eventually arrive<\/a> &#8211; but only for VMWare and KVM, even though old Amazon Linux 2 does have a Hyper-V image.<\/p>\n\n\n\n<p><strong>Update<\/strong>: Hyper-V is now <a href=\"https:\/\/docs.aws.amazon.com\/linux\/al2023\/ug\/outside-ec2-download.html\" data-type=\"link\" data-id=\"https:\/\/docs.aws.amazon.com\/linux\/al2023\/ug\/outside-ec2-download.html\">officially supported<\/a> making this post obsolete but it may be of interest!<\/p>\n\n\n\n<p>I wanted to try out AL 2023 and it makes sense to do that locally rather than spend money on EC2; but my server runs Windows Hyper-V.  Migrating images between hypervisors is nothing new so I gave it a try. <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>I used the KVM image <a href=\"https:\/\/cdn.amazonlinux.com\/al2023\/os-images\/2023.3.20240304.0\/\" data-type=\"link\" data-id=\"https:\/\/cdn.amazonlinux.com\/al2023\/os-images\/2023.3.20240304.0\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a> (or the version that was available at the time). <\/li>\n\n\n\n<li>I used the <a href=\"https:\/\/www.qemu.org\/docs\/master\/tools\/qemu-img.html\" data-type=\"link\" data-id=\"https:\/\/www.qemu.org\/docs\/master\/tools\/qemu-img.html\">qemu disk <\/a><a href=\"https:\/\/www.qemu.org\/docs\/master\/tools\/qemu-img.html\" data-type=\"link\" data-id=\"https:\/\/www.qemu.org\/docs\/master\/tools\/qemu-img.html\" target=\"_blank\" rel=\"noreferrer noopener\">image utility<\/a> to convert the .qcow2 KVM disk image to .vhdx format. I installed qemu-img by installing <a href=\"https:\/\/www.qemu.org\/download\/#windows\" target=\"_blank\" rel=\"noreferrer noopener\">QUEMU for Windows<\/a> but not enabling the hypervisor itself.<\/li>\n\n\n\n<li>I used the <a href=\"https:\/\/docs.aws.amazon.com\/linux\/al2023\/ug\/seed-iso.html\" data-type=\"link\" data-id=\"https:\/\/docs.aws.amazon.com\/linux\/al2023\/ug\/seed-iso.html\" target=\"_blank\" rel=\"noreferrer noopener\">seed.iso<\/a> technique to initialise the VM with an ssh key and a user with sudo rights. I found it helpful to consult the cloud-init documentation linked from that page for this.<\/li>\n\n\n\n<li>In Hyper-V I created a new Generation 1 VM with 4GB RAM and set it to boot from converted drive, plus seed.iso in the virtual DVD drive. Started it up and it worked.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignleft size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"286\" src=\"https:\/\/www.itwriting.com\/blog\/wp-content\/uploads\/2024\/03\/amazon-linux-2023.jpg\" alt=\"\" class=\"wp-image-12161\" srcset=\"https:\/\/www.itwriting.com\/blog\/wp-content\/uploads\/2024\/03\/amazon-linux-2023.jpg 979w, https:\/\/www.itwriting.com\/blog\/wp-content\/uploads\/2024\/03\/amazon-linux-2023-300x88.jpg 300w, https:\/\/www.itwriting.com\/blog\/wp-content\/uploads\/2024\/03\/amazon-linux-2023-768x224.jpg 768w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><figcaption class=\"wp-element-caption\"><em>Amazon Linux 2023 running on Hyper-V<\/em><\/figcaption><\/figure><\/div>\n\n\n<p>I guess I should add the warning that installing on Hyper-V is not supported by AWS; on the other hand, installing locally has official limitations anyway. Even if you install on KVM the <a href=\"https:\/\/docs.aws.amazon.com\/linux\/al2023\/ug\/kvm-supported-configurations.html\" data-type=\"link\" data-id=\"https:\/\/docs.aws.amazon.com\/linux\/al2023\/ug\/kvm-supported-configurations.html\" target=\"_blank\" rel=\"noreferrer noopener\">notes<\/a> state that the KVM guest agent is not packaged or supported, VM hibernation is not supports, VM migration is not supported, passthrough of any device is not supported and so on.<\/p>\n\n\n\n<p>What about the Hyper-V integration drivers? <a href=\"https:\/\/learn.microsoft.com\/en-gb\/windows-server\/virtualization\/hyper-v\/Supported-Linux-and-FreeBSD-virtual-machines-for-Hyper-V-on-Windows\" data-type=\"link\" data-id=\"https:\/\/learn.microsoft.com\/en-gb\/windows-server\/virtualization\/hyper-v\/Supported-Linux-and-FreeBSD-virtual-machines-for-Hyper-V-on-Windows\" target=\"_blank\" rel=\"noreferrer noopener\">Note<\/a> that &#8220;Linux Integration Services has been added to the Linux kernel and is updated for new releases.&#8221; Running lsmod shows that the essentials are there: <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignleft size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"988\" height=\"1024\" src=\"https:\/\/www.itwriting.com\/blog\/wp-content\/uploads\/2024\/03\/al2023-modules-988x1024.jpg\" alt=\"\" class=\"wp-image-12162\" srcset=\"https:\/\/www.itwriting.com\/blog\/wp-content\/uploads\/2024\/03\/al2023-modules-988x1024.jpg 988w, https:\/\/www.itwriting.com\/blog\/wp-content\/uploads\/2024\/03\/al2023-modules-290x300.jpg 290w, https:\/\/www.itwriting.com\/blog\/wp-content\/uploads\/2024\/03\/al2023-modules-768x796.jpg 768w, https:\/\/www.itwriting.com\/blog\/wp-content\/uploads\/2024\/03\/al2023-modules.jpg 1434w\" sizes=\"auto, (max-width: 988px) 100vw, 988px\" \/><figcaption class=\"wp-element-caption\"><em>The Hyper-V modules are in the kernel in Amazon Linux 2023<\/em><\/figcaption><\/figure><\/div>\n\n\n<p>Networking worked for me without resorting to a legacy network card emulation.<\/p>\n\n\n\n<p>This exercise also taught me about the different philosophy in Amazon Linux 2023 versus Amazon Linux 2. That will be the subject of another post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Amazon Linux 2023 came out in March 2023, somewhat late as it was originally called Amazon Linux 2022. It took even longer to provide images for running it outside AWS, but these did eventually arrive &#8211; but only for VMWare and KVM, even though old Amazon Linux 2 does have a Hyper-V image. Update: Hyper-V &hellip; <a href=\"https:\/\/www.itwriting.com\/blog\/12160-amazon-linux-2023-on-hyper-v.html\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Amazon Linux 2023 on Hyper-V<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,62,67,1519,97],"tags":[1599,1600,466],"class_list":["post-12160","post","type-post","status-publish","format-standard","hentry","category-development","category-open-source","category-professional","category-tech","category-windows","tag-amazon-linux","tag-amazon-linux-2023","tag-hyper-v"],"_links":{"self":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts\/12160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/comments?post=12160"}],"version-history":[{"count":3,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts\/12160\/revisions"}],"predecessor-version":[{"id":12184,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts\/12160\/revisions\/12184"}],"wp:attachment":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/media?parent=12160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/categories?post=12160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/tags?post=12160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}