PolySwarmPolySwarmPolySwarmPolySwarm
Help

(Legacy) Testing Windows-Based Participants w/ VirtualBox

WARNING:

This documentation is DEPRECATED and IS NOT MAINTAINED. It will be removed in the future.

We strongly encourage all Windows developers to migrate to the newer, simpler and easier to test Windows + Docker instructions.

概覽

這些說明涵蓋測試基於 Windows 的:

  • microengines
  • arbiters (coming soon)

Windows-based Ambassadors are not supported.

In this page, we use microengine-eicar as the name of the microengine's directory. In your own testing, you will use the name of your microengine's directory instead.

Additionally, in these instructions, we've shortened the PowerShell command prompt to be PS > in order to make it easier to read the commands. Your actual PowerShell command prompt will be similar to this: (polyswarmvenv) PS C:\Users\user\microengine-eicar>. Similarly for Linux command prompts, we've shortened them to be $, while your actual command prompts will have more text to the left side of the $.

Finally, ensure that all commands are executed in a PowerShell window that has your virtual environment activated.


Unit Testing

Install your microengine's requirements:

PS > pip install -r requirements.txt

(Re-)compile and install your microengine library:

PS > python .\setup.py install

Make sure you recompile & reinstall your module every time you make changes!

We'll tox to test our Microengine. tox runs whatever unit tests you add to tests/scan_<your engine name>.py.

Run the tox command at the base of your microengine's directory.

PS > tox

The output will look similar to the following:

GLOB sdist-make: C:\Users\user\microengine-eicar\setup.py
py36 inst-nodeps: C:\Users\user\microengine-eicar\.tox\.tmp\package\1\polyswarm_eicar-0.1.zip
py36 installed: polyswarm-eicar==0.1
py36 run-test-pre: PYTHONHASHSEED='433'
py36 run-test: commands[0] | pytest -s
================================================= test session starts =================================================
platform win32 -- Python 3.6.5, pytest-3.9.2, py-1.8.0, pluggy-0.9.0
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('C:\\Users\\user\\microengine-eicar\\.hypothesis\\examples')
rootdir: C:\Users\user\microengine-eicar, inifile:
plugins: timeout-1.3.2, cov-2.6.0, asyncio-0.9.0, hypothesis-3.82.1
collected 1 item

tests\test_eicar.py .

================================================== warnings summary ===================================================
c:\users\user\polyswarmvenv\lib\site-packages\eth_utils\applicators.py:32: DeprecationWarning: combine_argument_formatters(formatter1, formatter2)([item1, item2])has been deprecated and will be removed in a subsequent major version release of the eth-utils library. Update your calls to use apply_formatters_to_sequence([formatter1, formatter2], [item1, item2]) instead.
  "combine_argument_formatters(formatter1, formatter2)([item1, item2])"

-- Docs: https://docs.pytest.org/en/latest/warnings.html
======================================== 1 passed, 1 warnings in 3.15 seconds =========================================
_______________________________________________________ summary _______________________________________________________
  py36: commands succeeded
  congratulations :)

You can safely ignore the combine_argument_formatters warning.


Integration Testing

Conducting integration tests on Windows-Based Engines is only supported in a VirtualBox configuration at this time. Please refer to Windows Development Environment for more information.

Integration testing a Windows-Based Engine requires two virtual machines (VMs / Guests):

  1. 一個 Windows guest 來運行您的 Window-Based 引擎(我們已經完成這部分了)。
  2. 一個 Linux guest 來創建一個本地的 PolySwarm 測試網(我們將會在此構建)。

The recommendations presented here are hard-won. We strongly recommend that you test using the exact recommendations presented here. Using any other configuration will make it difficult for us to provide you with support.

創建一個 Linux Guest

創建虛擬機

Create a Linux VM using the following parameters:

  • Name: polyswarm_lin
  • Type: Linux
  • Version: Ubuntu (64-bit)
  • RAM: 8GB+
  • CPU:4+ 核
  • video memory: 128MB
  • disk space: 50GB+

Use the default setting for all other options. In particular, do NOT enable 3D acceleration.

In general, you will want to provide extra available RAM and CPU resources to the Linux VM to make the testnet perform better.

安裝 Xubuntu 18.04 amd64

