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

Bug fixes for search of primary disk #134

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
5 changes: 3 additions & 2 deletions lib/vagrant-vmware-desktop/cap/disk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module Disk
# 5 : compressed disk optimized for streaming
# 6 : thin provisioned virtual disk - ESX 3.x and above
DEFAULT_DISK_TYPE = 0.freeze
PRIMARY_DISK_SLOTS = ["scsi0:0", "sata0:0", "ide0:0"].map(&:freeze).freeze
PRIMARY_DISK_SLOTS = ["nvme0:0", "scsi0:0", "sata0:0", "ide0:0"].map(&:freeze).freeze

def self.set_default_disk_ext(machine)
DEFAULT_DISK_EXT
Expand Down Expand Up @@ -115,8 +115,9 @@ def self.get_disk(disk, all_disks)
PRIMARY_DISK_SLOTS.each do |primary_slot|
disk_info = all_disks[primary_slot]
@@logger.debug("disk info for primary slot #{primary_slot} - #{disk_info}")
return disk_info if disk_info["present"].to_s.upcase == "TRUE"
return disk_info if !disk_info.nil? && disk_info["present"].to_s.upcase == "TRUE"
end
nil
else
if disk.type == :dvd
all_disks.values.detect { |v| v["filename"] == disk.file }
Expand Down
Loading