Mining bitcoin with Azure (and why it is a terrible idea)

Update:

I posted about my experience purchasing mining power from a dedicated hosting provider https://davidburela.wordpress.com/2016/01/30/analysing-my-progress-and-profitability-in-cryptocurrency-mining/

Disclaimer:

This is extremely inefficient and will not earn any bitcoin. You will spend $1,000s of VM time for a near 0% chance of earning anything. A $30 USB device is ~100,000x faster for mining.

Again: YOU WILL NOT EARN ANY BITCOIN (less than 1c in a month)

TL;DR The commands to create a machine in Azure to CPU mine are at the bottom. But don’t bother.

 

I have been playing with the blockchain lately, most notably the programmable blockchain Ethereum. I was interested in seeing how difficult it was to set up a machine to mine Bitcoin. What I discovered through my research was that it is possible, but pointless to do CPU mining in the cloud.

Why is mining on Azure bad?

While it is easy to set it up, CPU mining is extremely inefficient. Mining on CPUs was depreceated a long time ago when it was discovered that it was faster to do on GPUs. But now even GPUs have been deprecated in favor of power efficient ASIC machines

Here are some hardware comparisions of ASIC devices from https://www.bitcoinmining.com/bitcoin-mining-hardware/

image

There are even cheap USB devices that you can plug in that give you GIGAhashes/second
image

How did my Azure miner go?

My 2 core Azure machine costs $85/month, and doing CPU only getting me 4.24+4.25= 8.5 kilohash/second (0.0000085 GH/s), compare that to the 3.6 GH/s that an ASIC $30 USB device provides.

image

And after 2 days of mining I didn’t even get a single hash even accepted by the mining pool, effictivelly making my mining worth 0%.
image

Could this be faster?

On Azure, renting servers with a faster CPU (D & G-Series) would net negligble increases due to CPU mining.

The upcoming N-Series of VMs will have dedicated GPUs attached that you can offload work to. This would be an order of magnitude faster in mining. http://www.hpcwire.com/2015/09/29/microsoft-puts-gpu-boosters-on-azure-cloud/

The price per hour of a N-Series VM would be so high that you would be better off just paying to rent dedicated ASIC bitcoin mining rigs e.g. there is a list at the bottom of this blog post https://www.bitcoinmining.com/best-bitcoin-cloud-mining-contract-reviews/

Instructions for creating on Azure (if you really want to try it)

  1. Sign up for a mining pool e.g. https://bitminter.com/ (to give you a higher chance of getting a trickle)
  2. login to https://portal.azure.com
  3. create a new Ubuntu virtual machine from the marketplace.
    I recommend Ubuntu on a basic size VM as we won’t be using the features of standard
  4. use Putty to remotely connect to your VM
  5. Install bitcoind (bitcoin daemon)
    sudo add-apt-repository ppa:bitcoin/bitcoin
    sudo apt-get update
    sudo apt-get install bitcoin-qt
  6. Configure bitcoind
    Run bitcoind to see instructions on what should be in the bitcoin.conf
    Create a bitcoin.conf file under ~/.bitcoin
    sudo nano ~/.bitcoin/bitcoin.conf
  7. Install a miner (cpuminer). Instructions from https://bitcointalk.org/index.php?topic=55038.0
    sudo apt-get install build-essential libcurl4-openssl-dev
    wget http://sourceforge.net/projects/cpuminer/files/pooler-cpuminer-2.4.2.tar.gz
    tar xzf pooler-cpuminer-*.tar.gz
    cd cpuminer-*
    ./configure CFLAGS=”-O3″
    make
  8. start the miner to test it all works
    ./minerd -o stratum+tcp://mint.bitminter.com:3333 –u <username_workernumber> -p X
  9. add the miner to startup. Edit /etc/rc.local to add it
    sudo nano /etc/rc.local
    Then on a line before exit 0, add the full path of your startup command with & at the end of the line
    e.g. /home/youruser/cpuminerXYZ/minerd -o stratum+tcp://mint.bitminter.com:3333 –u <username_workernumber> -p X &
Advertisements

5 thoughts on “Mining bitcoin with Azure (and why it is a terrible idea)

  1. I am not able to understand after step 6. Can you please help me where to put my wallet address. Thanks in advance.

  2. Is time to become rich and get more than $3,690 USD daily connect your mining wallet to my mining stream now and become a millionaire within 1 year i mine BTC, BCH, and ETH within 24 hours you can earn at least 0.5 BTC daily you can email me now bitcoinminers50@gmail.com

  3. I’m not suppose to be here doing this but i cant just help it, So straight to my story…..I started having interest in cryptocurrency when i saw my friend that invested early this year have earn about 70K USD as at now which he clearly explain to me how he started with 4K USD just with the help and guides of prof Sydney. He made me know how he contacted the prof and how the prof genuinely shed more light on crypto to him that they will be around forever and how it is very important to keep bitcoins even if it is 1 btc. I proceed to check a lot reviews on prof Sydney and i wasnt disappointed because i finally found a lot of good articles about bitcoins mining where nobody cries scamm. I think it pleasant to work with him which i did and i never regret emailing the prof. He help me mine 3.45 bitcoins in less than 72 hours and i am able to reinvest again so i can acquire more btc. I will implore you to hire only professionals when you need a miner. You can always email the prof right away to help you mine bitcoins anytime. (Profsydneycryptoconsultancy AT gmail DOT com)

  4. I have been looking to get into bitcoin mining but finding it too difficult to start. I bumped into an article online on investments and profit through bitcoin mining and other alt coins. The daily,weekly,monthly income got me really, i couldn’t comprehend the process but after further enlightenment via comment section i realized i can be assisted and this got me directed to crypto expert whom I contacted via his email address CryptobinaryExpert(at)Hotmail DOT com.Breaking financial barriers is one of the sweetest achievement one can achieve and with a profit of One hundred and twenty nine thousand dollars in a couple of weeks should be regarded as a gain though.

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