The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to reigister at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Microsoft Virtualization Discussions

Run Repair-NaVirtualDiskAlignment without interaction

WAKEMAN811

How do you run Repair-NaVirtualDiskAlignment so that it does not prompt to continue

We are currently running DataOnTap 8 so the command falls back to host-based copy, which is fine.

When executing: Repair-NaVirtualDiskAlignment  -virtualdisk $VHDFullPath -controller $controller

Aligning virtual disk
Are you sure you wish to align partitions on virtual disk C:\ClusterStorage\Volume1\skeet\189ba1eb-643b-11df-808f-806e6f6e6963_2011-04-05T162446.vhd?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): y

Using host-based copy
A host-based copy will be used.  This may take several minutes.  Are you sure you wish to continue?
[Y] Yes  [N] No  [?] Help (default is "Y"):

When executing: Repair-NaVirtualDiskAlignment -virtualdisk $VHDFullPath -controller $controller -confirm:$False

Using host-based copy

A host-based copy will be used.  This may take several minutes.  Are you sure you wish to continue?

[Y] Yes  [N] No  [?] Help (default is "Y"):

Is there a way to answer the host-based copy question, so no user interaction is required?

5 REPLIES 5

sizemore

Hey Scott,

Your running into what's known as a shouldcontinue prompt.  ShouldContinue is a means for the developer to ensure you see they're warning before they continue in the code path.  In this case were warning that your running a version of DOT that doesn't currently support copy offload and  we'll have to copy the data through the host.  So far so good, the PowerShell coding guidlines dictate that whenever shouldcontinue is used there must be a switch to override.   In our case that switch is -ForceHostCopy.. .

Try:

  Repair-NaVirtualDiskAlignment -VirtualDisk C:\ClusterStorage\Volume1\skeet\189ba1eb-643b-11df-808f-806e6f6e6963_2011-04-05T162446.vhd -Confirm:$false -ForceHostCopy

WAKEMAN811

Using -ForceHost copy with -Confirm:$false still results in

Using host-based copy

A host-based copy will be used.  This may take several minutes.  Are you sure you wish to continue?

[Y] Yes  [N] No  [?] Help (default is "Y"):

Which is why i am looking for more information on why -Confirm:$false even when -ForceHostCopy is used only seems to apply to the "Are you sure you wish to align partitions on virtual disk" question.

Thanks for your prompt assistance with this issue!

cknight

Hi, Scott.  Agreed, you should not see the secondary ShouldContinue prompt if you specify -ForceHostCopy.  We'll aim to address that in the next release.

WAKEMAN811

Do you know when that might happen?

cknight

Yesterday. 

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public