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:
Clint Branham
2026-05-22 14:25:21 -05:00
parent 80b70cdaf6
commit e959fbb9b8
@@ -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))
{