windows or ubuntu mount 文件

本文介绍了如何在Windows11环境中使用`Mount-DiskImage`、`Dismount-DiskImage`和`Get-DiskImage`进行磁盘映像操作,以及如何在Ubuntu中通过libguestfs-tools挂载和卸载虚拟机镜像,包括`--add`、`--inspector`和`--ro`选项的使用方法。
摘要由CSDN通过智能技术生成

windows

实测环境:windows 11, 64 bit.

ref: 

Mount-DiskImage (Storage) | Microsoft Learn

Dismount-DiskImage (Storage) | Microsoft Learn

Get-DiskImage (Storage) | Microsoft Learn

# 查询
Get-DiskImage -ImagePath "f:\wsl\ext4.vhdx"

# mount
Mount-DiskImage -ImagePath "E:\ISO-Files\My US Visit Fall 2010 Pictures.iso"
Mount-DiskImage -ImagePath "f:\wsl\ext4.vhdx"

# unmount
Dismount-DiskImage -ImagePath "f:\wsl\ext4.vhdx"

ubuntu

对应版本:

# http://libguestfs.org/guestmount.1.html
sudo apt-get install libguestfs-tools

# 查询
mount

# mount
sudo guestmount --add ext4.vhdx --inspector --ro /mnt/mymount

--add
Add a block device or virtual machine image.

--inspector
Using virt-inspector(1) code, inspect the disks looking for an operating system and mount filesystems as they would be mounted on the real virtual machine.

--ro
Add devices and mount everything read-only. Also disallow writes and make the disk appear read-only to FUSE.

# unmount
sudo umount /mnt/mymount
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值