We strongly recommend Xubuntu over Ubuntu for VirtualBox guests. Ubuntu presents a range of visual lag issues and is prone to total visual lockup when VirtualBox tools are installed.

Use the ISO you downloaded to install Xubuntu in the VM.

(可選)安装 VirtualBox Guest Additions

Guest Additions are necessary for Shared Clipboard / Copy & Paste features between Guest and Host.

請參閱 VirtualBox 的使用手冊

配置 Inter-Guest 網絡

We need to establish an "internal" network that our Linux and Windows VMs will use to communicate with one another.

Before we get started, shut down both the Linux and the Windows Guests.

On your Windows Host, open a PowerShell window and change to the VirtualBox installation directory:

PS > pushd $Env:Programfiles\Oracle\VirtualBox

You should now see your command prompt look similar to this:

PS C:\Program Files\Oracle\VirtualBox>

建立 PolySwarm 內部網路

Create and assign a dedicated PolySwarm internal network to each VM.

These commands will reconfigure network adapter #5 on your VMs. If you are already using this adapter (very unlikely), change the number in the commands.

PS > .\VBoxManage.exe modifyvm "polyswarm_win" --nic5 intnet
PS > .\VBoxManage.exe modifyvm "polyswarm_win" --intnet5 "polyswarm_net"
PS > .\VBoxManage.exe modifyvm "polyswarm_lin" --nic5 intnet
PS > .\VBoxManage.exe modifyvm "polyswarm_lin" --intnet5 "polyswarm_net"

For more information on internal networking in VirtualBox, refer to their official documentation.

You will not see an "adapter #5" listed in your VM settings or inside your VM. What you will see is that your VM will have at least 2 active network adapters and by adding "polyswarm_net" to adapter 5, it should be easier to find because it will be the highest numbered network interface in your VM.

使用靜態 IP 地址配置虛擬機

Boot the polyswarm_lin VM and edit your network settings to assign the following static IPv4 information to the new adapter:

  • 地址:10.10.42.101
  • netmask: 255.255.255.0
  • gateway: 10.10.42.1

If it is unclear which network interface you should apply these settings to, run the ifconfig -a command, and in the output you should see multiple network interfaces that start with enp0s. The interface with the largest number after that prefix is usually the one you want to modify.

Boot the polyswarm_win VM and edit your network settings to configure the new adapter for these static IPv4 settings:

  • 地址:10.10.42.102
  • netmask: 255.255.255.0
  • gateway: 10.10.42.1

If it is unclear which network interface you should apply these settings to, run the ipconfig /all command, and in the output you should see multiple network interfaces that start with Ethernet adapter Ethernet. The interface with the largest number after that prefix is usually the one you want to modify.

polyswarmd DNS 解析配置 Windows VM

Finally, your Windows VM needs to know that your Linux VM is hosting polyswarmd. Open an elevated instance of Notepad and add polyswarmd to the bottom of C:\Windows\System32\Drivers\etc\hosts:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# 這是 Microsoft TCP/IP for Windows 使用的一個示例性 HOSTS 文件。
#
# 此文件包含 IP 地址到主機名的映射。 應將每個
# 條目保留在單獨的行上。 IP 地址應
# 放置在第一列中,後面跟相應的主機名。
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost

10.10.42.101 polyswarmd

確認設置

Finally, verify that Windows resolves polyswarmd to your Linux VM and is able to reach the VM. First do a DNS test as follows:

PS > Resolve-DnsName -name polyswarmd

The output should look like this:

Name                                           Type   TTL   Section    IPAddress
----                                           ----   ---   -------    ---------
polyswarmd                                     A      86400 Answer     10.10.42.101

Next, do a ping test as follows:

PS > ping polyswarmd

The output should look like this:

Pinging polyswarmd [10.10.42.101] with 32 bytes of data:
Reply from 10.10.42.101: bytes=32 time<1ms TTL=64

If you get those same output results, you have everything setup correctly, so let's continue.

設置 Linux VM 來託管一個本地 Testnet

Install Docker

We've Docker-ized the test version of the PolySwarm marketplace. To use it, you need to install Docker-CE (base) as well as Docker Compose. If you do not have a recent Docker setup, please install Docker now.

On Xubuntu:

