記事:
du -m --max-depth=3 ~/ | sort -nr | head
Get-AppxPackage -Name "*Ubuntu*" | Select PackageFamilyName PackageFamilyName ----------------- CanonicalGroupLimited.UbuntuonWindows_****
$env:LOCALAPPDATA\Packages\<PackageFamilyName>\LocalState\<disk>.vhdx
wsl --shutdown optimize-vhd -Mode full -Path $env:LOCALAPPDATA\Packages\<PackageFamilyName>\LocalState\<disk>.vhdx
wsl -l
code %USERPROFILE%\.wslconfig [wsl2] memory=4GB swap=0 # 該当wslの再起動 wsl -t ubuntu
wsl -l -v NAME STATE VERSION * Ubuntu Running 2 wsl -t Ubuntu
sudo vim /etc/wsl.conf -- [interop] appendWindowsPath = false --
wsl -d CentOS7 -e cat /etc/os-release ... NAME="CentOS Linux" VERSION="7 (Core)" ...
ls /mnt/ c d wsl
explorer.exe .
# \\wsl$\CentOS7\home\<user> が開く
$PSVersionTable.BuildVersion Major Minor Build Revision ----- ----- ----- -------- 10 0 19041 1
wsl -l -v NAME STATE VERSION * Ubuntu Running 1 CentOS7 Stopped 1
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
Invoke-WebRequest -Uri https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi -OutFile wsl_update_x64.msi -UseBasicParsing msiexec /i wsl_update_x64.msi /passive /norestart rm wsl_update_x64.msi
wsl --set-default-version 2 # WSL再起動(PowerShellの管理者権限から) Restart-Service LxssManager
wsl --set-version CentOS7 2 # 確認 wsl -l -v NAME STATE VERSION * Ubuntu Running 1 CentOS7 Running 2
原因:
解決:
mount /dev/sdb on / type ext4 (rw,relatime,discard,errors=remount-ro,data=ordered) ... C:\ on /mnt/c type 9p (rw,noatime,dirsync,aname=drvfs;path=C:\;uid=1000;gid=1000;metadata;umask=22;fmask=11;symlinkroot=/mnt/,mmap,access=client,msize=65536,trans=fd,rfd=8,wfd=8) ...
Stderr: VBoxManage.exe: error: Call to WHvSetupPartition failed: ERROR_SUCCESS (Last=0xc000000d/87) (VERR_NEM_VM_CREATE_FAILED)
WSL1:
WSL2:
記事: