I always have the following error when I install a virtual machine
launch failed: Failed to resize instance image - error executing powershell command. Detail: Resize-VHD : �������������̵Ĵ�С�� ϵͳ��������C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\multipassd\vault\instances\krun\ubuntu-20.04-serv er-cloudimg-amd64.vhdx���Ĵ�С�� �������������̵Ĵ�С�� ϵͳ��������C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\multipassd\vault\instances\krun\ubuntu-20.04-serv er-cloudimg-amd64.vhdx���Ĵ�С: ��һ����������ʹ�ô��ļ������������ʡ� (0x80070020)�� ����λ�� ��:1 �ַ�: 1
- Resize-VHD -Path C:/WINDOWS/system32/config/systemprofile/AppData/Roa ...
-
+ CategoryInfo : ResourceBusy: (:) [Resize-VHD], VirtualizationException + FullyQualifiedErrorId : ObjectInUse,Microsoft.Vhd.PowerShell.Cmdlets.ResizeVhd
You have to add the HyperV module to powershell in "Turn Windows features on or off", if you don't check this the checkbox, "Resize-VHD" won't work and will fail the multipass launch.
The direct command is:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Management-PowerShell