$ sudo apt-get update && sudo apt-get install -y curl
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ chmod +x get-docker.sh
$ ./get-docker.sh
$ sudo usermod -aG docker $USER

Log out, log back in.

Once installed, verify that the installation works, by running the following command:

$ docker ps

It should output:

CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

Also install docker-compose

On Xubuntu:

$ curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o docker-compose
$ sudo mv docker-compose /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose

安裝完畢後,請驗證安裝是否正常。

$ docker-compose -v

Should output at least: docker-compose version 1.21.1, build 5a3f1a3

If you receive permission errors when running docker or docker-compose commands, configure your user account for docker permission.

Install Git

We'll need to grab a few source code repositories; it'll be easiest to use Git. Please install Git for your development environment.

On Xubuntu 18.04:

$ sudo apt update && sudo apt install -y git

Download orchestration

We'll use the PolySwarm orchestration project to launch our development testnet. We use this same project internally to conduct end-to-end (integration) tests.

Clone orchestration:

$ git clone https://github.com/polyswarm/orchestration

測試您的微引擎

We're going to have to switch between our VMs a little bit here. We will first start the Testnet in the Linux VM. Then we will start your Microengine in the Windows VM. Finally, we will start the Ambassador in the Linux VM.

Linux VM: Launch the Testnet

Create the orchestration_default network, if you haven't already:

$ docker network create orchestration_default

Always ensure that you have the latest updates to core PolySwarm Docker images prior to running integration tests. docker-compose ... up commands must always be proceeded with docker-compose ... pull commands.

啟動基本網絡 + 仲裁者(從 orchestration 目錄):

$ docker-compose -f base.yml -f arbiter-verbatim.yml pull
$ docker-compose -f base.yml -f arbiter-verbatim.yml up

Wait for polyswarmd to become available. polyswarmd 可能需要過幾分鐘才會完整運行。 During this time, you will see many messages like Problem with dial... dial tcp connection refused. and chain for config not available in consul yet. These errors are normal while the testnet is initializing, so have patience.

View polyswarmd logs in a new shell session (from the orchestration directory):

docker-compose -f base.yml logs --follow polyswarmd

In this new shell, wait for polyswarmd:

Attaching to orchestration_polyswarmd_1_c1d732ac5355
polyswarmd_1_c1d732ac5355 | [2019-05-13 20:52:36 +0000] [1] [INFO] Starting gunicorn 19.9.0
polyswarmd_1_c1d732ac5355 | [2019-05-13 20:52:36 +0000] [1] [INFO] Listening at: http://0.0.0.0:31337 (1)
...
polyswarmd_1_c1d732ac5355 | CRITICAL:polyswarmd.wsgi:polyswarmd is ready!
polyswarmd_1_c1d732ac5355 | CRITICAL:polyswarmd.wsgi:polyswarmd is ready!
polyswarmd_1_c1d732ac5355 | CRITICAL:polyswarmd.wsgi:polyswarmd is ready!
polyswarmd_1_c1d732ac5355 | CRITICAL:polyswarmd.wsgi:polyswarmd is ready!

When ready, polyswarmd will print polyswarmd is ready! once for every polyswarmd thread (4 by default).

Windows VM:測試到 polyswarmd 的連接

On your Windows VM, confirm that polyswarmd is available and ready to respond to your Microengine. To do that, run the following command in PowerShell:

PS > curl -UseBasicParsing http://polyswarmd:31337/status

It should output the following:

StatusCode        : 200
StatusDescription : OK
Content           : {"result":{"home":{"block":189,"reachable":true,"syncing":false},"ipfs":{"reachable":true},"side":{
                    "block":191,"reachable":true,"syncing":false}},"status":"OK"}
...

The key thing to look for is "status":"OK".

Windows VM:啟動 balancemanager 和您的引擎

Start a new PowerShell window and activate your virtual environment. Then change into your Microengine's directory.

Install your microengine's requirements:

PS > pip install -r requirements.txt

(Re-)compile and install your microengine library:

PS > python .\setup.py install

Make sure you recompile & reinstall your module every time you make changes!

balancemanager is a utility (based on polyswarm-client) that will help us maintain a balance of (fake) PolySwarm Nectar (NCT) on the sidechain of our local testnet where all transactions will take place.

