Skip to content

Commit

Permalink
update usage.md to add NBD section
Browse files Browse the repository at this point in the history
add documentation to explain how to use the new NetworkBlockDevice device.
Args list and examples are provided in the usage.md file

Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
  • Loading branch information
lstocchi committed Nov 22, 2024
1 parent 8c470df commit 40cf944
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions doc/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,28 @@ This adds a read only USB mass storage device to the VM which will be backed by
--device usb-mass-storage,path=/Users/virtuser/distro.iso,readonly
```

### Network Block Device

#### Description

The `--device nbd` option allows to connect to a remote NBD server, effectively accessing a remote block device over the network as if it were a local disk.

The NBD client running on the VM is informed in case the connection drops and it tries to reconnect automatically to the server.

#### Arguments
- `uri`: the URI that refers to the NBD server to which the NBD client will connect, e.g. `nbd://10.10.2.8:10000/export`. More info at https://github.com/NetworkBlockDevice/nbd/blob/master/doc/uri.md
- `deviceId`: `/dev/disk/by-id/virtio-` identifier to use for this device.
- `sync`: the mode in which the NBD client synchronizes data with the NBD server. It can be `full`or `none`, more info at https://developer.apple.com/documentation/virtualization/vzdisksynchronizationmode?language=objc
- `timeout`: the timeout value in milliseconds for the connection between the client and server
- `readonly`: if specified the device will be read only.

#### Example

This allows to connect to the export of the remote NBD server:
```
--device nbd,uri=nbd://192.168.64.4:11111/export,deviceId=nbd1,timeout=3000
```


### Networking

Expand Down

0 comments on commit 40cf944

Please sign in to comment.