Remove iso from foreman_isos

I using:

Fully Automated Provisioning

On VMWare compute resources it is possible to create a new host with a cd-drive preconfigured and have a per-host image attached before first boot. This allows a fully automated provisioning of hosts via ISO boot. This feature can be used by selecting the Bootdisk Based provisioning method under the OS tab when creating the host, or by setting provision_method: “bootdisk” using the API. Foreman will create an ISO image as part of the orchestration. This image is then uploaded to a VMWare datastore and attached to the VM. The user you configured during compute resource setup needs the permissions Datastore > Browse Datastore and Datastore > Low level file operations.

and it’s working. But i have question i want to remove this iso image from folder foreman_isos in vcetner after provisioning machines.

Is possible?

1 Like

As far as I remember correctly the removal should automatically be done, but a bug is preventing this from happening. The bug is that the ISO does not get ejected from the VM after installation, so it can not be disconnected and not removed.

Sorry but i analyze and found that remove iso option is not implemented

It’s a valid RFE and I think it should be added, I just think it didn’t get added due to time constraints.

2 Likes

@cintrix84
Great, do you have a date when this might be implemented?

This would be a good question for @lstejska and his team, since they own the VMware component and boot_disk.

https://issues.redhat.com/browse/SAT-29934 added to our backlog

1 Like

Hi any update?

Hello, this task is dead? @cintrix84

It’s not dead @WerVa I just don’t think Team Rocket who is run by @lstejska has got around to it yet due to other priorities. I might have some spare time in December to help them out contribute a patch, if they don’t get to it.

1 Like

Looking at foreman_bootdisk v23.12, the detach method should be working:

      def bootdisk_detach_iso
        compute_resource.iso_detach(uuid)
      end

The VMware compute resource has iso_detach implemented, but looks like we don’t remove it anywhere, that’s true.

I hope I’ll have more time soon so I can take a look at it closer.

2 Likes

Hi any news? :slight_smile:

Yes. Some progress here:

  1. fog-vsphere support to clean the ISO:

    Add request to delete iso file by sbernhard · Pull Request #316 · fog/fog-vsphere · GitHub

  2. foreman-bootdisk add–on: Add delete ISO method for vmware by sbernhard · Pull Request #181 · theforeman/foreman_bootdisk · GitHub

  3. And a related enhancement: Use: Rebuild only if host powered off by sbernhard · Pull Request #180 · theforeman/foreman_bootdisk · GitHub

1 Like

thank you, it was important to me