Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Proxmox: Add multiple ISOs (CD/DVD Drives) #7950

Closed
clayshek opened this issue Aug 5, 2019 · 8 comments · Fixed by #9653
Closed

[Feature Request] Proxmox: Add multiple ISOs (CD/DVD Drives) #7950

clayshek opened this issue Aug 5, 2019 · 8 comments · Fixed by #9653

Comments

@clayshek
Copy link

clayshek commented Aug 5, 2019

Would be helpful for Proxmox builder to have the ability to add more than one ISO file concurrently. This is possible through the Proxmox UI. Guessing this would be a matter of making changes to the config to allow iso_file(s) to be an array of objects, similar to how 'disks' or 'network_adapters' is currently handled.

The primary use case for this is in current difficulty around using the Proxmox builder to create a new Windows image, and not having a clear path on how to provide an unattended answer file for the Windows setup, as Proxmox doesn't support floppy drives. Being able to provide this file (as well as third party drivers as a 2nd use-case) in a 2nd CD drive (ISO) would be super helpful.

@gentoo9ball
Copy link

@clayshek @SwampDragons Has anyone found a way around this or a 'hacky' way of doing it?

I really want to deploy images like this.

@SwampDragons
Copy link
Contributor

@carlpett is the person to ask about Proxmox :)

@clayshek
Copy link
Author

@gentoo9ball I have a workaround for deploying Proxmox template images without Packer, using Ansible and the qm command line util, which gets around the Packer issue of only allowing a single CD/ISO drive. See https://github.com/clayshek/ans-pve-win-templ

@carlpett
Copy link
Collaborator

I’ve looked into this a bit, and there doesn’t seem to be a super-clean way to implement with the current library we’re using. ISO-mounting devices are handled a bit special.
So it’ll either require doing a bit of refactoring of the lib and getting that upstreamed, or something creative on the Packer end.
I see the use-case though, so it is mostly a question of development time vs utility vs other features.

@gentoo9ball
Copy link

Thank you!!

@jahmelharris
Copy link

I'm currently looking into this as it would be a useful feature for me too. I have a PoC with some hardcoded values and will try and submit a PR once I figure out the codebase a bit more.

In a nutshell, the Proxmox API doesn't support creating extra drives when the VM is created but an API exists that lets us create one after. I've added a call to that in between CreateVm and StartVm.

@jmreyes
Copy link

jmreyes commented May 17, 2020

I have been working on this as well, but my approach is different to #9055: I'm adding config fields for an "extra ISO". This does the trick for the use case we need for unattended Windows images, but I guess it's far from ideal.

The downsides:

  • It's less flexible than the proposed PR. Can't select the specific drive (it's always "ide3"), can't add more than one additional drive.
  • It requires small changes to the proxmox-api-go library.

Since my changes are already handling ISO downloads/uploads and unmounting, I let you check them out in case you find them useful for the current PR. Myself I'm going to look into how easy it would be to allow for several additional_iso_files instead, and also apply the config after VM creation without changes to the API library.

@carlpett also related to this, some days ago I opened a PR Telmate/proxmox-api-go#75 related to a previous PR of yours for ISO upload, fixing some issues I found related to errors when dealing with big files in memory. Maybe you could take a look to see if it's worth merging, and suggest it to the maintainers if that's the case?

@azr azr closed this as completed in #9653 Aug 31, 2020
azr pushed a commit that referenced this issue Aug 31, 2020
#9653)

Allows the mounting of additional ISOs when the VM is created. The config option was taken from PR #9055 and slightly changed. Users can specify an array of bus names, bus numbers and filenames.

"cd_drive":[
{
"bus": "ide",
"bus_number": 3,
"filename": "isos:iso/virtio-win-0.1.187.iso"
},
{
"bus": "sata",
"bus_number": 3,
"filename": "isos:iso/someother.iso"
}
]

Closes: #7950
Co-authored-by: Calle Pettersson <carlpett@users.noreply.github.com>
@ghost
Copy link

ghost commented Oct 13, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Oct 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.