microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.4k stars 819 forks source link

Cannot mount disk to wsl #8246

Closed huiyeruzhou closed 2 years ago

huiyeruzhou commented 2 years ago

Version

10.0.22000.556

WSL Version

Kernel Version

5.10.102.1

Distro Version

Ubantu 20.04

Other Software

No response

Repro Steps

wsl --mount --vhd D:\yhl\ext4.vhdx

Expected Behavior

the image of another wsl shoulld be mounted to the wsl which is being used.

Actual Behavior

terminal just tell me: 磁盘已附加,但装载失败: Invalid argument。 更多相关信息,请在 WSL2 中运行 'dmesg' 。 若要分离磁盘,请运行 'wsl.exe --unmount \?\D:\yhl\ext4.vhdx'。

Diagnostic Logs

Command line: initrd=\initrd.img panic=-1 nr_cpus=16 swiotlb=force earlycon=uart8250,io,0x3f8,115200 console=hvc0 debug pty.legacy_count=0 [ 0.000000] KERNEL supported cpus: [ 0.000000] Intel GenuineIntel [ 0.000000] AMD AuthenticAMD [ 0.000000] Centaur CentaurHauls [ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers' [ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers' [ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'

[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'compacted' format. [ 0.000000] BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable [ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000e0fff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000001fffff] ACPI data [ 0.000000] BIOS-e820: [mem 0x0000000000200000-0x00000000f7ffffff] usable [ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x00000001c35fffff] usable [ 0.000000] earlycon: uart8250 at I/O port 0x3f8 (options '115200') [ 0.000000] printk: bootconsole [uart8250] enabled [ 0.000000] NX (Execute Disable) protection: active [ 0.000000] DMI not present or invalid. [ 0.000000] Hypervisor detected: Microsoft Hyper-V [ 0.000000] Hyper-V: privilege flags low 0xae7f, high 0x3b8030, hints 0xc2c, misc 0xe0bed7b6 [ 0.000000] Hyper-V Host Build:22000-10.0-0-0.556 [ 0.000000] Hyper-V: LAPIC Timer Frequency: 0x1e8480 [ 0.000000] Hyper-V: Using hypercall for remote TLB flush [ 0.000000] clocksource: hyperv_clocksource_tsc_page: mask: 0xffffffffffffffff max_cycles: 0x24e6a1710, max_idle_ns: 440795202120 ns [ 0.000002] tsc: Detected 3193.883 MHz processor [ 0.000986] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved [ 0.002407] e820: remove [mem 0x000a0000-0x000fffff] usable [ 0.003599] last_pfn = 0x1c3600 max_arch_pfn = 0x400000000 [ 0.004795] MTRR default type: uncachable [ 0.005656] MTRR fixed ranges enabled: [ 0.006446] 00000-3FFFF write-back [ 0.007212] 40000-7FFFF uncachable [ 0.007965] 80000-8FFFF write-back [ 0.008719] 90000-FFFFF uncachable [ 0.009485] MTRR variable ranges enabled: [ 0.010335] 0 base 000000000000 mask FFFF00000000 write-back [ 0.011591] 1 base 000100000000 mask FFF000000000 write-back [ 0.012831] 2 disabled [ 0.013368] 3 disabled [ 0.013904] 4 disabled [ 0.014500] 5 disabled [ 0.015036] 6 disabled [ 0.015571] 7 disabled [ 0.016117] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT [ 0.017602] last_pfn = 0xf8000 max_arch_pfn = 0x400000000 [ 0.018758] Using GB pages for direct mapping [ 0.019903] RAMDISK: [mem 0x03835000-0x0388ffff] [ 0.020890] ACPI: Early table checksum verification disabled [ 0.022100] ACPI: RSDP 0x00000000000E0000 000024 (v02 VRTUAL) [ 0.023322] ACPI: XSDT 0x0000000000100000 000044 (v01 VRTUAL MICROSFT 00000001 MSFT 00000001) [ 0.025158] ACPI: FACP 0x0000000000101000 000114 (v06 VRTUAL MICROSFT 00000001 MSFT 00000001) [ 0.026984] ACPI: DSDT 0x00000000001011B8 01E184 (v02 MSFTVM DSDT01 00000001 MSFT 05000000) [ 0.028811] ACPI: FACS 0x0000000000101114 000040 [ 0.029842] ACPI: OEM0 0x0000000000101154 000064 (v01 VRTUAL MICROSFT 00000001 MSFT 00000001) [ 0.031650] ACPI: SRAT 0x000000000011F33C 0003B0 (v02 VRTUAL MICROSFT 00000001 MSFT 00000001) [ 0.033454] ACPI: APIC 0x000000000011F6EC 0000C8 (v04 VRTUAL MICROSFT 00000001 MSFT 00000001) [ 0.035305] ACPI: Reserving FACP table memory at [mem 0x101000-0x101113] [ 0.036751] ACPI: Reserving DSDT table memory at [mem 0x1011b8-0x11f33b] [ 0.038172] ACPI: Reserving FACS table memory at [mem 0x101114-0x101153] [ 0.039595] ACPI: Reserving OEM0 table memory at [mem 0x101154-0x1011b7] [ 0.041017] ACPI: Reserving SRAT table memory at [mem 0x11f33c-0x11f6eb] [ 0.042474] ACPI: Reserving APIC table memory at [mem 0x11f6ec-0x11f7b3] [ 0.043921] ACPI: Local APIC address 0xfee00000 [ 0.045001] Zone ranges: [ 0.045544] DMA [mem 0x0000000000001000-0x0000000000ffffff] [ 0.046878] DMA32 [mem 0x0000000001000000-0x00000000ffffffff] [ 0.048193] Normal [mem 0x0000000100000000-0x00000001c35fffff] [ 0.049507] Device empty [ 0.050119] Movable zone start for each node [ 0.051044] Early memory node ranges [ 0.051806] node 0: [mem 0x0000000000001000-0x000000000009ffff] [ 0.053159] node 0: [mem 0x0000000000200000-0x00000000f7ffffff] [ 0.054496] node 0: [mem 0x0000000100000000-0x00000001c35fffff] [ 0.055827] Initmem setup node 0 [mem 0x0000000000001000-0x00000001c35fffff] [ 0.057324] On node 0 totalpages: 1815711 [ 0.058176] DMA zone: 59 pages used for memmap [ 0.059196] DMA zone: 22 pages reserved [ 0.060052] DMA zone: 3743 pages, LIFO batch:0 [ 0.061054] DMA32 zone: 16320 pages used for memmap [ 0.062175] DMA32 zone: 1011712 pages, LIFO batch:63 [ 0.063268] Normal zone: 12504 pages used for memmap [ 0.064361] Normal zone: 800256 pages, LIFO batch:63 [ 0.065551] On node 0, zone DMA: 1 pages in unavailable ranges [ 0.065567] On node 0, zone DMA: 352 pages in unavailable ranges [ 0.075406] On node 0, zone Normal: 18944 pages in unavailable ranges [ 0.076755] ACPI: Local APIC address 0xfee00000 [ 0.079164] ACPI: LAPIC_NMI (acpi_id[0x01] dfl dfl lint[0x1]) [ 0.080528] IOAPIC[0]: apic_id 16, version 17, address 0xfec00000, GSI 0-23 [ 0.082010] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) [ 0.083414] ACPI: IRQ9 used by override. [ 0.084260] Using ACPI (MADT) for SMP configuration information [ 0.085542] smpboot: Allowing 16 CPUs, 0 hotplug CPUs [ 0.086624] [mem 0xf8000000-0xffffffff] available for PCI devices [ 0.087922] Booting paravirtualized kernel on Hyper-V [ 0.088998] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.094563] setup_percpu: NR_CPUS:256 nr_cpumask_bits:256 nr_cpu_ids:16 nr_node_ids:1 [ 0.096921] percpu: Embedded 56 pages/cpu s190040 r8192 d31144 u262144 [ 0.098336] pcpu-alloc: s190040 r8192 d31144 u262144 alloc=1*2097152 [ 0.099694] pcpu-alloc: [0] 00 01 02 03 04 05 06 07 [0] 08 09 10 11 12 13 14 15 [ 0.101328] Hyper-V: PV spinlocks enabled [ 0.102184] PV qspinlock hash table entries: 256 (order: 0, 4096 bytes, linear) [ 0.103761] Built 1 zonelists, mobility grouping on. Total pages: 1786806 [ 0.105220] Kernel command line: initrd=\initrd.img panic=-1 nr_cpus=16 swiotlb=force earlycon=uart8250,io,0x3f8,115200 console=hvc0 debug pty.legacy_count=0 [ 0.109310] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear) [ 0.111579] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes, linear) [ 0.113285] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.127896] Memory: 4085636K/7262844K available (16404K kernel code, 2544K rwdata, 9048K rodata, 1580K init, 2772K bss, 238004K reserved, 0K cma-reserved) [ 0.130916] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=16, Nodes=1 [ 0.132331] ftrace: allocating 51665 entries in 202 pages [ 0.147128] ftrace: allocated 202 pages with 4 groups [ 0.159158] rcu: Hierarchical RCU implementation. [ 0.160174] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=16. [ 0.161607] Rude variant of Tasks RCU enabled. [ 0.162542] Tracing variant of Tasks RCU enabled. [ 0.163532] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. [ 0.165104] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=16 [ 0.168493] Using NULL legacy PIC [ 0.169224] NR_IRQS: 16640, nr_irqs: 552, preallocated irqs: 0 [ 0.170646] random: crng done (trusting CPU's manufacturer) [ 0.171819] Console: colour dummy device 80x25 [ 0.172747] ACPI: Core revision 20200925 [ 0.173651] Failed to register legacy timer interrupt [ 0.174754] APIC: Switch to symmetric I/O mode setup [ 0.175798] Switched APIC routing to physical flat. [ 0.176835] Hyper-V: Using IPI hypercalls [ 0.177727] Hyper-V: Using enlightened APIC (xapic mode) [ 0.177794] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x2e09b79f90a, max_idle_ns: 440795254790 ns [ 0.181137] Calibrating delay loop (skipped), value calculated using timer frequency.. 6387.76 BogoMIPS (lpj=31938830) [ 0.183395] pid_max: default: 32768 minimum: 301 [ 0.184390] LSM: Security Framework initializing [ 0.185380] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes, linear) [ 0.186985] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes, linear) [ 0.188815] x86/cpu: User Mode Instruction Prevention (UMIP) activated [ 0.190316] Last level iTLB entries: 4KB 512, 2MB 512, 4MB 256 [ 0.191135] Last level dTLB entries: 4KB 2048, 2MB 2048, 4MB 1024, 1GB 0 [ 0.191135] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization [ 0.191135] Spectre V2 : Mitigation: Full AMD retpoline [ 0.191135] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch [ 0.191135] Spectre V2 : Enabling Restricted Speculation for firmware calls [ 0.191135] Spectre V2 : mitigation: Enabling conditional Indirect Branch Prediction Barrier [ 0.191135] Spectre V2 : User space: Mitigation: STIBP via seccomp and prctl [ 0.191135] Speculative Store Bypass: Mitigation: Speculative Store Bypass disabled via prctl and seccomp [ 0.191135] Freeing SMP alternatives memory: 56K [ 0.191135] smpboot: CPU0: AMD Ryzen 7 5800H with Radeon Graphics (family: 0x19, model: 0x50, stepping: 0x0) [ 0.191135] Performance Events: Fam17h+ core perfctr, AMD PMU driver. [ 0.191135] ... version: 0 [ 0.191135] ... bit width: 48 [ 0.191135] ... generic registers: 6 [ 0.191135] ... value mask: 0000ffffffffffff [ 0.191135] ... max period: 00007fffffffffff [ 0.191135] ... fixed-purpose events: 0 [ 0.191135] ... event mask: 000000000000003f [ 0.191188] rcu: Hierarchical SRCU implementation. [ 0.192563] smp: Bringing up secondary CPUs ... [ 0.193602] x86: Booting SMP configuration: [ 0.194563] .... node #0, CPUs: #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 #13 #14 #15 [ 0.201271] smp: Brought up 1 node, 16 CPUs [ 0.204136] smpboot: Max logical packages: 1 [ 0.205041] smpboot: Total of 16 processors activated (102204.25 BogoMIPS) [ 0.211155] node 0 deferred pages initialised in 10ms [ 0.212270] devtmpfs: initialized [ 0.212270] x86/mm: Memory block size: 128MB [ 0.212984] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.213252] futex hash table entries: 4096 (order: 6, 262144 bytes, linear) [ 0.215005] NET: Registered protocol family 16 [ 0.216011] thermal_sys: Registered thermal governor 'step_wise' [ 0.216029] cpuidle: using governor menu [ 0.221164] ACPI: bus type PCI registered [ 0.222039] PCI: Fatal: No config space access function found [ 0.222039] Kprobes globally optimized [ 0.222735] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages [ 0.222735] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages [ 0.231158] raid6: skip pq benchmark and using algorithm avx2x4 [ 0.232428] raid6: using avx2x2 recovery algorithm [ 0.233427] ACPI: Added _OSI(Module Device) [ 0.234294] ACPI: Added _OSI(Processor Device) [ 0.234294] ACPI: Added _OSI(3.0 _SCP Extensions) [ 0.234294] ACPI: Added _OSI(Processor Aggregator Device) [ 0.234294] ACPI: Added _OSI(Linux-Dell-Video) [ 0.234294] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio) [ 0.235255] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics) [ 0.239675] ACPI: 1 ACPI AML tables successfully acquired and loaded [ 0.241522] ACPI: Interpreter enabled [ 0.242311] ACPI: (supports S0 S5) [ 0.243024] ACPI: Using IOAPIC for interrupt routing [ 0.244085] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug [ 0.246097] ACPI: Enabled 2 GPEs in block 00 to 0F [ 0.248067] iommu: Default domain type: Translated [ 0.249151] SCSI subsystem initialized [ 0.249940] ACPI: bus type USB registered [ 0.250778] usbcore: registered new interface driver usbfs [ 0.251142] usbcore: registered new interface driver hub [ 0.252335] usbcore: registered new device driver usb [ 0.781144] hv_vmbus: Vmbus version:5.2 [ 0.782450] PCI: Using ACPI for IRQ routing [ 0.781204] hv_vmbus: Unknown GUID: c376c1c3-d276-48d2-90a9-c04748072c60 [ 0.783317] PCI: System does not support PCI [ 0.791170] hv_vmbus: Unknown GUID: 6e382d18-3336-4f4b-acc4-2b7703d4df4a [ 0.794101] hv_vmbus: Unknown GUID: dde9cbc0-5060-4436-9448-ea1254a5d177 [ 0.793133] clocksource: Switched to clocksource tsc-early [ 0.894848] VFS: Disk quotas dquot_6.6.0 [ 0.895836] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 0.897396] FS-Cache: Loaded [ 0.898063] pnp: PnP ACPI init [ 0.898854] pnp 00:00: Plug and Play ACPI device, IDs PNP0501 (active) [ 0.900301] pnp 00:01: Plug and Play ACPI device, IDs PNP0501 (active) [ 0.901702] pnp 00:02: Plug and Play ACPI device, IDs PNP0b00 (active) [ 0.903213] pnp: PnP ACPI: found 3 devices [ 0.906216] NET: Registered protocol family 2 [ 0.907341] IP idents hash table entries: 131072 (order: 8, 1048576 bytes, linear) [ 0.909462] tcp_listen_portaddr_hash hash table entries: 4096 (order: 4, 65536 bytes, linear) [ 0.911488] TCP established hash table entries: 65536 (order: 7, 524288 bytes, linear) [ 0.913209] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes, linear) [ 0.914969] TCP: Hash tables configured (established 65536 bind 65536) [ 0.916373] UDP hash table entries: 4096 (order: 5, 131072 bytes, linear) [ 0.917811] UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes, linear) [ 0.919364] NET: Registered protocol family 1 [ 0.920601] RPC: Registered named UNIX socket transport module. [ 0.921904] RPC: Registered udp transport module. [ 0.922891] RPC: Registered tcp transport module. [ 0.923867] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.925212] PCI: CLS 0 bytes, default 64 [ 0.926055] Trying to unpack rootfs image as initramfs... [ 0.927354] Freeing initrd memory: 364K [ 0.928169] PCI-DMA: Using software bounce buffering for IO (SWIOTLB) [ 0.929567] software IO TLB: mapped [mem 0x00000000f4000000-0x00000000f8000000] (64MB) [ 0.932276] kvm: no hardware support [ 0.933464] kvm: Nested Virtualization enabled [ 0.934423] SVM: kvm: Nested Paging enabled [ 0.935312] SVM: Virtual VMLOAD VMSAVE supported [ 0.937996] Initialise system trusted keyrings [ 0.939005] workingset: timestamp_bits=46 max_order=21 bucket_order=0 [ 0.940832] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.942276] NFS: Registering the id_resolver key type [ 0.943335] Key type id_resolver registered [ 0.944201] Key type id_legacy registered [ 0.945076] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 0.946474] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering... [ 0.948026] Installing knfsd (copyright (C) 1996 okir@monad.swb.de). [ 0.949626] Key type cifs.idmap registered [ 0.950526] fuse: init (API version 7.32) [ 0.951483] SGI XFS with ACLs, security attributes, realtime, scrub, repair, quota, no debug enabled [ 0.953633] 9p: Installing v9fs 9p2000 file system support [ 0.954820] FS-Cache: Netfs '9p' registered for caching [ 0.955954] FS-Cache: Netfs 'ceph' registered for caching [ 0.957090] ceph: loaded (mds proto 32) [ 0.959941] hv_vmbus: Unknown GUID: 6e382d18-3336-4f4b-acc4-2b7703d4df4a [ 0.960604] NET: Registered protocol family 38 [ 0.962393] xor: automatically using best checksumming function avx [ 0.963875] Key type asymmetric registered [ 0.964731] Asymmetric key parser 'x509' registered [ 0.965746] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250) [ 0.967905] hv_vmbus: registering driver hv_pci [ 0.969054] hv_pci d9a557b7-89ab-454b-a0e0-c033824bde3c: PCI VMBus probing: Using version 0x10003 [ 0.971663] hv_pci d9a557b7-89ab-454b-a0e0-c033824bde3c: PCI host bridge to bus 89ab:00 [ 0.973547] pci_bus 89ab:00: root bus resource [mem 0x9ffe00000-0x9ffe02fff window] [ 0.975633] pci 89ab:00:00.0: [1af4:1043] type 00 class 0x010000 [ 0.977730] pci 89ab:00:00.0: reg 0x10: [mem 0x9ffe00000-0x9ffe00fff 64bit] [ 0.979730] pci 89ab:00:00.0: reg 0x18: [mem 0x9ffe01000-0x9ffe01fff 64bit] [ 0.981752] pci 89ab:00:00.0: reg 0x20: [mem 0x9ffe02000-0x9ffe02fff 64bit] [ 0.984954] pci 89ab:00:00.0: BAR 0: assigned [mem 0x9ffe00000-0x9ffe00fff 64bit] [ 0.986881] pci 89ab:00:00.0: BAR 2: assigned [mem 0x9ffe01000-0x9ffe01fff 64bit] [ 0.988790] pci 89ab:00:00.0: BAR 4: assigned [mem 0x9ffe02000-0x9ffe02fff 64bit] [ 0.991038] hv_pci 2342b926-5ac2-40a6-b3ce-890edba5dcfb: PCI VMBus probing: Using version 0x10003 [ 0.993533] hv_pci 2342b926-5ac2-40a6-b3ce-890edba5dcfb: PCI host bridge to bus 5ac2:00 [ 0.995457] pci 5ac2:00:00.0: [1414:008e] type 00 class 0x030200 [ 0.996144] hv_pci 4f6640d0-4e4c-48c9-9f54-bdf81712c145: PCI VMBus probing: Using version 0x10003 [ 0.999405] hv_pci 4f6640d0-4e4c-48c9-9f54-bdf81712c145: PCI host bridge to bus 4e4c:00 [ 1.001104] pci_bus 4e4c:00: root bus resource [mem 0x9ffe04000-0x9ffe06fff window] [ 1.002790] hv_pci 5aa39915-9624-42e4-94ea-cdf9a863bfd7: PCI VMBus probing: Using version 0x10003 [ 1.003310] pci 4e4c:00:00.0: [1af4:1049] type 00 class 0x010000 [ 1.006444] hv_pci 5aa39915-9624-42e4-94ea-cdf9a863bfd7: PCI host bridge to bus 9624:00 [ 1.006622] pci 4e4c:00:00.0: reg 0x10: [mem 0x9ffe04000-0x9ffe04fff 64bit] [ 1.010039] pci 4e4c:00:00.0: reg 0x18: [mem 0x9ffe05000-0x9ffe05fff 64bit] [ 1.011882] pci 4e4c:00:00.0: reg 0x20: [mem 0x9ffe06000-0x9ffe06fff 64bit] [ 1.015359] pci 4e4c:00:00.0: BAR 0: assigned [mem 0x9ffe04000-0x9ffe04fff 64bit] [ 1.017221] pci 4e4c:00:00.0: BAR 2: assigned [mem 0x9ffe05000-0x9ffe05fff 64bit] [ 1.019071] pci 4e4c:00:00.0: BAR 4: assigned [mem 0x9ffe06000-0x9ffe06fff 64bit] [ 1.021184] pci 9624:00:00.0: [1414:008e] type 00 class 0x030200 [ 1.025012] ACPI: AC Adapter [AC1] (on-line) [ 1.026437] battery: ACPI: Battery Slot [BAT1] (battery present) [ 1.030542] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 1.032111] 00:00: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [ 1.033910] 00:01: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A [ 1.051856] Non-volatile memory driver v1.3 [ 1.052839] printk: console [hvc0] enabled [ 1.053710] printk: bootconsole [uart8250] disabled [ 1.056562] brd: module loaded [ 1.057307] loop: module loaded [ 1.057497] hv_vmbus: registering driver hv_storvsc [ 1.057908] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information. [ 1.058174] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld Jason@zx2c4.com. All Rights Reserved. [ 1.058389] scsi host0: storvsc_host_t [ 1.058499] tun: Universal TUN/TAP device driver, 1.6 [ 1.058888] PPP generic driver version 2.4.2 [ 1.059156] PPP BSD Compression module registered [ 1.059336] PPP Deflate Compression module registered [ 1.059506] PPP MPPE Compression module registered [ 1.059658] NET: Registered protocol family 24 [ 1.059830] usbcore: registered new interface driver cdc_ether [ 1.060033] usbcore: registered new interface driver cdc_ncm [ 1.060340] hv_vmbus: registering driver hv_netvsc [ 1.060596] VFIO - User Level meta-driver version: 0.3 [ 1.060891] usbcore: registered new interface driver cdc_acm [ 1.061116] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters [ 1.061429] usbcore: registered new interface driver ch341 [ 1.061595] usbserial: USB Serial support registered for ch341-uart [ 1.061794] usbcore: registered new interface driver cp210x [ 1.061946] usbserial: USB Serial support registered for cp210x [ 1.062153] usbcore: registered new interface driver ftdi_sio [ 1.062350] usbserial: USB Serial support registered for FTDI USB Serial Device [ 1.062669] vhci_hcd vhci_hcd.0: USB/IP Virtual Host Controller [ 1.062881] vhci_hcd vhci_hcd.0: new USB bus registered, assigned bus number 1 [ 1.063127] vhci_hcd: created sysfs vhci_hcd.0 [ 1.063402] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10 [ 1.063662] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.063905] usb usb1: Product: USB/IP Virtual Host Controller [ 1.064110] usb usb1: Manufacturer: Linux 5.10.102.1-microsoft-standard-WSL2 vhci_hcd [ 1.064346] usb usb1: SerialNumber: vhci_hcd.0 [ 1.064609] hub 1-0:1.0: USB hub found [ 1.064785] hub 1-0:1.0: 8 ports detected [ 1.065108] vhci_hcd vhci_hcd.0: USB/IP Virtual Host Controller [ 1.065325] vhci_hcd vhci_hcd.0: new USB bus registered, assigned bus number 2 [ 1.065617] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM. [ 1.065960] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10 [ 1.066290] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.066528] usb usb2: Product: USB/IP Virtual Host Controller [ 1.066729] usb usb2: Manufacturer: Linux 5.10.102.1-microsoft-standard-WSL2 vhci_hcd [ 1.066968] usb usb2: SerialNumber: vhci_hcd.0 [ 1.067205] hub 2-0:1.0: USB hub found [ 1.067362] hub 2-0:1.0: 8 ports detected [ 1.067669] hv_vmbus: registering driver hyperv_keyboard [ 1.067966] rtc_cmos 00:02: RTC can wake from S4 [ 1.068912] rtc_cmos 00:02: registered as rtc0 [ 1.069263] rtc_cmos 00:02: setting system clock to 2022-04-07T14:52:29 UTC (1649343149) [ 1.069510] rtc_cmos 00:02: alarms up to one month, 114 bytes nvram [ 1.069827] device-mapper: ioctl: 4.43.0-ioctl (2020-10-01) initialised: dm-devel@redhat.com [ 1.070179] device-mapper: raid: Loading target version 1.15.1 [ 1.070397] usbcore: registered new interface driver usbhid [ 1.070554] usbhid: USB HID core driver [ 1.070711] hv_utils: Registering HyperV Utility Driver [ 1.070876] hv_vmbus: registering driver hv_utils [ 1.071047] hv_vmbus: registering driver hv_balloon [ 1.071052] hv_utils: cannot register PTP clock: 0 [ 1.071267] hv_vmbus: registering driver dxgkrnl [ 1.071463] hv_balloon: Using Dynamic Memory protocol version 2.0 [ 1.071631] hv_utils: TimeSync IC version 4.0 [ 1.071675] (NULL device ): dxgk: dxg_drv_init Version: 2216 [ 1.072309] Free page reporting enabled [ 1.072730] hv_balloon: Cold memory discard hint enabled [ 1.072792] (NULL device ): dxgk: mmio allocated 9ffe10000 200000000 9ffe10000 bffe0ffff [ 1.074255] drop_monitor: Initializing network drop monitor service [ 1.074483] Mirror/redirect action on [ 1.074753] IPVS: Registered protocols (TCP, UDP) [ 1.074925] IPVS: Connection hash table configured (size=4096, memory=64Kbytes) [ 1.075176] IPVS: ipvs loaded. [ 1.075295] IPVS: [rr] scheduler registered. [ 1.075452] IPVS: [wrr] scheduler registered. [ 1.075612] IPVS: [sh] scheduler registered. [ 1.075785] ipip: IPv4 and MPLS over IPv4 tunneling driver [ 1.076753] ipt_CLUSTERIP: ClusterIP Version 0.8 loaded successfully [ 1.077197] Initializing XFRM netlink socket [ 1.077395] NET: Registered protocol family 10 [ 1.077822] Segment Routing with IPv6 [ 1.078570] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 1.078848] NET: Registered protocol family 17 [ 1.079021] Bridge firewalling registered [ 1.079145] 8021q: 802.1Q VLAN Support v1.8 [ 1.079274] sctp: Hash tables configured (bind 256/256) [ 1.079462] 9pnet: Installing 9P2000 support [ 1.088529] Key type dns_resolver registered [ 1.088775] Key type ceph registered [ 1.088990] libceph: loaded (mon/osd proto 15/24) [ 1.089218] NET: Registered protocol family 40 [ 1.089387] hv_vmbus: registering driver hv_sock [ 1.089573] IPI shorthand broadcast: enabled [ 1.089741] sched_clock: Marking stable (1078652232, 10557300)->(1121363300, -32153768) [ 1.090150] registered taskstats version 1 [ 1.090308] Loading compiled-in X.509 certificates [ 1.090623] Btrfs loaded, crc32c=crc32c-generic [ 1.091475] Freeing unused kernel image (initmem) memory: 1580K [ 1.161222] Write protecting the kernel read-only data: 28672k [ 1.162183] Freeing unused kernel image (text/rodata gap) memory: 2024K [ 1.162709] Freeing unused kernel image (rodata/data gap) memory: 1192K [ 1.162947] Run /init as init process [ 1.163075] with arguments: [ 1.163202] /init [ 1.163287] with environment: [ 1.163415] HOME=/ [ 1.163500] TERM=linux [ 1.166576] scsi 0:0:0:0: Direct-Access Msft Virtual Disk 1.0 PQ: 0 ANSI: 5 [ 1.167258] sd 0:0:0:0: Attached scsi generic sg0 type 0 [ 1.167688] sd 0:0:0:0: [sda] 781720 512-byte logical blocks: (400 MB/382 MiB) [ 1.168073] sd 0:0:0:0: [sda] Write Protect is on [ 1.168287] sd 0:0:0:0: [sda] Mode Sense: 0f 00 80 00 [ 1.168589] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 1.422425] EXT4-fs (sda): mounted filesystem without journal. Opts: (null) [ 1.551247] sd 0:0:0:0: [sda] Attached SCSI disk [ 1.591094] hv_pci b762aa53-0c86-4229-939f-71f0df66467f: PCI VMBus probing: Using version 0x10003 [ 1.592628] hv_pci b762aa53-0c86-4229-939f-71f0df66467f: PCI host bridge to bus 0c86:00 [ 1.592875] pci_bus 0c86:00: root bus resource [mem 0xc00000000-0xe00001fff window] [ 1.593581] pci 0c86:00:00.0: [1af4:105a] type 00 class 0x088000 [ 1.595351] pci 0c86:00:00.0: reg 0x10: [mem 0xe00000000-0xe00000fff 64bit] [ 1.596930] pci 0c86:00:00.0: reg 0x18: [mem 0xe00001000-0xe00001fff 64bit] [ 1.598509] pci 0c86:00:00.0: reg 0x20: [mem 0xc00000000-0xdffffffff 64bit] [ 1.601617] pci 0c86:00:00.0: BAR 4: assigned [mem 0xc00000000-0xdffffffff 64bit] [ 1.603232] pci 0c86:00:00.0: BAR 0: assigned [mem 0xe00000000-0xe00000fff 64bit] [ 1.604773] pci 0c86:00:00.0: BAR 2: assigned [mem 0xe00001000-0xe00001fff 64bit] [ 1.613644] virtiofs virtio2: Cache len: 0x200000000 @ 0xc00000000 [ 1.699426] memmap_init_zone_device initialised 2097152 pages in 10ms [ 1.701895] WSL2: SetEphemeralPortRange is a no-op : range (0, 0) [ 1.704286] FS-Cache: Duplicate cookie detected [ 1.704515] FS-Cache: O-cookie c=000000004212ed2a [p=000000001c1ec7f2 fl=222 nc=0 na=1] [ 1.704754] FS-Cache: O-cookie d=00000000cee66cb4 n=00000000a77406ca [ 1.704935] FS-Cache: O-key=[10] '34323934393337343439' [ 1.705085] FS-Cache: N-cookie c=0000000076139387 [p=000000001c1ec7f2 fl=2 nc=0 na=1] [ 1.705300] FS-Cache: N-cookie d=00000000cee66cb4 n=000000004eb96eb4 [ 1.705492] FS-Cache: N-key=[10] '34323934393337343439' [ 1.706501] FS-Cache: Duplicate cookie detected [ 1.706674] FS-Cache: O-cookie c=000000004212ed2a [p=000000001c1ec7f2 fl=222 nc=0 na=1] [ 1.706890] FS-Cache: O-cookie d=00000000cee66cb4 n=00000000a77406ca [ 1.707073] FS-Cache: O-key=[10] '34323934393337343439' [ 1.707224] FS-Cache: N-cookie c=0000000076139387 [p=000000001c1ec7f2 fl=2 nc=0 na=1] [ 1.707444] FS-Cache: N-cookie d=00000000cee66cb4 n=00000000c30a0443 [ 1.707629] FS-Cache: N-key=[10] '34323934393337343439' [ 2.011227] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2e09b79f90a, max_idle_ns: 440795254790 ns [ 2.012890] clocksource: Switched to clocksource tsc [ 2.061205] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 3.271425] scsi 0:0:0:1: Direct-Access Msft Virtual Disk 1.0 PQ: 0 ANSI: 5 [ 3.272814] sd 0:0:0:1: Attached scsi generic sg1 type 0 [ 3.273521] scsi 0:0:0:2: Direct-Access Msft Virtual Disk 1.0 PQ: 0 ANSI: 5 [ 3.273546] sd 0:0:0:1: [sdb] 4194312 512-byte logical blocks: (2.15 GB/2.00 GiB) [ 3.274114] sd 0:0:0:2: Attached scsi generic sg2 type 0 [ 3.274164] sd 0:0:0:1: [sdb] 4096-byte physical blocks [ 3.274545] scsi 0:0:0:3: Direct-Access Msft Virtual Disk 1.0 PQ: 0 ANSI: 5 [ 3.274674] sd 0:0:0:2: [sdc] 536870912 512-byte logical blocks: (275 GB/256 GiB) [ 3.274752] sd 0:0:0:1: [sdb] Write Protect is off [ 3.274753] sd 0:0:0:1: [sdb] Mode Sense: 0f 00 00 00 [ 3.274866] sd 0:0:0:1: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 3.275274] sd 0:0:0:3: Attached scsi generic sg3 type 0 [ 3.275404] sd 0:0:0:2: [sdc] 4096-byte physical blocks [ 3.275631] sd 0:0:0:3: [sdd] 536870912 512-byte logical blocks: (275 GB/256 GiB) [ 3.275857] sd 0:0:0:2: [sdc] Write Protect is off [ 3.276144] sd 0:0:0:3: [sdd] 4096-byte physical blocks [ 3.276181] sd 0:0:0:1: [sdb] Attached SCSI disk [ 3.276337] sd 0:0:0:2: [sdc] Mode Sense: 0f 00 00 00 [ 3.276564] sd 0:0:0:3: [sdd] Write Protect is off [ 3.276875] sd 0:0:0:2: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 3.276952] sd 0:0:0:3: [sdd] Mode Sense: 0f 00 00 00 [ 3.278309] sd 0:0:0:3: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 3.284899] sd 0:0:0:3: [sdd] Attached SCSI disk [ 3.286023] sdc: sdc1 [ 3.286754] sd 0:0:0:2: [sdc] Attached SCSI disk [ 3.292902] EXT4-fs (sdd): recovery complete [ 3.293744] EXT4-fs (sdd): mounted filesystem with ordered data mode. Opts: discard,errors=remount-ro,data=ordered [ 3.371174] Adding 2097152k swap on /dev/sdb. Priority:-2 extents:1 across:2097152k [ 3.475855] hv_pci 91f78235-8776-4636-87c0-683a0a1fb71e: PCI VMBus probing: Using version 0x10003 [ 3.477046] 9pnet_virtio: no channels available for device drvfsa [ 3.477559] hv_pci 91f78235-8776-4636-87c0-683a0a1fb71e: PCI host bridge to bus 8776:00 [ 3.477631] init: (1) WARNING: mount: waiting for virtio device... [ 3.477898] pci_bus 8776:00: root bus resource [mem 0x9ffe08000-0x9ffe0afff window] [ 3.478895] pci 8776:00:00.0: [1af4:1049] type 00 class 0x010000 [ 3.479635] pci 8776:00:00.0: reg 0x10: [mem 0x9ffe08000-0x9ffe08fff 64bit] [ 3.480168] pci 8776:00:00.0: reg 0x18: [mem 0x9ffe09000-0x9ffe09fff 64bit] [ 3.480696] pci 8776:00:00.0: reg 0x20: [mem 0x9ffe0a000-0x9ffe0afff 64bit] [ 3.482806] pci 8776:00:00.0: BAR 0: assigned [mem 0x9ffe08000-0x9ffe08fff 64bit] [ 3.483341] pci 8776:00:00.0: BAR 2: assigned [mem 0x9ffe09000-0x9ffe09fff 64bit] [ 3.483853] pci 8776:00:00.0: BAR 4: assigned [mem 0x9ffe0a000-0x9ffe0afff 64bit] [ 3.584834] hv_pci 19803c33-39c1-42ab-8b58-d719bd8fcdc5: PCI VMBus probing: Using version 0x10003 [ 3.586207] hv_pci 19803c33-39c1-42ab-8b58-d719bd8fcdc5: PCI host bridge to bus 39c1:00 [ 3.586305] 9pnet_virtio: no channels available for device drvfsa [ 3.586552] pci_bus 39c1:00: root bus resource [mem 0x9ffe0c000-0x9ffe0efff window] [ 3.586801] init: (1) WARNING: mount: waiting for virtio device... [ 3.587650] pci 39c1:00:00.0: [1af4:1049] type 00 class 0x010000 [ 3.588441] pci 39c1:00:00.0: reg 0x10: [mem 0x9ffe0c000-0x9ffe0cfff 64bit] [ 3.589067] pci 39c1:00:00.0: reg 0x18: [mem 0x9ffe0d000-0x9ffe0dfff 64bit] [ 3.589689] pci 39c1:00:00.0: reg 0x20: [mem 0x9ffe0e000-0x9ffe0efff 64bit] [ 3.592159] pci 39c1:00:00.0: BAR 0: assigned [mem 0x9ffe0c000-0x9ffe0cfff 64bit] [ 3.592757] pci 39c1:00:00.0: BAR 2: assigned [mem 0x9ffe0d000-0x9ffe0dfff 64bit] [ 3.593336] pci 39c1:00:00.0: BAR 4: assigned [mem 0x9ffe0e000-0x9ffe0efff 64bit] [ 3.693407] hv_pci c8459b23-be4d-4f95-b43e-54bbf4df3bfa: PCI VMBus probing: Using version 0x10003 [ 3.742102] hv_pci c8459b23-be4d-4f95-b43e-54bbf4df3bfa: PCI host bridge to bus be4d:00 [ 3.743033] pci_bus be4d:00: root bus resource [mem 0xbffe10000-0xbffe12fff window] [ 3.744261] pci be4d:00:00.0: [1af4:1049] type 00 class 0x010000 [ 3.745005] pci be4d:00:00.0: reg 0x10: [mem 0xbffe10000-0xbffe10fff 64bit] [ 3.745567] pci be4d:00:00.0: reg 0x18: [mem 0xbffe11000-0xbffe11fff 64bit] [ 3.746118] pci be4d:00:00.0: reg 0x20: [mem 0xbffe12000-0xbffe12fff 64bit] [ 3.748209] pci be4d:00:00.0: BAR 0: assigned [mem 0xbffe10000-0xbffe10fff 64bit] [ 3.748864] pci be4d:00:00.0: BAR 2: assigned [mem 0xbffe11000-0xbffe11fff 64bit] [ 3.749378] pci be4d:00:00.0: BAR 4: assigned [mem 0xbffe12000-0xbffe12fff 64bit] [ 3.942079] hv_pci 843a04a5-856d-4d75-8947-07b22864f488: PCI VMBus probing: Using version 0x10003 [ 3.943209] 9pnet_virtio: no channels available for device drvfsa [ 3.943532] init: (1) WARNING: mount: waiting for virtio device... [ 3.990296] hv_pci 843a04a5-856d-4d75-8947-07b22864f488: PCI host bridge to bus 856d:00 [ 3.991764] pci_bus 856d:00: root bus resource [mem 0xbffe14000-0xbffe16fff window] [ 3.992917] pci 856d:00:00.0: [1af4:1049] type 00 class 0x010000 [ 3.993652] pci 856d:00:00.0: reg 0x10: [mem 0xbffe14000-0xbffe14fff 64bit] [ 3.994348] pci 856d:00:00.0: reg 0x18: [mem 0xbffe15000-0xbffe15fff 64bit] [ 3.994899] pci 856d:00:00.0: reg 0x20: [mem 0xbffe16000-0xbffe16fff 64bit] [ 3.997045] pci 856d:00:00.0: BAR 0: assigned [mem 0xbffe14000-0xbffe14fff 64bit] [ 3.997535] pci 856d:00:00.0: BAR 2: assigned [mem 0xbffe15000-0xbffe15fff 64bit] [ 3.998053] pci 856d:00:00.0: BAR 4: assigned [mem 0xbffe16000-0xbffe16fff 64bit] [ 4.049442] hv_pci 5c6da208-e3c2-473d-bcd1-926b21123d83: PCI VMBus probing: Using version 0x10003 [ 4.051379] 9pnet_virtio: no channels available for device drvfsa [ 4.051679] init: (1) WARNING: mount: waiting for virtio device... [ 4.098720] hv_pci 5c6da208-e3c2-473d-bcd1-926b21123d83: PCI host bridge to bus e3c2:00 [ 4.099682] pci_bus e3c2:00: root bus resource [mem 0xbffe18000-0xbffe1afff window] [ 4.100765] pci e3c2:00:00.0: [1af4:1049] type 00 class 0x010000 [ 4.101538] pci e3c2:00:00.0: reg 0x10: [mem 0xbffe18000-0xbffe18fff 64bit] [ 4.102169] pci e3c2:00:00.0: reg 0x18: [mem 0xbffe19000-0xbffe19fff 64bit] [ 4.102777] pci e3c2:00:00.0: reg 0x20: [mem 0xbffe1a000-0xbffe1afff 64bit] [ 4.104976] pci e3c2:00:00.0: BAR 0: assigned [mem 0xbffe18000-0xbffe18fff 64bit] [ 4.105645] pci e3c2:00:00.0: BAR 2: assigned [mem 0xbffe19000-0xbffe19fff 64bit] [ 4.106202] pci e3c2:00:00.0: BAR 4: assigned [mem 0xbffe1a000-0xbffe1afff 64bit] [ 4.156987] hv_pci 3e393f6e-015a-4a39-8eb3-2c8d0414ce2f: PCI VMBus probing: Using version 0x10003 [ 4.206232] hv_pci 3e393f6e-015a-4a39-8eb3-2c8d0414ce2f: PCI host bridge to bus 015a:00 [ 4.206597] pci_bus 015a:00: root bus resource [mem 0xbffe1c000-0xbffe1efff window] [ 4.207370] pci 015a:00:00.0: [1af4:1049] type 00 class 0x010000 [ 4.208148] pci 015a:00:00.0: reg 0x10: [mem 0xbffe1c000-0xbffe1cfff 64bit] [ 4.208716] pci 015a:00:00.0: reg 0x18: [mem 0xbffe1d000-0xbffe1dfff 64bit] [ 4.209356] pci 015a:00:00.0: reg 0x20: [mem 0xbffe1e000-0xbffe1efff 64bit] [ 4.211615] pci 015a:00:00.0: BAR 0: assigned [mem 0xbffe1c000-0xbffe1cfff 64bit] [ 4.212304] pci 015a:00:00.0: BAR 2: assigned [mem 0xbffe1d000-0xbffe1dfff 64bit] [ 4.212810] pci 015a:00:00.0: BAR 4: assigned [mem 0xbffe1e000-0xbffe1efff 64bit]

benhillis commented 2 years ago

The --vhd flag is only available in the version of WSL in the store. It looks like you're running the inbox version.

huiyeruzhou commented 2 years ago

The --vhd flag is only available in the version of WSL in the store. It looks like you're running the inbox version.

Thanks, benhillis but I have installed the store version. and after uninstalling and installing again, problem happens as it was.Maybe there is still some problen. Besides, the size of ext4.vhdc is 23G . Does it have anything to do with?

huiyeruzhou commented 2 years ago

Further works have been done:

After all this been done, I got the same message: 磁盘已附加(attached),但装载(mount failed)失败: Invalid argument。 更多相关信息,请在 WSL2 中运行 'dmesg' 。 若要分离磁盘,请运行 'wsl.exe --unmount \\?\D:\ext4.vhdx'。

huiyeruzhou commented 2 years ago

--vhd标志仅在商店中的 WSL 版本中可用。看起来您正在运行收件箱版本。

I'm really sure that I'm in store version, because when I type wsl --help, it does show me the --vhd argument. I've successfully mounted another ext4.vhdx from an available distribution.By comparing the dmesg with the previous one, I find there is an important imformation. Detected (null) filesystem for device: /dev/sdc, which is in the failure, but in the success one : WSL2: Detected ext4 filesystem for device: /dev/sdc``EXT4-fs (sdc): mounted filesystem with ordered data mode.

I tried to specified filesystem manually by argument --type ext4 and got this message EXT4-fs (sde): VFS: Can't find ext4 filesystem

Would you please tell me what can be inferred from these message? The ext4.vhdx holds some important files in my previous wsl2, I just want to get my /home directory back >_<

zgjja commented 1 year ago

I have the same issue and i work it out: In my case, when you want to mount a ext4 filesystem .vhdx file, something you should be aware of:

  1. the .vhdx disk should be formatted to ext4 first;
  2. do not attach this vhdx into your win10 or win11 OS;
  3. when using wsl --mount --vhd, add --type ex4 and most importantly (at least in 2023.Jul), you should add extra info --partition x where x is a number, in most cases it is 1.

Note: You can check the status of your .vhdx disk partition number with command wmic diskdrive list brief in powershell