Install Proxmox on a headless server without drive swapping or pre-installing Debian, using ZFS (if required), assuming the server will boot from USB and has some form of serial (RS232) access - I used usb-serial adapter. This worked for me – YMMV.
Overview
UEFI
If your headless server uses UEFI and you don’t have serial console access to the BIOS, you may have problems here. Make sure the laptop used in the first step boots in UEFI mode to get a UEFI compatible “prox-live” image. This method does not add a UEFI boot entry but my headless server still boots ok.
If you put in the extra effort to make a UEFI “prox-live” usb drive, it appears to work for both UEFI and legacy BIOS hosts.
Detail
So we have a working (if long) procedure. Now over to anyone who can offer improvements or shortcuts
Phil.
Overview
- use (eg) laptop to install basic Proxmox on a usb stick to make a “prox-live” system
- modify “prox-live” to work in the headless server
- boot headless server from “prox-live” usb stick
- create VM attached to physical disk(s), proxmox installer as boot iso
- install proxmox in VM
- modify proxmox vm to work in native host
- boot headless from it’s own disks.
- Drink coffee while installing updates
UEFI
If your headless server uses UEFI and you don’t have serial console access to the BIOS, you may have problems here. Make sure the laptop used in the first step boots in UEFI mode to get a UEFI compatible “prox-live” image. This method does not add a UEFI boot entry but my headless server still boots ok.
If you put in the extra effort to make a UEFI “prox-live” usb drive, it appears to work for both UEFI and legacy BIOS hosts.
Detail
- boot laptop from proxmox install dvd (v7.3-3). 32Gb usb drive disk attached
- accept license
- Target harddisk = /dev/sdb (28gb), Next
- set country
- set (temp) password
- set (temp) IP valid for your network
- install …
- boot laptop from prox-live usb stick
- Login on the console.
- Enable serial console. Often ttyS0 is the external D9 COM port, ttyS1 might be IPMI/BMC Serial-Over-Lan console. I used a USB serial adapter.
systemctl enable getty@ttyUSB0.service
systemctl start getty@ttyUSB0.service
- If you know the network device name(s) on the headless server (https://wiki.debian.org/NetworkInterfaceNames) then edit /etc/network/interfaces to match, otherwise we need to do this via the serial console after booting the headless system.
shutdown -h now
- boot headless server from the prox-live usb stick
- if you already configured the network card, it should appear on the network
- otherwise ...
- configure your serial terminal to 9600 baud
- watch the serial console – expect nothing until login prompt.
- login as root
cat /etc/network/interfaces
(to see old interface name)ip addr
(to show network device names)sed -i ‘s/ens0/enp4s0f0/g’ /etc/network/interfaces
(eg, to replace ens0 with enp4s0f0 )- reboot, or just
service networking restart
- Connect to the web-ui on the configured temp IP address
- load the proxmox install .iso, either
- use web-gui to upload, or
- scp it to root@{ip addr}:/var/lib/vz/template/iso/
- create a VM with spec as near to the host server as possible
- configure as many disks as you want the installer to use (eg for zRAID) but make them only 1Gb big – there’s not much space on that USB stick !
- Use the correct bus type (eg sata/ide/scsi)
- If UEFI boot is needed, add UEFI disk
- Open a shell – either in web-ui or ssh root@prox-live
ls -l /dev/disk/by-id
(to find the full names of local real disks)- ** Note existing data can make this look confusing. Ignore all “...-part” rows
- replace the disks in the VM config with the real disks …
qm set 100 -sata0 /dev/disk/by-id/ata-ST3000DM001-1CH166_Z1F41BLC
qm set 100 -sata1 /dev/disk/by-id/ata-ST3000DM001-1CH166_Z1F82BLD
- Start the VM and connect to the console
- for UEFI mode add boot item as in https://pve.proxmox.com/wiki/OVMF/UEFI_Boot_Entries and also disable Secure Boot in OVMF settings
- - I had to hit Esc quick to select dvd as the boot device due to previous disk contents.
- Install PVE as normal, as required for live headless server.
- Ignore the “virtualisation not supported” message.
- If using ZFS, remember to reserve space for swap.
- VM reboots after install
- login to VM as root
- enable serial access if required, either as above (login only) or by changing kernel boot parameters as in here to also see boot messages
- shutdown the VM
- shutdown the prox-live instance
- remove prox-live media & reboot server
- headless server should boot from it’s own disk now
- login on serial console to …
- fix network card names in interfaces file as above
- reboot
- Working system ! – but don’t forget to add swap as usual.
So we have a working (if long) procedure. Now over to anyone who can offer improvements or shortcuts
Phil.