Resource Listing

The Bacula Enterprise XenServer Plugin supports the new Plugin Listing feature of Bacula Enterprise 8.x or newer. This mode allows a Plugin to display some useful information about available XenServer resources such as:

The new feature uses the special .ls command with a new plugin=<plugin> parameter. The command requires the following parameters to be set:

  • client=<client> A Bacula Client name where the XenServer Plugin is installed.

  • plugin=<plugin> A XenServer Plugin name - xenserver: with optional plugin parameters described at Sec. Generic Plugin Parameters

  • path=<path> An object path to display

The supported values for the path=<path> parameter are:

  • / - Display object types available to list

  • vm - Display a list of guest VM name-labels

  • uuid - Display a list of guest VM UUIDs and name-label pointers

  • storage_res - Display a list of Storage Repositories

To display available object types, run the following command example:

*.ls client=srv-xen-01-fd plugin="xenserver: url=http://10.10.10.10/ user=root \
    password=root" path=/
Connecting to Client srv-xen-01-fd at 127.0.0.1:9102
drwxr-x---   1 root     root               0 2018-01-02 09:36:32  vm
drwxr-x---   1 root     root               0 2018-01-02 09:36:32  storage_res
drwxr-x---   1 root     root               0 2018-01-02 09:36:32  uuid
2000 OK estimate files=3 bytes=0

To display the list of all available guest VMs, run the following command example:

*.ls client=srv-xen-01-fd plugin="xenserver: url=http://10.10.10.10/ user=root \
    password=root" path=VM
Connecting to Client srv-xen-01-fd at 127.0.0.1:9102
-rw-r-----   1 root     root      8589934592 2017-12-29 17:12:48  Another-Copy of vm1
-rw-r-----   1 root     root     13958643712 2017-12-29 17:12:48  vm2
-rw-r-----   1 root     root      8589934592 2017-12-29 17:12:48  vm1
-rw-r-----   1 root     root     10737418240 2017-12-29 17:12:48  RHEL
-rw-r-----   1 root     root      8589934592 2017-12-29 17:12:48  Copy of vm1 a label with spaces
-rw-r-----   1 root     root     10737418240 2017-12-29 17:12:48  Copy of RHEL
-rw-r-----   1 root     root     19327352832 2017-12-29 17:12:48  vm1-orig
2000 OK estimate files=7 bytes=80,530,636,800

To display a list of all available guest VM UUIDs, run the following command example:

*.ls client=srv-xen-01-fd plugin="xenserver: url=http://10.10.10.10/ user=root \
    password=root" path=uuid
Connecting to Client srv-xen-01-fd at 127.0.0.1:9102
...
   8589934592 2018-01-02 09:39:06  4f5c9e10-a3c4-fc29-c967-4981f22d3f86 -> Another-Copy of vm1
  13958643712 2018-01-02 09:39:06  50705972-0a88-5aa7-6721-f70b866ed0b6 -> vm2
   8589934592 2018-01-02 09:39:06  10908c8a-f932-6f91-9cac-3034e3acf45b -> vm1
  10737418240 2018-01-02 09:39:06  fe1ccf3b-1865-3942-c928-d98138397ff1 -> RHEL
   8589934592 2018-01-02 09:39:06  c8efc2ca-ca1a-ebdf-5409-5dd8c158e3eb -> Copy of vm1 a label with spaces
  10737418240 2018-01-02 09:39:06  6e84929a-1c52-4c79-c67c-8455f76d3e7c -> Copy of RHEL
  19327352832 2018-01-02 09:39:07  03fad8c9-d88b-ea7e-98da-2f3bcd20d0c4 -> vm1-orig
2000 OK estimate files=7 bytes=80,530,636,800

The VM and UUID lists display an estimated size of the guest VM. To display a XenServer Storage Repositories, run the following command example:

*.ls client=srv-xen-01-fd plugin="xenserver: url=http://10.10.10.10/ user=root \
    password=root" path=storage_res
Connecting to Client srv-xen-01-fd at 127.0.0.1:9102
brw-r-----   1 root     root    586081632256 2018-01-02 09:39:22  ISO
brw-r-----   1 root     root    586081419264 2018-01-02 09:39:22  Local storage
brw-r-----   1 root     root               0 2018-01-02 09:39:22  Removable storage
brw-r-----   1 root     root      1073741312 2018-01-02 09:39:22  DVD drives
brw-r-----   1 root     root    586081632256 2018-01-02 09:39:22  Exported Storage
brw-r-----   1 root     root              -1 2018-01-02 09:39:22  XenServer Tools
2000 OK estimate files=6 bytes=0

See also

Previous articles:

Go back to: Xen Plugin: Operations.