Do not clean up and detach primary disk
This commit is contained in:
parent
9150d3db7b
commit
252a7f7a4e
@ -44,10 +44,11 @@ module VagrantPlugins
|
||||
# @param [Hash] disk_meta - A hash of all the previously defined disks from the last configure_disk action
|
||||
def self.handle_cleanup_disk(machine, defined_disks, disk_meta)
|
||||
vm_info = machine.provider.driver.show_vm_info
|
||||
primary_disk = vm_info["SATA Controller-ImageUUID-0-0"]
|
||||
|
||||
disk_meta.each do |d|
|
||||
dsk = defined_disks.select { |dk| dk.name == d["name"] }
|
||||
if !dsk.empty?
|
||||
if !dsk.empty? || d["uuid"] == primary_disk
|
||||
next
|
||||
else
|
||||
LOGGER.warn("Found disk not in Vagrantfile config: '#{d["name"]}'. Removing disk from guest #{machine.name}")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user