In that same PowerShell window, launch balancemanager as follows:

PS > balancemanager --log INFO maintain --keyfile microengine_keyfile --password password --polyswarmd-addr polyswarmd:31337 --insecure-transport 100000 500000

It will print output similar to the following:

INFO:balancemanager:2019-04-23 16:46:54,787 Logging in text format.
INFO:polyswarmclient:2019-04-23 16:46:54,787 Logging in text format.
INFO:balancemanager.__main__:2019-04-23 16:46:54,787 Maintaining the minimum balance by depositing 500000.0 NCT when it falls below 100000.0 NCT
INFO:polyswarmclient:2019-04-23 16:46:56,474 Using account: 0x05328f171b8c1463eaFDACCA478D9EE6a1d923F8
INFO:polyswarmclient:2019-04-23 16:46:57,175 Received connected on chain side: {'start_time': '1556063097.7256606'}
INFO:polyswarmclient:2019-04-23 16:46:57,176 Connected to event socket at: 1556063097.7256606
INFO:polyswarmclient:2019-04-23 16:46:57,178 Received connected on chain home: {'start_time': '1556063097.7256606'}
INFO:polyswarmclient:2019-04-23 16:46:57,178 Connected to event socket at: 1556063097.7256606
INFO:balancemanager:2019-04-23 16:46:57,487 Sidechain balance (0 NCT) is below minimum (100000000000000000000000 NCT). Depositing 500000000000000000000000 NCT
WARNING:polyswarmclient.transaction:2019-04-23 16:46:58,568 Updated nonce to 1 on home
INFO:balancemanager:2019-04-23 16:47:00,571 Waiting for 26 more blocks
INFO:balancemanager:2019-04-23 16:47:00,583 Waiting for 25 more blocks
...
INFO:balancemanager:2019-04-23 16:47:23,136 Waiting for 1 more blocks
INFO:balancemanager:2019-04-23 16:47:24,280 Waiting for 0 more blocks
INFO:balancemanager:2019-04-23 16:47:25,436 Checking NCT balance
INFO:balancemanager:2019-04-23 16:47:25,436 Balance increased to 500000000000000000000000 NCT

Balance increased to X NCT will appear once balancemanager has successfully relayed tokens. Once this happens, you're ready to launch your microengine.

Start another new PowerShell window and activate your virtual environment. Then change into your Microengine's directory.

Run your Microengine using a command similar to the following command. Be sure to update the value for the --backend argument to match the name of your Microengine's package directory (i.e. the directory in src/):

PS > microengine --log INFO --keyfile microengine_keyfile --password password --polyswarmd-addr polyswarmd:31337 --insecure-transport --testing 2 --backend polyswarm_eicar

It will print output similar to the following:

INFO:microengine:2019-04-23 17:01:04,224 Logging in text format.
INFO:polyswarm_eicar:2019-04-23 17:01:04,224 Logging in text format.
INFO:polyswarmclient:2019-04-23 17:01:04,240 Logging in text format.
INFO:polyswarmclient:2019-04-23 17:01:06,100 Using account: 0x05328f171b8c1463eaFDACCA478D9EE6a1d923F8
INFO:polyswarm_eicar:2019-04-23 17:01:06,100 Loading eicar scanner...
INFO:polyswarmclient:2019-04-23 17:01:06,539 Received connected on chain side: {'start_time': '1556063097.7256606'}
INFO:polyswarmclient:2019-04-23 17:01:06,539 Connected to event socket at: 1556063097.7256606

Running with --testing 2 means that your microengine will respond to 2 bounties and then refuse to respond to further bounties by shutting itself off. You can adjust this number if you want it to process more bounties in your tests.

But, your microengine will not have any bounties to process until there is an Ambassador sending bounties into the testnet.

Linux VM: Launch the Ambassador

Back in your Linux VM, launch an ambassador that will place bounties on the testnet (in orchestration directory):

$ docker-compose -f ambassador-eicar.yml pull
$ docker-compose -f ambassador-eicar.yml up

Shortly after this starts, you will see messages in your microengine's PowerShell window when it is processing bounties:

