---
name: "xnbd-wrapper-ctl"
section: "8"
platform: "linux"
package: "xnbd-server"
version: "0.3.0-3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/xnbd-wrapper-ctl"
---

# xnbd-wrapper-ctl(8)

Manage an xnbd-wrapper(8) super-server.

## NAME

xnbd-wrapper-ctl - Manage an [xnbd-wrapper(8)](/xnbd-wrapper/8.md) super-server.

## SYNOPSIS

**xnbd-wrapper-ctl** \[options\] --list

**xnbd-wrapper-ctl** \[options\] --add-target *LOCAL\_EXPORTNAME* *FILE*

**xnbd-wrapper-ctl** \[options\] \[--target-exportname *NAME*\] --add-proxy *LOCAL\_EXPORTNAME* *REMOTE\_HOST* *REMOTE\_PORT* *CACHE\_IMAGE* *BITMAP\_IMAGE* *CONTROL\_SOCKET\_PATH*

**xnbd-wrapper-ctl** \[options\] --remove-by-file *FILE*

**xnbd-wrapper-ctl** \[options\] --remove-by-exportname *NAME*

**xnbd-wrapper-ctl** \[options\] --bgctl-query *LOCAL\_EXPORTNAME*

**xnbd-wrapper-ctl** \[options\] --bgctl-switch *LOCAL\_EXPORTNAME*

**xnbd-wrapper-ctl** \[options\] --bgctl-cache-all *LOCAL\_EXPORTNAME*

**xnbd-wrapper-ctl** \[options\] \[--target-exportname *NAME*\] --bgctl-reconnect *LOCAL\_EXPORTNAME* *REMOTE\_HOST* *REMOTE\_PORT*

## DESCRIPTION

With the **xnbd-wrapper-ctl** command you can connect to an xnbd-wrapper control channel and instruct it to act as directed. You may pass certain commands as argument to the control program which are then forwarded, on your behalf, to the xnbd-server instance.

## OPTIONS

The following options are supported:

- **--add-target** *FILE*

  Instruct the xnbd-wrapper to add the given *FILE* as exported xNBD device.

**--add-proxy** *TARGET\_HOST* *TARGET\_PORT* *CACHE\_IMAGE* *BITMAP\_IMAGE* *CONTROL\_SOCKET\_PATH*

Instruct the xnbd-wrapper to add a proxy to the given target server.

(**--add**\|**-a** *FILE*)

Deprecated alias to --add-target, please do not use.

**--help**\|**-h**

Display a short usage overview and exit

**--list**\|**-l**

Connects to the xNBD wrapper and retrieves the list of exported file names

- **--remove-by-file** *FILE*

  Instruct the xnbd-wrapper to remove the volume wired to file *FILE* from the list of exported xNBD devices.

- **--remove-by-exportname** *NAME*

  Instruct the xnbd-wrapper to remove the volume exported as *NAME* from the list of exported xNBD devices.

(**--remove**\|**-r** *INDEX*)

Instruct the xnbd-wrapper to remove the volume exported on *INDEX* from the list of exported xNBD devices. Deprecated, please do not use.

**--socket**\|**-s** *SOCKETPATH*

Connect to *SOCKETPATH* as xnbd-wrapper control socket. Default is /var/run/xnbd-wrapper.ctl.

- **--target-exportname** *NAME*

  Set the export name to request from the proxied xnbd-wrapper target. This option is used in combination with **--add-proxy** and **--bgctl-reconnect**, only.

- **--bgctl-cache-all**

  Please see [xnbd-bgctl(1)](/xnbd-bgctl/1.md) for details.

- **--bgctl-query**

  Please see [xnbd-bgctl(1)](/xnbd-bgctl/1.md) for details.

**--bgctl-reconnect** *REMOTE\_HOST* *REMOTE\_PORT*

Please see [xnbd-bgctl(1)](/xnbd-bgctl/1.md) for details.

- **--bgctl-switch**

  Please see [xnbd-bgctl(1)](/xnbd-bgctl/1.md) for details.

## POSITIONAL ARGUMENTS

The following positional options are supported:

*FILE*

The disk image file location.

*LOCAL\_EXPORTNAME*

Export name at running [xnbd-wrapper(8)](/xnbd-wrapper/8.md) process.

*REMOTE\_HOST*

Target host to connect to, IPv4 address, IPv6 address or host name.

*REMOTE\_PORT*

TCP port number to connect to.

*CACHE\_IMAGE*

The (cache) disk image file location.

*BITMAP\_IMAGE*

The caching state bitmap file location.

*CONTROL\_SOCKET\_PATH*

The Unix domain socket, the [xnbd-server(8)](/xnbd-server/8.md) program is listening on.

## SEE ALSO

xnbd-wrapper(1), [xnbd-server(8)](/xnbd-server/8.md), [xnbd-bgctl(1)](/xnbd-bgctl/1.md)

## AUTHOR

The NBD kernel module and the NBD tools have been written by Pavel Macheck (pavel@ucw.cz) and is now maintained by Paul Clements (Paul.Clements@steeleye.com).

The xNBD userland programs have been written by Takahiro Hirofuchi (t.hirofuchi@aist.go.jp).

This manual page was written by Arno Toell (arno@debian.org) for the Debian GNU/Linux system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.
