XMR on Azure – RandomX fork

Previous posts:

https://cryptomining-blog.com/wp-content/uploads/2019/09/monero-xmr-randomx-fork.jpg

Monero network upgrade to new RandomX fork was scheduled on 11/30 and new xmr-stak version dropped support for Monero, so new steps to setup xmrig v5.1.0.

All Azure batch configuration remain the same as reported in original article and uses startup script save in Azure Storage Account

Configuration wizard allows to generate config.json file needed:

{
    "autosave": true,
    "donate-level": 5,
	"randomx": {
        "init": -1,
        "mode": "auto",
        "1gb-pages": true,
        "wrmsr": 6,
        "numa": true
    },
    "cpu": {
	    "enabled": true,
        "huge-pages": true,
        "hw-aes": null,
        "priority": null,
        "memory-pool": false,
        "yield": true,
        "max-threads-hint": 100,
        "asm": true,
        "argon2-impl": null,
        "cn/0": false,
        "cn-lite/0": false
    },
    "opencl": false,
    "cuda": false,
	"log-file": "xmrig.log",
    "pools": [
        {
            "url": "ca.minexmr.com:443",
            "user": "your_wallet_here",
            "keepalive": true,
            "tls": true
        }
    ],
    "print-time": 60,
    "health-print-time": 60,
	"retries": 5,
    "retry-pause": 5
}

Upload config.json to your Azure Storage Account as it will be used inside VM. You can create a custom CPU configuration and optimize for RandomX

Ubuntu build, Huge Page optimization and command line to start miner is:

sudo ./xmrig -c=config.json

The new setup_xmr_f16_v6.sh file used as startup script in Azure Batch is like this:

sudo apt-get --assume-yes update
sudo apt-get --assume-yes install git build-essential cmake libuv1-dev libssl-dev libhwloc-dev
git clone https://github.com/xmrig/xmrig.git
mkdir xmrig/build
cd xmrig/build
cmake ..
make -j$(nproc)
wget https://your_storage_account.blob.core.windows.net/miner/f16/config.json
sudo sysctl -w vm.nr_hugepages=1280
sudo bash -c "echo 3 > /sys/devices/system/node/node0/hugepages/hugepages-1048576kB/nr_hugepages"
screen -dmS monero sudo ./xmrig -c=config.json

To monitor xmrig miner =

tail -s 5 -n 100 -f /mnt/batch/tasks/startup/wd/xmrig/build/xmrig.log
sudo hscreen -r -S monero

For troubleshooting, review these folders:

# Azure Batch startup script location
cd /mnt/batch/tasks/startup/wd/

# xmrig build folder
cd /mnt/batch/tasks/startup/wd/xmrig/build/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.