Skip to content

Fix iso_name + don't destroy iso when using iso_name#195

Draft
AtaxyaNetwork wants to merge 1 commit intovatesfr:mainfrom
AtaxyaNetwork:iso-name
Draft

Fix iso_name + don't destroy iso when using iso_name#195
AtaxyaNetwork wants to merge 1 commit intovatesfr:mainfrom
AtaxyaNetwork:iso-name

Conversation

@AtaxyaNetwork
Copy link
Collaborator

Now we can use packer like this, instead of using iso_url and iso_checksum

iso_name = "windows_server_2025.iso"

Also, when using iso_name, packer is now NOT deleting the iso we gave. Usually the goal when using iso_name is to not re-upload the iso 397826231 times, so not deleting it is better :D

Currently working, but still need some tests, so i'm marking it as WiP.

@AtaxyaNetwork AtaxyaNetwork self-assigned this Feb 9, 2026
@AtaxyaNetwork AtaxyaNetwork added the enhancement New feature or request label Feb 9, 2026
@gCyrille
Copy link
Collaborator

Ho nice !
So iso_name is the name of the ISO already uploaded in XO? And PreserveVdi is to not delete this existing VDI?

@AtaxyaNetwork
Copy link
Collaborator Author

Exactly !
iso_name is what you see in XOA:
image
And PreserveVdi is a boolean allowing keeping the iso, if set to true

I hardcoded this because I see no other reason for keeping other VDI. My first though was to let the user choose for each VDI created if he wants to keep it, but it adds too much complexity for almost no value

@nathanael-h
Copy link
Member

Oh nice! This could save a few minutes for each run, I like this. I am wondering what would happen if there are two or more iso with the same name in same or different SR? Should we also use iso_uuid maybe?

@AtaxyaNetwork
Copy link
Collaborator Author

If several ISO has the same name, packer throw an error:

Found more than one VDI with name 'windows_server_2025.iso'. Name must be unique

iso_uuid is a good idea, but since everything in this provider is using names, using uuid here would be weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants