XMR on Azure

Based on previous posts:

Latest xmrig version is v6.16.4 which requires a new configuration.

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

Configuration wizard allows to generate config.json file needed:

    "autosave": true,
    "donate-level": 5,
    "cpu": true,
    "opencl": false,
    "cuda": false,
    "pools": [
            "url": "us-west.minexmr.com:443",
            "user": "your_wallet_here",
            "keepalive": true,
            "tls": true

XMR on Azure – RandomX fork

Previous posts:


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/

XMR on Azure – 10/18 Fork update

Based on Mining with Azure Batch

Main folders

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

# xmr-stack bin folder
cd /mnt/batch/tasks/startup/wd/xmr-stak/build/bin

You need to update pools.txt:

"pool_list" :
	{"pool_address" : "pool.minexmr.com:7777", "wallet_address" : "<Monero_Wallet>", "rig_id" : "", "pool_password" : "x", "use_nicehash" : false, "use_tls" : false, "tls_fingerprint" : "", "pool_weight" : 1 },
"currency" : "monero",

Mining with Azure Batch

New version for new Monero Hard Fork on 10/18

Updated on 4/28/2018 with new PoW for Monero7 and XMR-Stak miner


Azure Batch and Pool VM

  • Connect to http://portal.azure.com
  • Create a new Batch Account (free) and associated Storage Account with pool allocation mode “Batch Service” so you don’t need Key Vault
  • Open Batch Account and select Pools
  • Add a new pool with the following settings
    • Image Type = Marketplace (Linux/Windows)
    • Publisher = Canonical
    • Offer = Ubuntu Server
    • Sku = 16.04-LTS
    • Node Size =
      • F16 – XMR Monero
      • NC6 – ETH Ethereum
    • Mode = Fixed
    • Low priority = 3
    • Resize timeout = 90 minutes
  • Wait for resize operation if succeed or not as we are using Low Priority VM so it may fail if Azure has other higher priority VM
  • Click on Nodes and review if VM is there
  • Select the VM and verify Overview = Idle
  • Click on Connect and add a new user with Administrator privilege

Monero CPU miner in Ubuntu F16 VM

  • Create the following setup_xmr_f16_v1.sh file:
sudo apt-get --assume-yes update
sudo apt-get --assume-yes install libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev screen git nano
git clone https://github.com/fireice-uk/xmr-stak-cpu.git
cd xmr-stak-cpu/
cmake .
make install
cd bin/
mv config.txt config.txt.ori
wget https://<your_storage_account>.blob.core.windows.net/miner/f16/config.txt
sudo sysctl -w vm.nr_hugepages=128
screen -dmS monero sudo ./xmr-stak
  • Create the following cpu.txt file:
"cpu_threads_conf" :
 { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 0 },
 { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 1 },
 { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 2 },
 { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 3 },
 { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 4 },
 { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 5 },
 { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 6 },
 { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 7 },
 { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 8 },
 { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 9 },
 { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 10 },
 { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 11 },
 { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 12 },
 { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 13 },
 { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 14 },
 { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 15 },
  • Create the following config.txt file:
"use_slow_memory" : "no_mlck",
"nicehash_nonce" : false,
"aes_override" : null,
"use_tls" : false,
"tls_secure_algo" : true,
"tls_fingerprint" : "",
"call_timeout" : 10,
"retry_time" : 10,
"giveup_limit" : 0,
"verbose_level" : 4,
"h_print_time" : 60,
"daemon_mode" : true,
"output_file" : "./xmr.log",
"httpd_port" : 51000,
"prefer_ipv4" : true,
  • Create the following pools.txt file:
"pool_list" :
 {"pool_address" : "pool.minexmr.com:7777",
  "wallet_address" : "your_wallet",
  "rig_id" : "",
  "pool_password" : "x",
  "use_nicehash" : false,
  "use_tls" : false,
  "tls_fingerprint" : "",
   "pool_weight" : 1
"currency" : "monero7",

Ethereum GPU miner in Ubuntu with NC6 VM

wget -O /tmp/${CUDA_REPO_PKG} http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG}
sudo dpkg -i /tmp/${CUDA_REPO_PKG}
rm -f /tmp/${CUDA_REPO_PKG}
sudo apt-get --assume-yes update
sudo apt-get --assume-yes install cuda-drivers
sudo apt-get --assume-yes install software-properties-common
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get --assume-yes update
sudo apt-get --assume-yes install ethereum ethminer
wget https://github.com/ethereum-mining/ethminer/releases/download/v0.11.0/ethminer-0.11.0-Linux.tar.gz
tar -xf ethminer-0.11.0-Linux.tar.gz
cd bin
./ethminer --farm-recheck 200 -G -S us1.ethermine.org:4444 -FS us2.ethermine.org:4444 -O <wallet_id>.nc6


Upload files to Storage Account

  • Install Azure Storage Explorer
  • Connect to Azure subscription
  • Select Azure Storage Account created for Azure Batch
  • Browse to Blob Containers
  • Right click on Blob containers -> Create a new container
  • Right click on new container -> Set public level access
  • Set “Public read access for blob only”
  • Create 2 new folder f16 and nc6
  • Upload the 3 files in correct folder as reported below:
  • Remember to edit setup_xmr_f16_v4.sh and point to correct config.txt file location

Create a Start task for pool

  • Select the pool
  • Select Start Task
  • Max retry = 0
  • Command line = sudo ./setup_xmr_f16_v4.sh
  • User identity = Pool autouser, Admin
  • Wait for success = False
  • Resource files
  • Environment settings = not configured

Monitor Linux resource

  • Monitor xmr miner =
tail -s 5 -n 100 -f /mnt/batch/tasks/startup/wd/xmr-stak/build/bin/xmr.log
screen -r -S monero
  • Other monitoring tools =

Review this post = https://inglele.wordpress.com/2017/05/19/ethereum-block-reward/


If script is failing to start, please review the log files in

cd /mnt/batch/tasks/startup
vi /mnt/batch/tasks/startup/stderr.txt
vi /mnt/batch/tasks/startup/stdout.txt



ZCash mining evolution

ZCash Mining 101 Guide

ZCash Wallet – Windows


Miner App

Best open source GPU miner = nheqminer-0.5c

Miner Pool

nheqminer.exe -l eu1-zcash.flypool.org:3333 -u <address>.<worker>


Ethereum mining evolution

Ethereum Mining 101 Guide



Miner App

Best open source GPU miner = ethminer 0.11.0



Miner Pool


ethminer.exe --farm-recheck 200 -G -S eu2.ethermine.org:4444 -FS eu1.ethermine.org:4444 -O <wallet_id>.<pc_name>


Note – Avoid Claymore for the following reason:


GPU BIOS optimization


Monero – CPU mining steps

Official website

Moneto Wallet client

Best pool based on hashrate

Monero miner – Windows


Miner Config file =

"pool_address" : "pool.minexmr.com:7777",
"wallet_address" : "YOUR_WALLET_ADDRESS",
"pool_password" : "x",

Monero miner – Linux

# Ubuntu 14.04

    sudo add-apt-repository ppa:ubuntu-toolchain-r/test
    sudo apt update
    sudo apt install gcc-5 g++-5 make
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1 --slave /usr/bin/g++ g++ /usr/bin/g++-5
    curl -L http://www.cmake.org/files/v3.4/cmake-3.4.1.tar.gz | tar -xvzf - -C /tmp/
    cd /tmp/cmake-3.4.1/ && ./configure && make && sudo make install && cd -
    sudo update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 1 --force
    sudo apt install libmicrohttpd-dev libssl-dev libhwloc-dev

    git clone https://github.com/fireice-uk/xmr-stak-cpu.git
    cmake .
    make install

#set memory page
sudo sysctl -w vm.nr_hugepages=128 

#Run miner in screen
screen -S monero sudo ./xmr-stak-cpu

Source = https://github.com/fireice-uk/xmr-stak-cpu/blob/master/LINUXCOMPILE.md

Docker version of miner


Miner configuration =

docker run -itd --restart unless-stopped -e WALLET_ADDRESS='YOUR_WALLET_ADDRESS' -e POOL_PASSWORD='x' -e POOL_ADDRESS='pool.minexmr.com:7777' -e AUTO_THREAD_CONFIG=true --name xmr-stak-cpu timonmat/xmr-stak-cpu

Monero client sync

Speed up the initial blockchain sync with these steps:

# WINDOWS: Create a new folder with Windows File Explorer, and use your web browser to download the following two files to the new folder

# WINDOWS: Double click the Monero zip file that has been downloaded to extract it. Then open Command Prompt. Use the 'cd' command to naviate to your new folder
cd monero
monero-blockchain-import.exe --verify 0 --input-file ./blockchain.raw

# WINDOWS: Delete the raw blockchain download as it is no longer needed
del blockchain.raw

Source = https://www.monero.how/tutorial-how-to-speed-up-initial-blockchain-sync

Mining pool compare for XMR ETH ZEC

Ethereum ETH

Total Hash rate = 87.2 Th/s

Overview = https://www.cryptocompare.com/coins/eth/overview


Top 3 ETH pools

  • 17.5 Th/s = ethermine.org
    User comments = https://www.cryptocompare.com/mining/pools/ethermine/
  •  7.63 Th/s = nanopool.org
    User comments = https://www.cryptocompare.com/mining/pools/nanopool/
  • 53.2 Gh/s = minergate.com
    User comments = https://www.cryptocompare.com/mining/pools/minergate/



Total Hash rate = 263 MSol/s

Overview = https://www.cryptocompare.com/coins/zec/overview

Top 3 ZEC pools

  • 123 MSol/s = zcash.flypool.org
    User comments = https://www.cryptocompare.com/mining/pools/ethermine/
  • 39.3 MSol/s = minergate.com
    User comments = https://www.cryptocompare.com/mining/pools/minergate/
  • 17 MSol/s = nanopool.org
    User comments = https://www.cryptocompare.com/mining/pools/nanopool/


Monero XMR

Total Hash rate = 128 Mh/s

Overview = https://www.cryptocompare.com/coins/xmr/overview


Top 3 XMR pools



AMD Ryzen 7 – Optimized mining software on Docker

XMR CPU Mining on Windows x64

  1. Install Docker on Windows 10 x64
  2. Open Docker Settings -> Advanced -> Maximize number of CPUs
  3. Open CMD or PowerShell
  4. Mine Monero XMR using Wolf Docker package on MinerGate
    docker run -i -e username=my@email.com servethehome/monero_cpu_minergate

XMR CPU Mining on Ubuntu 16.04 x64

  • Install Docker on Ubuntu 16.04 x64

    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    sudo apt-get update
    apt-cache policy docker-ce
    sudo apt-get install -y docker-ce
  • Mine Monero XMR using Wolf Docker package on MinerGate
    sudo docker run -i -t -e username=my@email.com servethehome/monero_cpu_minergate
  • Run container in a dedicated screen and switch it back to mining screen
    screen -S monerocpu your_cmd_here
    screen -r -S monerocpu
  • Stop mining
    sudo docker stop monero_cpu_minergate

CPU Performance

  • Azure F16 VM = 1x Intel Xeon E5-2673 v3 @ 2.40GHz = <tbd> H/s
  • Azure NC6 VM = 1x Intel Xeon E5-2690 V3 = 550H/s
  • Home = 1x AMD Ryzen 7 1700 = 481H/s

Full CPU performance list.

Docker miners repository

List of containers you can run to mine a specific cryptocurrency on different pools is available on ServeTheHome GitHub

Basic Docker cmd

  • Copy container = sudo docker pull servethehome/monero_cpu_minergate
  • List containers = sudo docker ps -a
  • List information = sudo docker info
  • Delete container = sudo docker rm “container_name”
  • Delete image = sudo docker rmi “image_name”


Other CPU & GPU Mining

Follow steps above and download other docker miners from ServeTheHome GitHub

# ======================
# GPU Monero XMR
sudo docker pull servethehome/monero_gpu_nv_minergate
sudo docker run -i -t -e username=my@mail.com servethehome/monero_gpu_nv_minergate

# ======================
sudo docker pull servethehome/zec_cpu_nheq_minergate
sudo docker run -i -t -e username=my@mail.com servethehome/zec_cpu_nheq_minergate


Source =


XFX RX 580 ZCash Mining tuning

Card Tech Spec


  • Card Vendor = XFX
  • RAM Vendor = Hynix

Radeon Tech Spec


Compute Units1 36
Stream Processors 2304
Clock Speeds (Boost / Base) Up to 1340 MHz / Up to 1257 MHz
Peak Performance (TFLOPS) Up to 6.2
Memory Speed (Effective) Up to 8 Gbps
Texture Units 144
ROPs 32
Memory Bandwidth Up to 256 GB/s
Memory Interface 256 bit
Memory Type GDDR5
GCN Architecture 4th Generation
AMD FreeSync™ Technology 5 Yes
DirectX® 12 and Vulkan® Support  Yes
HDMI™ 4K60 support
DisplayPort Version 6 1.4
HDCP 2.2


BIOS Tuning

<in progress>


Miner settings

Since the Equihash (Zcash) algorithm usually prefers a higher core timing than does the Ethash algorithm that is used for Ethereum mining, I also ran a second test run with the core clock set a bit higher to 1300 MHz. I then needed to increase the core voltage to 1050mv too, so it does come as a trade-of between hash/sec versus power consumption. On the plus side, Zcash is not as memory bandwidth dependent as Ethereum, you can lower the memory clocks a bit, or to default in this case, to save a bit of power.