mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-07-26 07:58:14 +00:00
fix: correct New-PveVm disk-options warning text
Now that -ScsiHardware is part of HasDiskOptions(), the old "options were ignored" wording was misleading: scsihw is written unconditionally as a VM-level key and is never ignored. Reword to state that the per-disk options are the ones dropped, and that -ScsiHardware (if specified) is still applied. Accurate whether or not -ScsiHardware was passed. Addresses PR #67 follow-up review. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -242,9 +242,10 @@ namespace PSProxmoxVE.Cmdlets.Vms
|
||||
if (!string.IsNullOrEmpty(DiskStorage) && diskSizeGib != null)
|
||||
config[$"{diskBus}0"] = BuildDiskSpec(DiskStorage!, diskSizeGib);
|
||||
else if (HasDiskOptions())
|
||||
WriteWarning("Disk IO options (-DiskBus/-DiskIoThread/-DiskAio/-DiskSsd/-DiskDiscard/-DiskCache) "
|
||||
+ "were specified but no disk is being created (-DiskStorage and -DiskSize are both required). "
|
||||
+ "The options were ignored.");
|
||||
WriteWarning("Disk options were specified but no disk is being created "
|
||||
+ "(-DiskStorage and -DiskSize are both required). The per-disk options "
|
||||
+ "(-DiskBus/-DiskIoThread/-DiskAio/-DiskSsd/-DiskDiscard/-DiskCache) were ignored; "
|
||||
+ "-ScsiHardware, if specified, is still applied as the VM-level scsihw setting.");
|
||||
|
||||
if (!string.IsNullOrEmpty(Bridge))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user