From 094a127e9e07716aab0341ce5b1fde8517d69009 Mon Sep 17 00:00:00 2001 From: Paul Maconi Date: Nov 03 2024 17:53:21 +0000 Subject: [PATCH 1/5] Add images and doc for proxmox, update nav.adoc --- diff --git a/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-01.png b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-01.png new file mode 100644 index 0000000..cc3c46a Binary files /dev/null and b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-01.png differ diff --git a/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-02.png b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-02.png new file mode 100644 index 0000000..6afa491 Binary files /dev/null and b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-02.png differ diff --git a/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-03.png b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-03.png new file mode 100644 index 0000000..474da4b Binary files /dev/null and b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-03.png differ diff --git a/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-04.png b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-04.png new file mode 100644 index 0000000..e172637 Binary files /dev/null and b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-04.png differ diff --git a/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-05.png b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-05.png new file mode 100644 index 0000000..f61feb1 Binary files /dev/null and b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-05.png differ diff --git a/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-06.png b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-06.png new file mode 100644 index 0000000..7499a5a Binary files /dev/null and b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-06.png differ diff --git a/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-07.png b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-07.png new file mode 100644 index 0000000..b2d27de Binary files /dev/null and b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-07.png differ diff --git a/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-08.png b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-08.png new file mode 100644 index 0000000..12a46a4 Binary files /dev/null and b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-08.png differ diff --git a/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-09.png b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-09.png new file mode 100644 index 0000000..2ee2ad9 Binary files /dev/null and b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-09.png differ diff --git a/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-10.png b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-10.png new file mode 100644 index 0000000..f6c81ea Binary files /dev/null and b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-10.png differ diff --git a/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-11.png b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-11.png new file mode 100644 index 0000000..ac5f165 Binary files /dev/null and b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-11.png differ diff --git a/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-12.png b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-12.png new file mode 100644 index 0000000..b6427d5 Binary files /dev/null and b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-12.png differ diff --git a/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-13.png b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-13.png new file mode 100644 index 0000000..2df1a35 Binary files /dev/null and b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-13.png differ diff --git a/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-14.png b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-14.png new file mode 100644 index 0000000..ddbf2d3 Binary files /dev/null and b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-14.png differ diff --git a/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-15.png b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-15.png new file mode 100644 index 0000000..c48a95b Binary files /dev/null and b/docs/modules/ROOT/assets/images/virtualization/vm-proxmox-15.png differ diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 31ff220..06ccd45 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -19,6 +19,7 @@ ** xref:virtualization/vm-install-cloudimg-centos9.adoc[Creating a virtual machine using a distribution's Cloud base image] ** xref:virtualization/vm-management-cockpit.adoc[Managing virtual machines with Cockpit] ** xref:virtualization/nested-virtualization.adoc[Setting up Nested Virtualization] +** xref:virtualization/vm-install-diskimg-proxmox.adoc[Installing Fedora Server Edition as a virtual machine using Proxmox Virtual Environment] * xref:containerization/index.adoc[Containerization] ** xref:containerization/systemd-nspawn-setup.adoc[Setting up Systemd Nspawn Container] diff --git a/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc b/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc new file mode 100644 index 0000000..0779206 --- /dev/null +++ b/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc @@ -0,0 +1,167 @@ += Installing Fedora Server Edition as a virtual machine using Proxmox Virtual Environment +Paul Maconi +:page-authors: {author}, {author_2} +:revnumber: F41 +:revdate: 2024-11-02 + +:page-aliases: pages/virtualization-vm-install-fedoraserver-cockpit.adoc + +// Before publishing on main site, comment out +// the warning. Comment in again when start to update. +//[WARNING] +//==== +//**You are in the Fedora Server documentation staging area!** +// +//These documents are not approved yet and may be incomplete and/or incorrect. You would probably prefer to study the https://docs.stg.fedoraproject.org/en-US/fedora-server/[published documentation]. + +// *Status of this document*: Updated to f41. +//==== + + +[abstract] +This document outlines a method for installing Fedora Server from the qcow2 image as a virtual machine in the Proxmox Virtual Environment, henceforth simply Proxmox. VMs can be spun up very quickly after importing the disk image, saving much time and frustration. The setup used when writing this document may not match what yours, so certain details like file paths for the disk images may vary. + + +== Why Fedora Server on Proxmox + +Proxmox is an open source server virtualization management solution based on QEMU/KVM and LXC with a web interface for managing most aspects of the VM workflow. It is also popular with homelab enthusiasts. The Fedora Server disk image shortcuts the provisioning process by providing a pre-installed disk image that boots straight into the final setup menu. You can have a fresh Fedora Server VM provisioned in just a couple of minutes using this method. + +== Brief summary for experienced Proxmox users + +Here are the key details if you're already familiar with creating virtual machines in Proxmox. + +* The VM does not need installation media (ISO) mounted. +* The VM must be in BIOS mode (SeaBIOS) with a VirtIO SCSI Single controller. Be sure to enable the Qemu Agent if you plan on using it. +* This document omits the initial disk creation because we import the disk image later in the process. +** `qm disk import [vm_number] [image_name.qcow2] [target_storage] --format qcow2` +* You must attach the disk and ensure it is selected in the boot order under `options` for the VM before you try to boot the system. + +== Procedure + +Note: This document assumes that you have ssh access to a Proxmox node and that you have already downloaded the Fedora Server qcow2 disk image. It also assumes centralized storage on an NFS mount, but your storage configuration may differ if you use local LVM storage or Ceph. We provided screenshots for each step of the VM configuration process, but the overall procedure comes from the link:https://pve.proxmox.com/wiki/Migrate_to_Proxmox_VE#Import_Disk[Proxmox Wiki]. + +=== Locate the image file and upload it to Proxmox + +Before we create the VM, we will need to find and upload our disk image to the Proxmox node. In the screenshot below you can see that we explored the system to determine that it is using centralized NFS storage mounted at /mnt/pve/nfs-kraken, and we made a directory at some point called osimages to contain our disk images. + +Once we sorted out the path, we uploaded the file via scp into the Proxmox node. `scp [image_filename] root@[node_name]:/path/to/images/[image_filename]` + +image::virtualization/vm-proxmox-01.png[Upload Image File] + +=== Verify the image is in place + +While not completely necessary, we logged back in to the Proxmox node and verified that the file had actually uploaded to the target folder. We'll come back to this path later when it is time to import the disk image to a VM. + +image::virtualization/vm-proxmox-02.png[Locate Image File] + +=== VM Creation: General + +Click on the `Create VM` button in the Proxmox UI, and the VM creation wizard should start. Select a node and give the VM a name. Note the VM ID. We will need this later. Click `Next`. + +image::virtualization/vm-proxmox-03.png[VM General] + +=== VM Creation: OS + +We will not need to use an ISO to install the system, so change the radio button to `Do not use any media` and click `Next`. + +image::virtualization/vm-proxmox-04.png[VM OS] + +=== VM Creation: System + +We get a handful of options to play with on this screen. + +* The `Machine` is whatever you prefer. `q35` presents hardware in the PCIe topology, while `i440fx` will give you the older PCI topology. + +* The `BIOS` option needs to be `SeaBIOS` because the disk image will not boot under `UEFI`. + +* The `SCSI Controller` option should be set as `VirtIO SCSI Single`. The default option `LSI 53C895A` would not boot the disk image. + +* Also, remember to enable the `Qemu Agent` option if you intend to use it. You can safely enable this option if you are unsure. + +Click `Next`. + +image::virtualization/vm-proxmox-05.png[VM System] + +=== VM Creation: Disks + +Click the little trash can to the left of the disk it pre-populates for you. We will be importing the disk image as our primary disk. Click `Next`. + +image::virtualization/vm-proxmox-06.png[VM Disks] + +=== VM Creation: CPU + +Set the CPU settings as you need them. The test cluster used when writing this documentation had homogenous processors across the cluster, so `host` was safe to use while still enabling live migration. Click `Next`. + +image::virtualization/vm-proxmox-07.png[VM CPU] + +=== VM Creation: Memory + +Set the memory the amount you want assigned to the VM. Click `Next`. + +image::virtualization/vm-proxmox-08.png[VM Memory] + +=== VM Creation: Network + +Select the network details. The test article had an Open vSwitch configured with VLAN port groups. `VirtIO (paravirtualized)` should yield the best performance. Click `Next`. + +image::virtualization/vm-proxmox-09.png[VM Network] + +=== VM Creation: Confirm + +The wizard should end with a summary of the hardware settings. Click `Finish` to create the VM. + +image::virtualization/vm-proxmox-10.png[VM Confirm] + +=== VM Disk Import + +Now that the VM itself has been built, we need to log in to the Proxmox node via the console feature or via SSH to import the disk image we uploaded earlier. + +* Log in to the Proxmox node + +* cd to the folder where you uploaded the disk image earlier. + +** This test article has storage mounted at /mnt/pve/nfs-kraken/osimages/, but your path will be different. + +* use the qm disk import command to import your disk image. + +** `qm disk import [vm_number] [image_name.qcow2] [target_storage] --format qcow2` + +*** [vm_number] is the vm number of the vm you just created in the previous steps. + +*** [image_name.qcow2] is the file name of your Fedora Server image that you uploaded earlier. + +*** [target_storage] is the storage volume where you want the disk image for the vm stored. For this test article, I told Proxmox to continue using a volume named `nfs-kraken`. + +*** The format may vary depending on where you are storing the VM. The test articule uses an NFS mount, and qcow2 formatted images are preferred in this usage scenario. + +image::virtualization/vm-proxmox-11.png[VM Disk Import Start] + +When the import process finishes you should get a success message like the one show in the image below. This process was done on a storage array with rotational hard disks, and it still only took a few seconds to complete. + +image::virtualization/vm-proxmox-12.png[VM Disk Import End] + +=== VM Configuration: Disk + +Now that the disk is part of the VM, we can go back to the hardware tab, highlight the new unused disk, and click edit. You shouldn't need to change anything and can safely just click `Add`. + +image::virtualization/vm-proxmox-13.png[VM Configuration: Disk] + +=== VM Configuration: Boot Order + +The final step before powering on the VM is to navigate to the VM's `Options` tab, click on `Boot Order`, and ensure that the imported disk, typically `scsi0`, is selected for boot. Note that in the following screenshot, the other boot options are disabled and `scsi0` is moved to the top of the list. + +image::virtualization/vm-proxmox-14.png[VM Configuration: Boot Order] + +=== VM Console: First Boot + +Now we're ready open up the console and boot the VM for the first time. You should see the normal GRUB boot loader and kernel messages stream across the console until you are presented with the final setup menu. + +image::virtualization/vm-proxmox-15.png[VM Console: First Boot] + +=== End Result + +After you complete this process the VM is running just as if you had booted off of the ISO and went through the full server install process, only now it only takes a fraction of the time! + +=== Next Steps + +It is also advisable to review all the tasks in the general xref:installation/postinstallation-tasks.adoc[post-installation guide] for virtual machines as well. From 34427e9db7985ff2ad33433124a3d79c6c25f0dd Mon Sep 17 00:00:00 2001 From: Paul Maconi Date: Nov 03 2024 18:04:55 +0000 Subject: [PATCH 2/5] minor typos --- diff --git a/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc b/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc index 0779206..c08eb23 100644 --- a/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc +++ b/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc @@ -50,7 +50,7 @@ image::virtualization/vm-proxmox-01.png[Upload Image File] === Verify the image is in place -While not completely necessary, we logged back in to the Proxmox node and verified that the file had actually uploaded to the target folder. We'll come back to this path later when it is time to import the disk image to a VM. +While not completely necessary, we logged back in to the Proxmox node and verified that the file had actually uploaded to the target directory. We'll come back to this path later when it is time to import the disk image to a VM. image::virtualization/vm-proxmox-02.png[Locate Image File] @@ -118,11 +118,11 @@ Now that the VM itself has been built, we need to log in to the Proxmox node via * Log in to the Proxmox node -* cd to the folder where you uploaded the disk image earlier. +* Navigate to the directory where you uploaded the disk image earlier. ** This test article has storage mounted at /mnt/pve/nfs-kraken/osimages/, but your path will be different. -* use the qm disk import command to import your disk image. +* Use the qm disk import command to import your disk image. ** `qm disk import [vm_number] [image_name.qcow2] [target_storage] --format qcow2` From 5d45d100796a86116b15784df06e027225a279b8 Mon Sep 17 00:00:00 2001 From: Paul Maconi Date: Nov 03 2024 18:06:37 +0000 Subject: [PATCH 3/5] words --- diff --git a/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc b/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc index c08eb23..dd4dd51 100644 --- a/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc +++ b/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc @@ -90,7 +90,7 @@ image::virtualization/vm-proxmox-06.png[VM Disks] === VM Creation: CPU -Set the CPU settings as you need them. The test cluster used when writing this documentation had homogenous processors across the cluster, so `host` was safe to use while still enabling live migration. Click `Next`. +Set the CPU settings as you need them. The test cluster used when writing this documentation had identical processors across the cluster, so `host` was safe to use while still enabling live migration. Click `Next`. image::virtualization/vm-proxmox-07.png[VM CPU] diff --git a/preview.pid b/preview.pid new file mode 100644 index 0000000..7ac699d --- /dev/null +++ b/preview.pid @@ -0,0 +1 @@ +17415 From 835146b094dd0cbed7eefe9c7f78564ea4a5a249 Mon Sep 17 00:00:00 2001 From: Paul Maconi Date: Nov 03 2024 18:08:38 +0000 Subject: [PATCH 4/5] words --- diff --git a/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc b/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc index dd4dd51..82a9922 100644 --- a/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc +++ b/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc @@ -164,4 +164,4 @@ After you complete this process the VM is running just as if you had booted off === Next Steps -It is also advisable to review all the tasks in the general xref:installation/postinstallation-tasks.adoc[post-installation guide] for virtual machines as well. +Be sure to check out the tasks in the general xref:installation/postinstallation-tasks.adoc[post-installation guide] for virtual machines as well. diff --git a/preview.pid b/preview.pid index 7ac699d..2fb9245 100644 --- a/preview.pid +++ b/preview.pid @@ -1 +1 @@ -17415 +17754 From 267722a83e2d32b9c8f2c02314d642d6ea7c2429 Mon Sep 17 00:00:00 2001 From: Paul Maconi Date: Nov 03 2024 18:09:44 +0000 Subject: [PATCH 5/5] capitalization in title --- diff --git a/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc b/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc index 82a9922..7a226a9 100644 --- a/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc +++ b/docs/modules/ROOT/pages/virtualization/vm-install-diskimg-proxmox.adoc @@ -1,4 +1,4 @@ -= Installing Fedora Server Edition as a virtual machine using Proxmox Virtual Environment += Installing Fedora Server Edition as a Virtual Machine using Proxmox Virtual Environment Paul Maconi :page-authors: {author}, {author_2} :revnumber: F41 diff --git a/preview.pid b/preview.pid index 2fb9245..79a65ce 100644 --- a/preview.pid +++ b/preview.pid @@ -1 +1 @@ -17754 +17997