Proxmox vm cannot be booted with cdrom (iso) as a non-root user via api.

singhalm

New Member
Jul 10, 2023
4
0
1
Munich
I want to deploy a host in proxmox using bootdisk as a non root user using api. I have an iso file outside proxmox server that needs to be attached to cdrom. This is I have tried so far:
1. Copy iso file to /var/lib/vz/template/iso and then attach this storage volume to cd-rom. Issue: I cannot copy the file to this path as a non-root user.
2. Once the cdrom is attached (VM is powered on) I need to set the boot order so that cdrom is first in boot order list. Issue: I need to restart the vm in order for the boot order to set.
3. Once the vm is booted, I detach the cdrom otherwise after finishing the system boot process vm automatically reboots and it selects the cdrom again and start booting the system with that cdrom. Issue: I cannot detach the cdrom without restarting the vm as it throws hotplug error or doen't update the server (text is in yellow for hardware section in GUI). But if I restart the vm then other processes which are needed for the host configuration are stopped.

I have tried using ide2, scsi0 for cdrom and I have tried booting with harddisk as well but they all either fail with hotplug problem or don't update powered on server unless I explicitly restart it (which is not possible in my case otherwise other processes for host configuration will stop).

Is there any other way to deploy vm using iso as a non-root user via api so that it can update the boot order without system restart and detach the bootdisk device after successful built?
 
Once the cdrom is attached (VM is powered on) I need to set the boot order so that cdrom is first in boot order list. Issue: I need to restart the vm in order for the boot order to set.
You just need to change the boot order once inside of the VM while booting: just press ESC.
 
Normally, if you have DISK and CDROM, the CDROM will only be booted if you have no working boot option (MBR or EFI) on the disk, this is the default and works as expected. Does that not work for you?

If you want to slipstream everything, why don't you fully automate your installation via network booting?
 
Normally, if you have DISK and CDROM, the CDROM will only be booted if you have no working boot option (MBR or EFI) on the disk, this is the default and works as expected. Does that not work for you?

If you want to slipstream everything, why don't you fully automate your installation via network booting?
I have network as well so it tries to boot from network before CD-ROM. But I want to boot specifically from some bootdisk (cdrom or usb).

In my case, user should have option to boot from bootdisk or network and I have network booting working for me but I want the bootdisk option to work as well.
 
Last edited:
I still don't get why you don't use the internal boot manager to choose the device to boot from if you want to have access from a user to the GUI. The user is already looking at the screen and it works like a "real computer", so maybe they're more familiar with this. Okay, it's not F8 or F11 to get the bootscreen, but ESC.

My network boot is showing a vesamenu in which you have the default entry to boot from the local disc, in order to not break anything. Via syslinux and the mac of the guest, you can also control what to boot and it is a very potent way of doing things.
 
I still don't get why you don't use the internal boot manager to choose the device to boot from if you want to have access from a user to the GUI. The user is already looking at the screen and it works like a "real computer", so maybe they're more familiar with this. Okay, it's not F8 or F11 to get the bootscreen, but ESC.

My network boot is showing a vesamenu in which you have the default entry to boot from the local disc, in order to not break anything. Via syslinux and the mac of the guest, you can also control what to boot and it is a very potent way of doing things.
The user doesn't have access to GUI thus cannot use boot manager. They have access to proxmox server via api only because they are using life cycle systems management tool to provision and configure the server. Therefore, I can only use api commands from
https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/{qemu|lxc}/{vmid}/config to access server and to create/modify the vm.
 
The user doesn't have access to GUI thus cannot use boot manager. They have access to proxmox server via api only because they are using life cycle systems management tool to provision and configure the server. Therefore, I can only use api commands from
https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/{qemu|lxc}/{vmid}/config to access server and to create/modify the vm.
I get that, but why in the world do you want to boot from an iso if there is no option to control this VM after that? e.g. booting vanilla windows install, what would you want to do with such a setup?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!