AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题

问题[wsl2](computer)

Martin Hope
Angelo van Meurs
Asked: 2024-03-22 05:12:12 +0800 CST

Docker Desktop 是在 Windows 还是 WSL2 中运行其容器?

  • 6

上下文
我设置了运行 Debian 的 WSL2。我运行一些 Docker 撰写脚本。除了我在 Windows 上安装的 Docker Desktop 之外,所有内容都包含在 WSL2 中。

我已经了解到可以在 WSL2 中运行 Docker,而无需在 Windows 中使用 Docker Desktop。但是,我不明白当我使用 Docker Desktop 时幕后发生了什么。特别是因为我从未(故意)在 Debian 实例上安装任何 docker 软件包。

Windows 中的 Docker Desktop 向我显示哪些容器正在运行。启动和 IO 发生在 Debian 实例中。

问题
docker 引擎/容器在 Windows 中运行还是在 WSL2 中运行?

wsl2
  • 1 个回答
  • 20 Views
Martin Hope
PerkyElixir22
Asked: 2024-03-09 01:16:29 +0800 CST

无法在 Arch 上的 WSL2 中打开图形应用程序,但可以在 Ubuntu 上使用

  • 6

我试图在 Arch 上运行一个带有 GUI 的程序,但它抱怨它无法初始化 GTK。同样的程序在 Ubuntu 上运行得非常好。两个发行版都DISPLAY设置为:0.

图形程序几天前按预期工作,我不记得更改任何可能相关的内容。

