Skip to content

Commit

Permalink
Linux VMs: do not use NVMe storage device (#932)
Browse files Browse the repository at this point in the history
  • Loading branch information
edigaryev authored Oct 31, 2024
1 parent c78c89e commit 3fb8069
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Sources/tart/VM.swift
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,7 @@ class VM: NSObject, VZVirtualMachineDelegate, ObservableObject {
try VZDiskImageStorageDeviceAttachment(url: diskURL, readOnly: false, cachingMode: .cached, synchronizationMode: sync) :
try VZDiskImageStorageDeviceAttachment(url: diskURL, readOnly: false, cachingMode: .automatic, synchronizationMode: sync)

var device: VZStorageDeviceConfiguration
if #available(macOS 14, *), vmConfig.os == .linux {
device = VZNVMExpressControllerDeviceConfiguration(attachment: attachment)
} else {
device = VZVirtioBlockDeviceConfiguration(attachment: attachment)
}
var devices: [VZStorageDeviceConfiguration] = [device]
var devices: [VZStorageDeviceConfiguration] = [VZVirtioBlockDeviceConfiguration(attachment: attachment)]
devices.append(contentsOf: additionalStorageDevices)
configuration.storageDevices = devices

Expand Down

0 comments on commit 3fb8069

Please sign in to comment.