Jump to content

Recommended Posts

Antipova Anna
Posted

Advice and Solutions (Forum Knowledgebase) Disclaimer. Read before using materials.

KATA Sandbox provides instruments to manage SB images, ISO files, and VM Slots number via CLI. For details, see below.

Slots

Sometimes, it is convenient to change a slot number via CLI. To do so, become a root user and run: 
/opt/kaspersky/sandbox/bin/sandbox-slots-setup <number of slots>

Change slots number via CLI
# /opt/kaspersky/sandbox/bin/sandbox-slots-setup 12

Images

ISOs can be managed using the sb-vm-iso tool.

# sb-vm-iso
Usage:
         --list-iso
         --state [<iso-name>]
         --install <iso-name>
         --check-install <iso-name>
         --remove <iso-name>
         --add <iso-path>
 
# sb-vm-iso --list-iso
{"iso": ["sandbox-images-centos7_x64-1.0.0.19888.x86_64.iso", "sandbox-images-win10_x64-1.1.0.18829-vl.x86_64.iso"]}

VMs

VM management is done using the sb-vms tool.

# sb-vms
Usage:
         --list-vms
         --list-non-activated
         --activate <vm_id> '[{"id": "<component-id>", "key": "<component-key>"}                                                                                                         ]'
         --apply-all
         --reset
         --remove <vm_id>
 
# sb-vms --list-vms
{"vms": [{"id": "CentOS7_x64-1.0.0.19888", "name": "CentOS7_x64-1.0.0.19888", "status": "installed", "description": ""}, {"id": "Win10_x64-1.1.0.18829", "name": "Win10_x64-1.1.0.18829", "status": "installed", "description": ""}]}

VMs removal using sb-vms tool

VMs removal

Counterintuitively, using IDs obtained by "sb-vms --list-vms" for "sb-vms --remove" doesn't work.

Obtain the IDs from kata_scanner etcd on Central node instead of using apt-settings-manager:

KATA 4.1
# apt-settings-manager get /configuration/kata_scanner | python -m json.tool | grep images -A5
        "images": [
            "CentOS7_x64",
            "Win7_x64",
            "Win10_x64",
            "WinXP" 
        ],

To remove images one by one:

KATA 4.1 SB
# sb-vms --remove CentOS7_x64
# sb-vms --remove WinXP
# sb-vms --remove Win7_x64
# sb-vms --remove Win10_x64

Same principle for 5+/6+: obtain the IDs from kata_scanner etcd on Central node using console-settings-updater :

KATA 5+/6+
# console-settings-updater get /kata/configuration/product/kata_scanner |  python3 -m json.tool | grep images -A6
         "images": [
            "Astra_x64",
            "CentOS7_x64",
            "Win7_x64",
            "Win10_x64",
            "WinXP" 
        ],

To remove images one by one:

KATA 5+/6+ SB
# sb-vms --remove Astra_x64
# sb-vms --remove CentOS7_x64
# sb-vms --remove WinXP
# sb-vms --remove Win7_x64
# sb-vms --remove Win10_x64

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...