我尝试使用 启动 X 服务器XLaunch,但似乎没有任何效果。
重新启动 WSL 和我的计算机并没有解决问题,更新 Arch 或 WSL 也没有解决问题。
启动不同的图形程序(例如gtkwave或xterm)具有相同的结果。(xterm 说Can't open display :0)
回到过去是行不通的,因为我无法使用时间机器。
这些程序在 Ubuntu 中确实按预期运行,但如果可能的话,我更喜欢使用 Arch。

wsl2
  • 1 个回答
  • 71 Views
Martin Hope
Mike T.
Asked: 2023-11-15 03:56:14 +0800 CST

QEMU 嵌套虚拟机

  • 6

我正在尝试在 Debian 12 上使用 qemu 和 virt-manager 构建一个测试环境,以托管运行 WSL2 的 Windows 11 来宾。

我已成功安装 Windows 11(使用 swtpm 和 ovmf 来满足 TPM 和 UEFI 的要求),但是当我尝试安装 WSL 时,安装本身似乎成功,但当客户机重新启动以完成安装过程时,它会启动到Windows 11 自动修复屏幕,无法恢复。

我认为问题与不支持嵌套虚拟化的 CPU 模拟有关,因此为了检查来宾是否支持嵌套虚拟化,我在来宾本身上全新安装了 Debian 12,然后在来宾上安装了 qemu 和 virt-manager guest 并在成功创建嵌套访客计算机之前。

WSL 的系统要求似乎有点模糊(常见问题解答只是说需要嵌套虚拟化),但显然有些事情不太正确,因为即使我可以嵌套 QEMU 来宾,WSL2 也无法工作!

我需要对下面的模板或 Windows 11 客户机执行什么操作才能使 WSL2 正常工作 - 或者我的物理主机的处理器是否缺少关键功能?

编辑 15/11 :这不是硬件问题,我可以使用 VMware Player 17 在 Windows 11 客户机上安装 WSL2。

谢谢。

Debian 12 安装以下版本的软件。

gir1.2-libvirt-glib-1.0:amd64        4.0.0-2
ipxe-qemu                            1.0.0+git-20190125.36a4c85-5.1
libvirt-clients                      9.0.0-4
libvirt-daemon                       9.0.0-4
libvirt-daemon-config-network        9.0.0-4
libvirt-daemon-config-nwfilter       9.0.0-4
libvirt-daemon-driver-qemu           9.0.0-4
libvirt-daemon-system                9.0.0-4
libvirt-daemon-system-systemd        9.0.0-4
libvirt-glib-1.0-0:amd64             4.0.0-2
libvirt0:amd64                       9.0.0-4
ovmf                                 2022.11-6
python3-libvirt                      9.0.0-1
qemu-system-common                   1:7.2+dfsg-7+deb12u2
qemu-system-data                     1:7.2+dfsg-7+deb12u2
qemu-system-x86                      1:7.2+dfsg-7+deb12u2
qemu-utils                           1:7.2+dfsg-7+deb12u2
swtpm                                0.7.1-1.3
swtpm-libs:amd64                     0.7.1-1.3
swtpm-tools                          0.7.1-1.3
virt-manager                         1:4.1.0-2
virtinst                             1:4.1.0-2

我的来宾计算机是使用以下 XML 模板定义的。

<domain type='kvm'>
  <name>guest</name>
  <uuid>68171bfe-29f3-4e19-93b6-00b8d9501469</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://microsoft.com/win/11"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <os firmware='efi'>
    <type arch='x86_64' machine='pc-q35-7.2'>hvm</type>
    <boot dev='hd'/>
    <bootmenu enable='no'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv mode='custom'>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
    </hyperv>
    <vmport state='off'/>
  </features>
  <cpu mode='host-passthrough' check='none' migratable='on'/>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <timer name='hypervclock' present='yes'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/home/.../disk1.qcow2'/>
      <target dev='sda' bus='sata'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='sdb' bus='sata'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='qemu-xhci' ports='15'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x10'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
    </controller>
    <controller type='pci' index='2' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='2' port='0x11'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
    </controller>
    <controller type='pci' index='3' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='3' port='0x12'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
    </controller>
    <controller type='pci' index='4' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='4' port='0x13'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
    </controller>
    <controller type='pci' index='5' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='5' port='0x14'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
    </controller>
    <controller type='pci' index='6' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='6' port='0x15'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
    </controller>
    <controller type='pci' index='7' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='7' port='0x16'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
    </controller>
    <controller type='pci' index='8' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='8' port='0x17'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
    </controller>
    <controller type='pci' index='9' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='9' port='0x18'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0' multifunction='on'/>
    </controller>
    <controller type='pci' index='10' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='10' port='0x19'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
    </controller>
    <controller type='pci' index='11' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='11' port='0x1a'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
    </controller>
    <controller type='pci' index='12' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='12' port='0x1b'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x3'/>
    </controller>
    <controller type='pci' index='13' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='13' port='0x1c'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x4'/>
    </controller>
    <controller type='pci' index='14' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='14' port='0x1d'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x5'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:fe:66:8e'/>
      <source bridge='br0'/>
      <model type='e1000e'/>
      <link state='up'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <tpm model='tpm-crb'>
      <backend type='emulator' version='2.0'/>
    </tpm>
    <graphics type='spice' autoport='yes'>
      <listen type='address'/>
      <image compression='off'/>
    </graphics>
    <sound model='ich9'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
    </sound>
    <audio id='1' type='spice'/>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
    <redirdev bus='usb' type='spicevmc'>
      <address type='usb' bus='0' port='2'/>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
      <address type='usb' bus='0' port='3'/>
    </redirdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </memballoon>
  </devices>
</domain>

Cat/proc/cpuinfo提供了物理主机上的以下详细信息(仅第一个核心);

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 142
model name  : Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz
stepping    : 12
microcode   : 0xf8
cpu MHz     : 400.000
cache size  : 8192 KB
physical id : 0
siblings    : 8
core id     : 0
cpu cores   : 4
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 22
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust sgx bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d arch_capabilities
vmx flags   : vnmi preemption_timer invvpid ept_x_only ept_ad ept_1gb flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest ple shadow_vmcs pml ept_mode_based_exec
bugs        : spectre_v1 spectre_v2 spec_store_bypass swapgs taa itlb_multihit srbds mmio_stale_data retbleed eibrs_pbrsb gds
bogomips    : 4599.93
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

以及对客人的以下结果。

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 142
model name  : Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz
stepping    : 12
microcode   : 0xf8
cpu MHz     : 2303.996
cache size  : 16384 KB
physical id : 0
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 22
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust sgx bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves arat umip md_clear arch_capabilities
vmx flags   : vnmi preemption_timer invvpid ept_x_only ept_ad ept_1gb flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest shadow_vmcs pml
bugs        : spectre_v1 spectre_v2 spec_store_bypass swapgs taa srbds mmio_stale_data retbleed eibrs_pbrsb gds
bogomips    : 4607.99
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

# cat /sys/module/kvm_intel/parameters/nested
Y
#

即使重新安装 Windws 11 后,按照下面的建议启用ignore_msrs也没有什么区别。

# cat /sys/module/kvm/parameters/ignore_msrs
Y
#

QEMU 似乎认为一切正常(只有一个警告,我知道安全启动已启用,因为在安装 WSL 之前 Windows 11 一直有效)。

# virt-host-validate
  QEMU: Checking for hardware virtualization                                 : PASS
  QEMU: Checking if device /dev/kvm exists                                   : PASS
  QEMU: Checking if device /dev/kvm is accessible                            : PASS
  QEMU: Checking if device /dev/vhost-net exists                             : PASS
  QEMU: Checking if device /dev/net/tun exists                               : PASS
  QEMU: Checking for cgroup 'cpu' controller support                         : PASS
  QEMU: Checking for cgroup 'cpuacct' controller support                     : PASS
  QEMU: Checking for cgroup 'cpuset' controller support                      : PASS
  QEMU: Checking for cgroup 'memory' controller support                      : PASS
  QEMU: Checking for cgroup 'devices' controller support                     : PASS
  QEMU: Checking for cgroup 'blkio' controller support                       : PASS
  QEMU: Checking for device assignment IOMMU support                         : PASS
  QEMU: Checking if IOMMU is enabled by kernel                               : PASS
  QEMU: Checking for secure guest support                                    : WARN (Unknown if this platform has Secure Guest support)

重复全新安装 Windows 11,它工作正常,直到我安装 WSL,然后它就进入启动/修复循环......

如果有 BSOD,我不会看到它。

wsl2
  • 2 个回答
  • 114 Views
Martin Hope
AntonioK
Asked: 2023-07-03 15:20:04 +0800 CST

使用“新 Windows 终端”通过 ssh 登录非 UTF 代码页服务器时出现问题

  • 5

我正在使用 Windows 11 和“新 Windows 终端”(Windows 11 中的默认应用程序和“主”应用程序,用于使用控制台,而不是旧的cmd.exe或新的PowerShell.exe)。它具有开箱即用的 UTF-8 支持,并且可以显示非拉丁字符、表情符号等(如果它们采用 UTF-8 代码页)。

在该终端中,我运行默认的 Ubuntu wsl 配置文件。从 wsl Ubuntu 命令行 Issh到远程非 Windows 服务器。

如果服务器使用 UTF-8 代码页,一切看起来都很好。但如果服务器使用“经典”非 UTF 代码页,我在终端中看不到非拉丁字符。附图的左侧部分显示了问题。

左边是 windows 终端,右边是 putty

例如,我有一个旧的 FreeBSD 服务器,它不支持开箱即用的控制台中的 UTF-8(并且没有理由实现它 - 该服务器是工作了几十年的遗产)。

如果我使用puttyssh 该服务器 - 我只需在“窗口”->“翻译”->“字符集”->“远程字符集”菜单中设置正确的代码页(通常KOI8-R或Win1251 (Cyrillic)对于设置使用西里尔字母的服务器来说是正确的选择)。

如何在“新Windows终端”中设置相同的行为?它有几十个设置,但我找不到有关代码页的任何信息。

或者也许我应该ssh在 Windows 端使用一些特殊的(非终端)设置来动态转换远程服务器输出?

wsl2
  • 1 个回答
  • 54 Views
Martin Hope
Dmitriano
Asked: 2023-04-21 17:48:24 +0800 CST

无法将 WSL 更新到版本 2

  • 5

我有两台 Windows 10 机器。

第一台机器安装了 WSL 版本 1,我能够在 PowerShell 中使用以下命令成功将其更新为版本 2 :

wsl --update
wsl --shutdown
wsl --set-version Ubuntu-22.04 2

但是当我在第二台机器上尝试相同的命令时

wsl --set-version Ubuntu-22.04 2

我有:

For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion in progress, this may take a few minutes.
The operation could not be started because a required feature is not installed.
Error code: Wsl/Service/CreateVm/HCS_E_SERVICE_NOT_AVAILABLE

什么会导致这个?

这两个 Windows 10 版本都是 22H2。

以及命令的输出

wsl --list --online
wsl -l -v

在两台机器上完全相同。

wsl2
  • 1 个回答
  • 20 Views
Martin Hope
developer82
Asked: 2022-10-09 09:53:47 +0800 CST

在 Windows 11 上卸载发行版后删除 WSL2 文件

  • 6

我已经使用 WSL2 在我的 Windows 11 机器上安装了 UBubtu-20.04。我最近卸载了它并安装了 Ubuntu-22.04 来替换它。

当我在我的 PC 上转到 Linux 时,我仍然看到一个 Ubuntu-20.04 的共享,其中包含所有文件。我怎样才能摆脱这些文件以及共享?

在此处输入图像描述

wsl2
  • 1 个回答
  • 80 Views
Martin Hope
Jiu hong
Asked: 2022-08-23 18:18:28 +0800 CST

如何在wsl2上刷新系统信息

  • 11

这是我打开 wsl2 终端时屏幕信息的一部分。

正如时间所示,它是 23 天前。

如何刷新此信息?

  System information as of Sat Jul 30 22:52:35 CST 2022

  System load:                      0.107421875
  Usage of /:                       90.7% of 250.98GB
  Memory usage:                     10%
  Swap usage:                       0%
  Processes:                        44
  Users logged in:                  0
  IPv4 address for br-345a7fa3f56b: 172.18.0.1
  IPv4 address for docker0:         172.17.0.1
  IPv4 address for eth0:            172.31.228.161
wsl2
  • 1 个回答
  • 116 Views
Martin Hope
pogurek
Asked: 2022-08-20 10:11:29 +0800 CST

Windows 终端中同一 WSL2 linux 实例的不同配置文件

  • 6

我在 Windows 10 的 WSL2 中安装了 Ubuntu-22.04。但是,我的 settings.json 中有两个 Windows 终端配置文件。其中一个肯定是在一些更新后出现的,它从一开始就不存在。我仔细检查了两个配置文件都引用了同一个 linux WSL2 实例。对我来说更令人困惑的是,每个配置文件都会导致不同的视觉外观。

我想知道“自动”添加终端配置文件的一般工作原理以及在我的特定情况下到底发生了什么。这是 settings.json 的相关部分:

{
    "guid": "{f9ceaf27-504c-58d7-927c-d1d6a7ac7d3c}",
    "hidden": false,
    "name": "Ubuntu 22.04.1 LTS",
    "source": "CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc"
},
{
    "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
    "hidden": false,
    "name": "Ubuntu-22.04",
    "source": "Windows.Terminal.Wsl"
}
windows-terminal wsl2
  • 1 个回答
  • 119 Views
Martin Hope
David Gonzalo
Asked: 2022-08-12 12:24:03 +0800 CST

更改 WSL2 的存储位置

  • 6

我想知道如何更改存储包含 Debian WSL2 容器信息的文件夹的位置。根据 Microsoft Doc,它位于

C:\Users\<UserName>\.wslconfig 

但我找不到这个文件夹

测试解决方案

%UserProfile%\wslconfig.

图片

图片翻译文字:

Windows can't find 'C:/Users/David/wslconfig'. Check the spelling and try again
wsl2 files-folders
  • 1 个回答
  • 157 Views
Martin Hope
Jiu hong
Asked: 2022-08-08 16:29:13 +0800 CST

如何放大wsl2的大小?

  • 6

WSL2 表示它使用了超过 90% 的大小。

  System information as of Sat Jul 30 22:52:35 CST 2022

  System load:                      0.107421875
  Usage of /:                       90.7% of 250.98GB
  Memory usage:                     10%
  Swap usage:                       0%
  Processes:                        44
  Users logged in:                  0
  IPv4 address for br-345a7fa3f56b: 172.18.0.1
  IPv4 address for docker0:         172.17.0.1
  IPv4 address for eth0:            172.31.228.161

  => / is using 90.7% of 250.98GB

但是,DISKPART 说Virtual size: 500 GB

DISKPART> detail vdisk

Device type ID: 0 (Unknown)
Vendor ID: {00000000-0000-0000-0000-000000000000} (Unknown)
State: Added
Virtual size:  500 GB
Physical size:  235 GB
Filename: E:\WSL2\ubuntu\ext4.vhdx
Is Child: No
Parent Filename:
Associated disk#: Not found.

这是输出Get-VHD –Path xxx

ComputerName            : DESKTOP-RMF966H
Path                    : E:\WSL2\ubuntu\ext4.vhdx
VhdFormat               : VHDX
VhdType                 : Dynamic
FileSize                : 253127294976
Size                    : 536870912000
MinimumSize             :
LogicalSectorSize       : 512
PhysicalSectorSize      : 4096
BlockSize               : 1048576
ParentPath              :
DiskIdentifier          : xxxxxxxxxxxxxxxxxxx
FragmentationPercentage : 100
Alignment               : 1
Attached                : True
DiskNumber              :
IsPMEMCompatible        : False
AddressAbstractionType  : None
Number                  :

为什么wsl2不能识别500GB?

diskpart wsl2
  • 1 个回答
  • 59 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve