feat: Disk pass-through (#57)
This commit is contained in:
parent
cf4d9e4f9e
commit
7624515c08
2 changed files with 8 additions and 3 deletions
|
@ -184,11 +184,11 @@ docker run -it --rm --name qemu -e "BOOT=http://example.com/image.iso" -p 8006:8
|
|||
|
||||
```yaml
|
||||
devices:
|
||||
- /dev/sdb:/dev/disk1
|
||||
- /dev/sdc:/dev/disk2
|
||||
- /dev/sdb:/disk1
|
||||
- /dev/sdc:/disk2
|
||||
```
|
||||
|
||||
Use `/dev/disk1` if you want it to become your main drive, and use `/dev/disk2` and higher to add them as secondary drives.
|
||||
Use `/disk1` if you want it to become your main drive, and use `/disk2` and higher to add them as secondary drives.
|
||||
|
||||
* ### How do I pass-through a USB device?
|
||||
|
||||
|
|
|
@ -498,6 +498,11 @@ fi
|
|||
: "${DEVICE3:=""}"
|
||||
: "${DEVICE4:=""}"
|
||||
|
||||
[ -z "$DEVICE" ] && [ -b "/disk1" ] && DEVICE="/disk1"
|
||||
[ -z "$DEVICE2" ] && [ -b "/disk2" ] && DEVICE2="/disk2"
|
||||
[ -z "$DEVICE3" ] && [ -b "/disk3" ] && DEVICE3="/disk3"
|
||||
[ -z "$DEVICE4" ] && [ -b "/disk4" ] && DEVICE4="/disk4"
|
||||
|
||||
[ -z "$DEVICE" ] && [ -b "/dev/disk1" ] && DEVICE="/dev/disk1"
|
||||
[ -z "$DEVICE2" ] && [ -b "/dev/disk2" ] && DEVICE2="/dev/disk2"
|
||||
[ -z "$DEVICE3" ] && [ -b "/dev/disk3" ] && DEVICE3="/dev/disk3"
|
||||
|
|
Loading…
Reference in a new issue