Proxmox 8.0 and iSCSI boot

I’m trying out Proxmox on my ESXi servers, so as before, I’m trying to install on an iSCSI boot drive.

I used this the following websites for reference:
https://forum.proxmox.com/threads/install-pve-directly-on-iscsi-target.101750/
https://library.netapp.com/ecmdocs/ECMP1217221/html/GUID-2A8546C7-347A-40B0-B937-4B31DAAA16DA.html

First step, make sure your LUN target has ID of 0. ESXi didn’t need this, so it was set to a random number, and the LUN would NOT show up in /dev. This took a long time to figure out. So enjoy that.

I’ll assume iSCSI target is set to what it needs to be (I allowed all IPs/IQNs to see the LUN for setup), your network card is set to boot (you can use iPXE as well, but I’m not basic), and your LUN ID is 0. See the first few steps of this post: https://blog.mctechnologies.net/?p=145

Step 1: Boot your Proxmox install ISO, and get to a command line.

Select “Advanced Options”

Select either of the Debug modes

On your first prompt hit “Ctrl-D”. This will get you to a second prompt with your network card driver loaded.

Step 2: Set up networking, install necessary packages for iSCSI, add your target:

Find your network card name (I’m using the second NIC): ip a
Get it up: ip link set enp4s0f1 up
Set to an IP address that is right for you: ip addr add 10.1.60.5/24 dev enp4s0f1
Check if its working right: ip a
Ping your iSCSI target…

Step 3: Install iSCSI packages needed to see the LUN (the versions might be different, just tab the last bit of the file name):

dpkg -i /cdrom/debian/proxmox/packages/libisns0_0.101-2+b1_adm64.deb
dpkg -i /cdrom/debian/proxmox/packages/libopeniscsiusr_2.1.8-1_adm64.deb
dpkg -i /cdrom/debian/proxmox/packages/open-iscsi_2.1.8-1_adm64.deb
(errors are ok, doesn't matter)

Step 4: Add the LUN

Create a folder structure needed for iscsiadm to use:

mkdir /run/lock
mkdir /run/lock/iscsi

Set your initiator name in Proxmox, or in your iSCSI target by using this file /etc/iscsi/initatorname.iscsi
InitiatorName=iqn.1991-05.com:vmh2

Start iscsid: service iscsid start

(These next steps will mount all available nodes, this works for me)

Discovery available LUNS (change the IP):
iscsiadm –mode discovery –op update –type sendtargets –portal 10.1.60.2

Add all the nodes:
iscsiadm –mode node -l all

Get back to installing Proxmox by typing CTRL-D

Do not Automatically reboot after install (Not exactly sure if this is necessary)!

Install as usual, but there is one more step at the end..

It’ll ask you to reboot as the only option, itll actually take you to a command prompt

Step 5: Need to configure one last thing before reboot

Mount the new file systems

mount /dev/pve/root /mnt
mount -o bind /dev /mnt/dev
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/syschroot /mnt /bin/bash

Add and modify iscsi.initramfs:

vi /etc/iscsi/iscsi.initramfs

Add the following line:
ISCSI_AUTO=true

Update GRUB, run:
update-grub && update-initramfs -u -k all

Hit CTRL-D (2x) and it will reboot! It SHOULD load into Proxmox

You May Also Like

About the Author: JoeKewle

I have been working in the IT industry for about 20 years. I have a BS in Computer Science, and a MS in IT Management. I currently work mostly with Windows Server, VMWare, and other Microsoft technologies. I also have a pretty overkill homelab that I tinker with. I put up this site to hopefully document stupid stuff I find, or stuff I spent way too long figuring out so maybe I can help someone.

Leave a Reply

Your email address will not be published. Required fields are marked *