diff --git a/.gitignore b/.gitignore
index 41170939..438f1d70 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,5 @@ docs/_build/*
 build/*
 dist/*
 *.egg-info
+.cache
+
diff --git a/SoftLayer/fixtures/SoftLayer_Virtual_Guest.py b/SoftLayer/fixtures/SoftLayer_Virtual_Guest.py
index 10440668..966e8a40 100644
--- a/SoftLayer/fixtures/SoftLayer_Virtual_Guest.py
+++ b/SoftLayer/fixtures/SoftLayer_Virtual_Guest.py
@@ -33,10 +33,13 @@
     "primaryNetworkComponent": {"speed": 10, "maxSpeed": 100},
     'hourlyBillingFlag': False,
     'createDate': '2013-08-01 15:23:45',
-    'blockDevices': [{"device": 0, 'mountType': 'Disk', "uuid": 1},
-                     {"device": 1, 'mountType': 'Disk'},
-                     {"device": 2, 'mountType': 'CD'},
-                     {"device": 3, 'mountType': 'Disk', "uuid": 3}],
+    'blockDevices': [{'device': 0, 'mountType': 'Disk', "uuid": 1},
+                     {'device': 1, 'mountType': 'Disk',
+                      'diskImage': {'type': {'keyName': 'SWAP'}}},
+                     {'device': 2, 'mountType': 'CD'},
+                     {'device': 3, 'mountType': 'Disk', 'uuid': 3},
+                     {'device': 4, 'mountType': 'Disk', 'uuid': 4,
+                      'diskImage': {'metadataFlag': True}}],
     'notes': 'notes',
     'networkVlans': [{'networkSpace': 'PUBLIC',
                       'vlanNumber': 23,
diff --git a/SoftLayer/managers/vs.py b/SoftLayer/managers/vs.py
index 3a89eb8c..9d0741c0 100644
--- a/SoftLayer/managers/vs.py
+++ b/SoftLayer/managers/vs.py
@@ -721,19 +721,42 @@ def capture(self, instance_id, name, additional_disks=False, notes=None):
             notes = "Some notes about this image"
             result = mgr.capture(instance_id=12345, name=name, notes=notes)
         """
-        vsi = self.get_instance(instance_id)
 
-        disk_filter = lambda x: x['device'] == '0'
-        # Skip disk 1 (swap partition) and CD mounts
-        if additional_disks:
-            disk_filter = lambda x: (str(x['device']) != '1' and
-                                     x['mountType'] != 'CD')
+        vsi = self.client.call(
+            'Virtual_Guest',
+            'getObject',
+            id=instance_id,
+            mask="""id,
+            blockDevices[id,device,mountType,
+            diskImage[id,metadataFlag,type[keyName]]]""")
 
-        disks = [block_device for block_device in vsi['blockDevices']
-                 if disk_filter(block_device)]
+        disks_to_capture = []
+        for block_device in vsi['blockDevices']:
+
+            # We never want metadata disks
+            if utils.lookup(block_device, 'diskImage', 'metadataFlag'):
+                continue
+
+            # We never want swap devices
+            type_name = utils.lookup(block_device,
+                                     'diskImage',
+                                     'type',
+                                     'keyName')
+            if type_name == 'SWAP':
+                continue
+
+            # We never want CD images
+            if block_device['mountType'] == 'CD':
+                continue
+
+            # Only use the first block device if we don't want additional disks
+            if not additional_disks and str(block_device['device']) != '0':
+                continue
+
+            disks_to_capture.append(block_device)
 
         return self.guest.createArchiveTransaction(
-            name, disks, notes, id=instance_id)
+            name, disks_to_capture, notes, id=instance_id)
 
     def upgrade(self, instance_id, cpus=None, memory=None,
                 nic_speed=None, public=True):

slcli vs capture --all and metadata
### Expected Behavior: 
Capture all disks including metadata

### Actual Behavior
Invalid block device supplied. Please be sure to not include any metadata disk block devices.

### Environment Information
Operating System: 
RHEL 6.7
softlayer-python version (`slcli --version`):
slcli (SoftLayer Command-line), version 4.1.1

Hello, 
I am trying to automate the capture of several VSIs. I have two devices with multiple disks and a metadata block device. 

The following slcli cmd is failing with the behavior above:
slcli vs capture --name="description" --note="additional notes" 17800945 --all True

Is it possible to identify only the disks I want to capture? Example Disk, 0,2,4 and exclude disk 7 (metadata)

Thanks
diff --git a/tests/managers/vs_tests.py b/tests/managers/vs_tests.py
index a0cecb20..fb1a2c2a 100644
--- a/tests/managers/vs_tests.py
+++ b/tests/managers/vs_tests.py
@@ -615,7 +615,7 @@ def test_captures(self):
 
         expected = fixtures.SoftLayer_Virtual_Guest.createArchiveTransaction
         self.assertEqual(result, expected)
-        args = ('a', [], None)
+        args = ('a', [{'device': 0, 'uuid': 1, 'mountType': 'Disk'}], None)
         self.assert_called_with('SoftLayer_Virtual_Guest',
                                 'createArchiveTransaction',
                                 args=args,

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc
3.6
tools/test-requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
attrs==22.2.0
Babel==2.11.0
certifi==2021.5.30
charset-normalizer==2.0.12
click==8.0.4
coverage==6.2
distlib==0.3.9
docutils==0.18.1
filelock==3.4.1
fixtures==4.0.1
idna==3.10
imagesize==1.4.1
importlib-metadata==4.8.3
importlib-resources==5.4.0
iniconfig==1.1.1
Jinja2==3.0.3
MarkupSafe==2.0.1
mock==5.2.0
packaging==21.3
pbr==6.1.1
platformdirs==2.4.0
pluggy==1.0.0
prettytable==2.5.0
prompt-toolkit==3.0.36
py==1.11.0
Pygments==2.14.0
pyparsing==3.1.4
pytest==7.0.1
pytest-cov==4.0.0
pytz==2025.2
requests==2.27.1
six==1.17.0
snowballstemmer==2.2.0
-e git+https://github.com/softlayer/softlayer-python.git@7aca9ce012fb449117e3099d0840afce1704cdd2#egg=SoftLayer
Sphinx==5.3.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
testtools==2.6.0
toml==0.10.2
tomli==1.2.3
tox==3.28.0
typing_extensions==4.1.1
urllib3==1.26.20
virtualenv==20.17.1
wcwidth==0.2.13
zipp==3.6.0

name: softlayer-python
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - attrs==22.2.0
      - babel==2.11.0
      - charset-normalizer==2.0.12
      - click==8.0.4
      - coverage==6.2
      - distlib==0.3.9
      - docutils==0.18.1
      - filelock==3.4.1
      - fixtures==4.0.1
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==4.8.3
      - importlib-resources==5.4.0
      - iniconfig==1.1.1
      - jinja2==3.0.3
      - markupsafe==2.0.1
      - mock==5.2.0
      - packaging==21.3
      - pbr==6.1.1
      - platformdirs==2.4.0
      - pluggy==1.0.0
      - prettytable==2.5.0
      - prompt-toolkit==3.0.36
      - py==1.11.0
      - pygments==2.14.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - pytz==2025.2
      - requests==2.27.1
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==5.3.0
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - testtools==2.6.0
      - toml==0.10.2
      - tomli==1.2.3
      - tox==3.28.0
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - virtualenv==20.17.1
      - wcwidth==0.2.13
      - zipp==3.6.0
prefix: /opt/conda/envs/softlayer-python

tests/managers/vs_tests.py::VSTests::test_captures
tests/managers/vs_tests.py::VSTests::test_cancel_instance tests/managers/vs_tests.py::VSTests::test_capture_additional_disks tests/managers/vs_tests.py::VSTests::test_change_port_speed_private tests/managers/vs_tests.py::VSTests::test_change_port_speed_public tests/managers/vs_tests.py::VSTests::test_create_instance tests/managers/vs_tests.py::VSTests::test_create_instances tests/managers/vs_tests.py::VSTests::test_create_verify tests/managers/vs_tests.py::VSTests::test_edit_blank tests/managers/vs_tests.py::VSTests::test_edit_full tests/managers/vs_tests.py::VSTests::test_edit_metadata tests/managers/vs_tests.py::VSTests::test_edit_tags tests/managers/vs_tests.py::VSTests::test_edit_tags_blank tests/managers/vs_tests.py::VSTests::test_generate_basic tests/managers/vs_tests.py::VSTests::test_generate_datacenter tests/managers/vs_tests.py::VSTests::test_generate_dedicated tests/managers/vs_tests.py::VSTests::test_generate_image_id tests/managers/vs_tests.py::VSTests::test_generate_missing tests/managers/vs_tests.py::VSTests::test_generate_monthly tests/managers/vs_tests.py::VSTests::test_generate_multi_disk tests/managers/vs_tests.py::VSTests::test_generate_network tests/managers/vs_tests.py::VSTests::test_generate_no_disks tests/managers/vs_tests.py::VSTests::test_generate_os_and_image tests/managers/vs_tests.py::VSTests::test_generate_post_uri tests/managers/vs_tests.py::VSTests::test_generate_private_network_only tests/managers/vs_tests.py::VSTests::test_generate_private_vlan tests/managers/vs_tests.py::VSTests::test_generate_public_vlan tests/managers/vs_tests.py::VSTests::test_generate_single_disk tests/managers/vs_tests.py::VSTests::test_generate_sshkey tests/managers/vs_tests.py::VSTests::test_generate_userdata tests/managers/vs_tests.py::VSTests::test_get_create_options tests/managers/vs_tests.py::VSTests::test_get_instance tests/managers/vs_tests.py::VSTests::test_get_item_id_for_upgrade tests/managers/vs_tests.py::VSTests::test_list_instances tests/managers/vs_tests.py::VSTests::test_list_instances_hourly tests/managers/vs_tests.py::VSTests::test_list_instances_monthly tests/managers/vs_tests.py::VSTests::test_list_instances_neither tests/managers/vs_tests.py::VSTests::test_list_instances_with_filters tests/managers/vs_tests.py::VSTests::test_reload_instance tests/managers/vs_tests.py::VSTests::test_reload_instance_posturi_sshkeys tests/managers/vs_tests.py::VSTests::test_reload_instance_with_new_os tests/managers/vs_tests.py::VSTests::test_rescue tests/managers/vs_tests.py::VSTests::test_resolve_ids_hostname tests/managers/vs_tests.py::VSTests::test_resolve_ids_ip tests/managers/vs_tests.py::VSTests::test_resolve_ids_ip_invalid tests/managers/vs_tests.py::VSTests::test_resolve_ids_ip_private tests/managers/vs_tests.py::VSTests::test_upgrade tests/managers/vs_tests.py::VSTests::test_upgrade_blank tests/managers/vs_tests.py::VSTests::test_upgrade_full tests/managers/vs_tests.py::VSTests::test_upgrade_skips_location_based_prices tests/managers/vs_tests.py::VSWaitReadyGoTests::test_active_and_provisiondate tests/managers/vs_tests.py::VSWaitReadyGoTests::test_active_not_provisioned tests/managers/vs_tests.py::VSWaitReadyGoTests::test_active_provision_pending tests/managers/vs_tests.py::VSWaitReadyGoTests::test_active_reload tests/managers/vs_tests.py::VSWaitReadyGoTests::test_iter_20_incomplete tests/managers/vs_tests.py::VSWaitReadyGoTests::test_iter_four_complete tests/managers/vs_tests.py::VSWaitReadyGoTests::test_iter_once_complete tests/managers/vs_tests.py::VSWaitReadyGoTests::test_iter_two_incomplete tests/managers/vs_tests.py::VSWaitReadyGoTests::test_ready_iter_once_incomplete tests/managers/vs_tests.py::VSWaitReadyGoTests::test_reload_no_pending tests/managers/vs_tests.py::VSWaitReadyGoTests::test_reload_pending tests/managers/vs_tests.py::VSWaitReadyGoTests::test_wait_interface
.gitignore SoftLayer/fixtures/SoftLayer_Virtual_Guest.py SoftLayer/managers/vs.py
.gitignore SoftLayer/fixtures/SoftLayer_Virtual_Guest.py SoftLayer/managers/vs.py