Installing VM from ISO on USB Flash

matthysdt

New Member
Jul 4, 2021
2
0
1
41
Hi all, I'm new to Proxmox.

I'm trying to install a VM from an ISO on a USB flash drive plugged into my physical server.

But I'm unable to register the device's NTFS partition as storage as I get the below error.

Here I mounted the drive

mounted.png

Getting this error:

StorageErr.PNG
I tried unmounting and remounting with -o umask=000 and I also tried chmod, but the device remains read-only.

1629656622264.png


I then copied the ISO file over to another storage location that I noticed was already mounted at /var/lib/vz as "local", but thie ISO doesn't show up in the drop down list when I create the VM.

1629656951643.png

1629656873149.png

1629656800882.png

I also mounted my NAS as a CIFS and placed the ISO in the correct directory, but got the same result as above, the ISO doesn't show up in the drop-down, eventhough the ISO file is definitely there.

Not sure where I'm going wrong, can it be that Windows11 isn't supported yet? I doubt since I get the same result if I choose the OS type as "other".

Some noob advice will be appreciated!
 
Last edited:
Hey,

copying the to file /var/lib/vz/template/iso/ should make it show up in the dropdown.
 
I strongly recommend you to use a tool such as ventoy or easy2boot for the pendrive and boot your empty VM with it. This way you can install almost all operating systems via corresponding ISO on your usb drive.
 
After much trial and error, I figured out a relatively simple way to do it. In my case, the installer ISOs were on a Ventoy flash drive.

Find and mount the USB drive:
root@unas ~]# lsblk -f
sdh
├─sdh1 exfat 1.0 Ventoy 4E21-0000
└─sdh2 vfat FAT16 VTOYEFI 3F32-27F5
root@unas ~]# mkdir /mnt/usb-a/template/iso
root@unas ~]# mount /dev/sdh1 /mnt/usb-a/template/iso

Then, in the web interface:
Datacenter->Storage->Add->Directory
ID: usb-a
Directory: /mnt/usb-a
Content: ISO Image

When you Create VM, you can now access the contents of the USB drive. In the OS tab:
(.) Use CD/DVD disc image file (iso)
Storage: usb-a
ISO Image: <- this drop down list will now be populated.

Hope this helps someone!
 
  • Like
Reactions: dgardner
nikhosgarcia: Your recommendation helped me, and just in time - Thank you very much for posting!

Mounting and making available USB's is not at all intuitive in Proxmox, and takes many hours of searching and trial and error for newbies such as myself to learn.

So, to help others, following is a summary of a several options:

A USB may be a.) bootable, b.) contain a bootable file (ex. ISO), or c.) both

A USB formatted with Ventoy (as c.o.h suggests above - THANK YOU!) may be both. However it seems that the ISO(s) must be located in the root directory of the USB in order to be accessible by Proxmox in the manner that nikhosgarcia suggests above.

a.) A bootable USB may be accessed in two steps: selecting the drop down menu in 'Hardware: Add: USB Device', and then subsequently activating it in the VM boot order at 'Options: Boot Order' - double click and select it.

b.) ISO(s) in the root folder of the USB may be accessed in the manner described above by nikhosgarcia. Note that in order to boot from the ISO, there is a two step process: it must be loaded in 'Hardware: Add: CD/DVD Drive' or by double clicking on the existing 'CD/DVD drive' in the 'Hardware' column, and then by activating it in the VM boot order at 'Options: Boot Order' - double click and select it.

The USB must be mounted in /(dir)/template/iso using the <mount> command.

The /(dir) directory (per your choosing) must be added to the Proxmox 'Datacenter/ Storage/ Add / Directory/ Directory' configuration menu (as per nikhosgarcia's instructions above). Proxmox searches for ISOs two levels further in, in the /template/iso directory.

Note that USBs formatted in NTFS may be mounted with the help of 'ntfs-3g' (<apt install ntfs-3g>) and then <mount -t ntfs-3g /dev/... /mnt/...>.

<lsblk> is used to locate the correct "/dev/..."

Note that bootable ISOs, CDs, and USBs have differing boot requirements. Some require MBR boot, some (U)EFI (without Secure Boot), some UEFI (with Secure Boot), and some additionally a TPM (real or virtualized) - to the best of my understanding and ability to convey succinctly.

The 'SeaBIOS' VM bootloader is used to load MBR boot media. The 'OVMF' VM bootloader is used to load all other boot media. Select the required bootloader by double clicking on the 'BIOS' function in the 'Hardware' column.

To deactivate 'Secure Boot' start the OVMF VM without any boot media, then at the prompt click any key to enter the bios menu, then navigate to 'Device Manager/ Secure Boot Configuration/ Attempt Secure Boot' and click enter, and then F10 to save, and then reboot with boot media activated.

Boot media also have varying CPU and GPU requirements. So you may need to inquire and then test various options in the 'Hardware' column.

Ofcourse ISOs may be copied to a Proxmox directory, as Hannes Laimer suggested (above). However to do so one must mount the USB drive anyways, so might as well mount it in such a way that it may be accessible directly by the VM installer (no need for a doubly copy, and take up hard drive space). USBs after all, are handy!!
 
Last edited:
  • Like
Reactions: nikhosgarcia