INFO:microengine:2019-04-23 17:01:04,224 Logging in text format.
INFO:polyswarm_eicar:2019-04-23 17:01:04,224 Logging in text format.
INFO:polyswarmclient:2019-04-23 17:01:04,240 Logging in text format.
INFO:polyswarmclient:2019-04-23 17:01:06,100 Using account: 0x05328f171b8c1463eaFDACCA478D9EE6a1d923F8
INFO:polyswarm_eicar:2019-04-23 17:01:06,100 Loading eicar scanner...
INFO:polyswarmclient:2019-04-23 17:01:06,539 Received connected on chain side: {'start_time': '1556063097.7256606'}
INFO:polyswarmclient:2019-04-23 17:01:06,539 Connected to event socket at: 1556063097.7256606
INFO:polyswarmclient:2019-04-23 17:09:04,484 Received bounty on chain side: {'uri': 'QmVoLQJ2nm4V6XiZXC9vEUrCaTHdkXS7y3crztZ5HwC9iK', 'author': '0x4B1867c484871926109E3C47668d5C0938CA3527', 'expiration': '1553', 'guid': '1a913ea7-57d8-4116-ae8c-58a85d5fcb76', 'amount': '62500000000000000'}
INFO:polyswarmclient.abstractmicroengine:2019-04-23 17:09:04,487 Testing mode, 1 bounties remaining
INFO:polyswarmclient:2019-04-23 17:09:04,490 Received bounty on chain side: {'uri': 'QmVoLQJ2nm4V6XiZXC9vEUrCaTHdkXS7y3crztZ5HwC9iK', 'author': '0x4B1867c484871926109E3C47668d5C0938CA3527', 'expiration': '1553', 'guid': '1679c36f-1cec-49b6-9e4f-147e5b90cbf7', 'amount': '62500000000000000'}
INFO:polyswarmclient.abstractmicroengine:2019-04-23 17:09:04,490 Testing mode, 0 bounties remaining
INFO:polyswarmclient.abstractmicroengine:2019-04-23 17:09:04,599 Responding to bounty: 1679c36f-1cec-49b6-9e4f-147e5b90cbf7
INFO:polyswarmclient.abstractmicroengine:2019-04-23 17:09:04,663 Responding to bounty: 1a913ea7-57d8-4116-ae8c-58a85d5fcb76
...
INFO:polyswarmclient:2019-04-23 17:09:06,068 Received bounty on chain side: {'uri': 'QmVjWbqv8aXEPE53vDYS9r3wG7odJjrHXf7ci1xfLyNAEU', 'author': '0x4B1867c484871926109E3C47668d5C0938CA3527', 'expiration': '1554', 'guid': '20eb7c80-112e-4112-b734-3227c55eb012', 'amount': '62500000000000000'}
WARNING:polyswarmclient.abstractmicroengine:2019-04-23 17:09:06,068 Received new bounty, but finished with testing mode
...
INFO:polyswarmclient.abstractmicroengine:2019-04-23 17:09:11,115 Testing mode, 1 reveals remaining
INFO:polyswarmclient.abstractmicroengine:2019-04-23 17:09:11,115 Testing mode, 0 reveals remaining
...
INFO:polyswarmclient:2019-04-23 17:09:12,990 Received reveal on chain side: {'author': '0x05328f171b8c1463eaFDACCA478D9EE6a1d923F8', 'verdicts': [True], 'metadata': '', 'nonce': '56767235630862803906216335683404829506335438585994501133003213337802994149740', 'index': 0, 'bounty_guid': '1679c36f-1cec-49b6-9e4f-147e5b90cbf7'}
INFO:polyswarmclient:2019-04-23 17:09:12,990 Received reveal on chain side: {'author': '0x05328f171b8c1463eaFDACCA478D9EE6a1d923F8', 'verdicts': [True], 'metadata': '', 'nonce': '98106466135750482350647664260206061365588390261131053926036201654979653772814', 'index': 0, 'bounty_guid': '1a913ea7-57d8-4116-ae8c-58a85d5fcb76'}
INFO:polyswarmclient.events:2019-04-23 17:09:13,288 OnRevealAssertionDueCallback callback results: [[{'author': '0x05328f171b8c1463eaFDACCA478D9EE6a1d923F8', 'bounty_guid': '1a913ea7-57d8-4116-ae8c-58a85d5fcb76', 'index': 0, 'metadata': '', 'nonce': '98106466135750482350647664260206061365588390261131053926036201654979653772814', 'verdicts': [True]}]]
...
INFO:polyswarmclient:2019-04-23 17:09:39,718 Received vote on chain side: {'bounty_guid': '1679c36f-1cec-49b6-9e4f-147e5b90cbf7', 'votes': [True], 'voter': '0xF870491ea0F53F67846Eecb57855284D8270284D'}
INFO:polyswarmclient:2019-04-23 17:09:39,718 Received vote on chain side: {'bounty_guid': '1a913ea7-57d8-4116-ae8c-58a85d5fcb76', 'votes': [True], 'voter': '0xF870491ea0F53F67846Eecb57855284D8270284D'}
...
INFO:polyswarmclient:2019-04-23 17:09:39,790 Received quorum on chain side: {'bounty_guid': '1679c36f-1cec-49b6-9e4f-147e5b90cbf7'}
INFO:polyswarmclient:2019-04-23 17:09:39,790 Received quorum on chain side: {'bounty_guid': '1a913ea7-57d8-4116-ae8c-58a85d5fcb76'}
...
INFO:polyswarmclient.abstractmicroengine:2019-04-23 17:09:39,802 Testing mode, 1 settles remaining
INFO:polyswarmclient.abstractmicroengine:2019-04-23 17:09:39,802 Testing mode, 0 settles remaining
...
WARNING:polyswarmclient.abstractmicroengine:2019-04-23 17:09:41,162 Scheduled settle, but finished with testing mode
...
INFO:polyswarmclient:2019-04-23 17:09:41,194 Received settled_bounty on chain side: {'bounty_guid': '1679c36f-1cec-49b6-9e4f-147e5b90cbf7', 'payout': 0, 'settler': '0x4B1867c484871926109E3C47668d5C0938CA3527'}
INFO:polyswarmclient:2019-04-23 17:09:41,194 Received settled_bounty on chain side: {'bounty_guid': '1a913ea7-57d8-4116-ae8c-58a85d5fcb76', 'payout': 0, 'settler': '0x4B1867c484871926109E3C47668d5C0938CA3527'}
INFO:polyswarmclient.abstractmicroengine:2019-04-23 17:09:42,193 All testing bounties complete, exiting
INFO:polyswarmclient.events:2019-04-23 17:09:42,193 OnQuorumReachedCallback callback results: [[{'from': '0x6aDf0cDB042588Ec4a88393871Ddede57cC168E3', 'to': '0x05328f171b8c1463eaFDACCA478D9EE6a1d923F8', 'value': '125000000000000000'}]]
Task exception was never retrieved
future: <Task finished coro=<OnQuorumReachedCallback.run() done, defined at c:\users\user\polyswarmvenv\lib\site-packages\polyswarmclient\events.py:162> exception=CancelledError()>
concurrent.futures._base.CancelledError
INFO:polyswarmclient:2019-04-23 17:09:42,522 Clean exit requested, exiting

Highlights from the log above:

  1. 微引擎啟動時記錄 (1556063097.7256606)
  2. 微型引擎提示,其接收到了 2 個懸賞(兩者都用於相同的工件)。
  3. 微型引擎提示,其僅回應了 2 個懸賞(上述 --testing 2 參數)。
  4. 微引擎回應 2 個懸賞。
  5. 我已經接收到第三賞金,並提示,其將不會回應此賞金。
  6. 微引擎等待斷言窗口關閉,以便它可以提交其顯示。
  7. 微引擎顯示其 2 個斷言。
  8. 微引擎對其回應的 2 個懸賞進行仲裁表決(除了對其不作出回應的懸賞的表決外)。
  9. The microengine attempts to settle the bounty, but --testing 2 limits its ability to do so and exits before it claims its payout.

Microengines in exiting in testing mode prior to proper bounty settling (and payout retrieval) is a known issue. This above output will change once this issue is addressed.

全部完成

Congrats!

Your Windows-Based Engine should now be responding to bounties placed on a local testnet hosted in your Linux VM.

Let your Microengine run until it shuts itself off.

Take a close look at the output of your engine to ensure it's doing what you want it to :)