Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def iso_attach(iso, vm_uuid)
disks = server.disks.map { |disk| disk.split(":")[0] }.join(";")
server.update({ ide2: "#{volume.volid},media=cdrom" })
server.update({ boot: "order=ide2;#{disks}" })
server.reboot
end

def iso_detach(vm_uuid)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ def iso_attach(iso, vm_uuid)
'allow_guest_control' => true,
'controller_key' => controller[:key]
}
vm = find_vm_by_uuid(vm_uuid)
vm.stop if vm.ready?
vm.reload
client.vm_reconfig_cdrom options
vm.start if !vm.ready?
end

def iso_detach(vm_uuid)
Expand Down
4 changes: 4 additions & 0 deletions app/models/concerns/foreman_bootdisk/host_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def bootdisk_downloadable?
architecture.blank? || intel_arch?
end

def bootdisk_rebuild_requires_poweroff
true
end

def intel_arch?
/i.86|x86[_-]64/ =~ architecture.name
end
Expand Down
2 changes: 1 addition & 1 deletion test/unit/concerns/compute_resources/vmware_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class VmwareTest < ActiveSupport::TestCase
attrs_out = {
cpus: '1',
provision_method: 'bootdisk',
firmware: 'bios',
firmware: 'automatic',
cdroms: [mock_cdrom],
boot_order: %w[cdrom disk],
boot_retry: 10000
Expand Down