0874.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Running a Arch Linux VM in Proxmox VE</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Home Lab,Home Lab Ideas,Hypervisor,Install Guide,Self-Hosted,Arch Linux,VM,Virtual Machine,Virtualization,Linux,Proxmox,Proxmox Host,Proxmox VE,Proxmox Step By Step,Proxmox Tutorial,How To Install Arch Linux On Proxmox,How To Run Arch Linux On Proxmox VE,Arch Linux Virtual Machine,Arch Linux Proxmox VM,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Running a Arch Linux VM in Proxmox VE">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="02/12/2023 01:58:14 PM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Running a Arch Linux VM in Proxmox VE</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <ol>
  26. <li>Download the Arch Linux iso <a href="https://archlinux.org/download/" style="font-size: inherit" target="_blank">Download</a> and upload it to the Proxmox ISO image library</li>
  27. <li>Log into the Proxmox web UI</li>
  28. <li>Select a storage from the left navigation pane to download the .iso to</li>
  29. <li>Select ISO Images in the left sub-navigation pane</li>
  30. <li>Right click the Proxmox node name &gt; Create VM</li>
  31. <li>Give the VM a unique ID and Name &gt; Next</li>
  32. <li>On the OS tab, Select the Arch Linux installation .iso file, leave the Type as Linux and the Version as 5.x - 2.6 Kernel &gt; Next</li>
  33. <li>Leave the defaults on the System tab &gt; Next</li>
  34. <li>On the Hard Disk tab, set the Disk size to 30 GiB or more &gt; Next</li>
  35. <li>On the CPU tab, set Cores to 2 or more and Type to host &gt; Next</li>
  36. <li>On the Memory tab, set the Memory to 4096 or more &gt; Next</li>
  37. <li>Leave the defaults on the Network tab &gt; Next</li>
  38. <li>Verify the summary and click Finish</li>
  39. <li>Right click the Arch Linux VM in the left navigation pane &gt; Start</li>
  40. <li>Click console in the left sub-navigation menu</li>
  41. <li>At the Arch Linux menu, select Arch Linux install medium &gt; Press Enter</li>
  42. <li>Run the following commands to install Arch Linux
  43. <div class="codeBlock"># list disk drives, note the identifier for VBOX HARDDISK<br />
  44. fdisk -l<br />
  45. # partition the drive, change the identifier if needed<br />
  46. fdisk /dev/sda<br />
  47. # create a new partition<br />
  48. n<br />
  49. # set the partition type to primary<br />
  50. p<br />
  51. # default sector<br />
  52. Press Enter to accept default<br />
  53. # press enter to accept the default start sector<br />
  54. 2048<br />
  55. # set the partition size, adjust to leave ~2GB for swap<br />
  56. +14GB<br />
  57. # create a swap partition<br />
  58. n<br />
  59. # set the partition type to primary<br />
  60. p<br />
  61. # default sector<br />
  62. Press Enter to accept default<br />
  63. # set the partition size<br />
  64. Press Enter to accept default<br />
  65. # write the partitions<br />
  66. w<br />
  67. # print out the partitions<br />
  68. fdisk -l<br />
  69. # create ext4 root partition<br />
  70. mkfs.ext4 /dev/sda1<br />
  71. # confirm proceeding with the change if prompted<br />
  72. y<br />
  73. # create swap partition<br />
  74. mkswap /dev/sda2<br />
  75. # confirm proceeding with the change if prompted<br />
  76. y<br />
  77. # mount the root partition<br />
  78. mount /dev/sda1 /mnt<br />
  79. # enable swap<br />
  80. swapon /dev/sda2<br />
  81. # run pacstrap installation<br />
  82. pacstrap /mnt base linux linux-firmware<br />
  83. # generate fstab file<br />
  84. genfstab -U /mnt &gt;&gt; /mnt/etc/fstab<br />
  85. # change root to the /mnt directory<br />
  86. arch-chroot /mnt<br />
  87. # set the hostname<br />
  88. echo archlinux-vm &gt; /etc/hostname<br />
  89. # install grub bootloader<br />
  90. pacman -S grub<br />
  91. grub-install /dev/sda<br />
  92. # create grub config<br />
  93. grub-mkconfig -o /boot/grub/grub.cfg<br />
  94. # install gnome desktop environment<br />
  95. pacman -S gnome networkmanager qemu-guest-agent<br />
  96. # enable required services<br />
  97. systemctl enable gdm.service<br />
  98. systemctl enable NetworkManager.service<br />
  99. # set root passwd<br />
  100. passwd<br />
  101. # shutdown<br />
  102. exit<br />
  103. shutdown now</div>
  104. </li>
  105. <li>In the Proxmox web UI, select Hardware from the left sub-navigation menu &gt; Double click the CD/DVD drive &gt; Select Do not use any media &gt; Click OK</li>
  106. <li>Select Options from the left sub-navigation menu</li>
  107. <li>Double click QEMU Guest Agent &gt; Check the Use QEMU Guest Agent box &gt; Click OK</li>
  108. <li>Right click the Arch Linux VM in the left navigation pane &gt; Start</li>
  109. <li>Click console in the left sub-navigation menu</li>
  110. <li>Welcome to Arch Linux</li>
  111. </ol> </div>
  112. </div>
  113. </body>
  114. </html>