Skip to content

Commit 4303138

Browse files
committed
Update README for sharing hostOS /dev/ block devices with guestOS
1 parent 1506129 commit 4303138

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ Generate ext4 image file for virtio block device in Unix-like system:
9393
$ dd if=/dev/zero of=disk.img bs=4M count=32
9494
$ mkfs.ext4 disk.img
9595
```
96+
Instead of creating a new block device image, you can share the hostOS's existing block devices. For example, on macOS host, specify the block device path as `-x vblk:/dev/disk3`, or on Linux host as `-x vblk:/dev/loop3`, assuming these paths point to valid block devices.
97+
9698
Mount the virtual block device and create a test file after booting, note that root privilege is required to mount and unmount a disk:
9799
```shell
98100
# mkdir mnt

0 commit comments

Comments
 (0)