Linux Virtual Machine for running the Ethereum client Alethzero

KenKKenK Member Posts: 44 admin

Why use this virtual machine?

While we are currently in the POC stage and the Clients are rapidly iterating, we have created a linux VM containing a stable version of Alethzero for development and for our upcoming tutorials:

Using a VM in concert with the Ethereum client is highly recommended as it allows developers to avoid the frequent compatibility issues which come with building a pre-alpha client, while freeing them up to switch between builds simply and with few technical problems.

How to install the VM

You can download it using this Magnet Link (which sadly our forum software won't let us link to).

magnet:?xt=urn:btih:524badd3fc667452dde3e7a72f67b86d261aaae8&dn=Ethereum%20VM&tr=udp%3A%2F%2Fopen.demonii.com%3A1337%2Fannounce

This VM was created using VMWare fusion 7 and tested for compatibility with vmware workstation 10 - both of which are available as a thirty day free trial from vmware.com. At it's base is a clean install of the latest version of Ubuntu Linux. All dependencies for Alethzero were installed in stages, with snapshots taken to allow users to revert to previous sytems states in order to troubleshoot. It currently has a working version of the Alethzero client installed which has been tested to work with the latest tutorials.

After installing the VM and importing the VM files included in the torrent, you should start up the VM and be confronted with an ubuntu login page - the password is 'password' and you will find a shortcut to the Alethzero client located on the desktop. If at any time you wish to revert back to the state the vm was in when you downloaded it just select the snapshot "Alethzero installed" and click restore.

(optional) How to perform a manual install

It is possible to create your own vm, by first downloading the software from the vmware website, creating a VM using Ubuntu linux, and then following the instructions on our building in ubuntu wiki.

The process of constructing this vm is detailed below so that you might follow it yourself if you would prefer not to download our (rather large) torrent.
  • Download VMWARE fusion or workstation trial from the VMware website.
  • Download the Ubuntu disc image (ISO) from the ubuntu website
  • Once VMware is downloaded open the file and follow the installation instructions. Run the program and select File> New and create a virtual machine. Choose to create it from a 'disc or image' and select the Ubuntu ISO you downloaded previoulsy. Choose install and setup your vm as you would like it. make sure you specify the VM has at least 2GB of memory or the build of alethzero will fail.
  • Once ubuntu is installed you will want to update your package manager. Open the terminal and type: sudo apt-get update && sudo apt-get upgrade
  • Now return to your host sytem and find the vmware window go to Virtual Machine > install VMWare tools. This will mount a cd containing files needed by linux to use the hosts sytems hardware and copy paste between your host system and your vm. Go back to your vm and navigate to the drive marked vmware tools - extract the vmware tar ball to the desktop. Then return to the terminal and input:
cd Desktop/vmware-tools-distrib
sudo ./vmware-install.pl -d
  • Shutdown and take a snaphot of your vm to revert to later.
  • Start-up your vm and you should now find that you can alter the size of the screen and copy paste between your host and the vm. If you cant google vmware tools and see if you can trouble shoot what went wrong.
  • You now have the base to install the dependencies for Alethzero. Start by entering the below in the terminal:
sudo apt-get install build-essential g++-4.8 git cmake libgmp-dev \ libboost-all-dev automake unzip libtool libleveldb-dev yasm libminiupnpc-dev \ libreadline-dev scons libncurses5-dev qtbase5-dev qt5-default qtdeclarative5-dev \ libqt5webkit5-dev \ libcurl4-openssl-dev libjsoncpp-dev libargtable2-dev libboost-test-dev cmake
  • Shutdown and take a snapshot ;)
  • Now add the cryptopp dependencies:
git clone https://github.com/mmoss/cryptopp.git
cd cryptopp
sudo scons --shared --prefix=/usr
cd ..
  • Shutdown and take a snapshot :p
  • Install the JSONRPC library - currently we are using an older version which may not be compatible with future builds. Make sure you check for updates on the 'building on ubuntu' wiki if you experience issues with the javascript api:
git clone https://github.com/cinemast/libjson-rpc-cpp
cd libjson-rpc-cpp
git reset --hard eaca2481e2889d5a5b748383fb02b1d395969cd4
mkdir -p build
cd build
cmake .. && make
sudo make install #Not required, but makes it easier to use
sudo ldconfig #only required for linux
cd ../../
  • Shutdown and take a snapshot :p
  • Install Unittests:
git clone https://github.com/ethereum/tests
cd tests
git checkout develop
cd ..
  • Shutdown and take a snapshot (doh).
  • Now you are going to clone the cpp-ethereum develop git:
git clone https://github.com/ethereum/cpp-ethereum
cd cpp-ethereum
git checkout develop
  • On this build we have used commit e81197606ae29c4be3ac37ad4e8aaf699fbcd039 if you would like to use this commit also use command:
git reset --hard e81197606ae29c4be3ac37ad4e8aaf699fbcd039
  • Inside the cpp-ethereum folder you will create a build folder and run the build process:
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release && make
  • Once completed shutdown and take a snapshot.
Voila! you now have a Linux VM with a copy of the Alethzero client running. This is an optimal approach to development during the pre-alpha stage with new versions of the client being released daily - you can try new builds and features without sacrificing a stable development environment.
Post edited by StephanTual on
«1

Comments

  • eaglgenes101eaglgenes101 Member Posts: 43
    Can you make a VM image for QEMU-KVM? Some of us are much more comfortable with open source software.
  • KapacornKapacorn TorontoMember Posts: 27
    Seems to be working better however it only downloads 1 block, i still get that no upnp device found and can't mine finney to test out the transactions.

    my log looks something like this

    N* [ 04:15:28 | main ] Address: ::1 = ::1 [LOCAL]
    *N* [ 04:15:28 | main ] Address: fe80::20c:29ff:fee5:a61d%eth0 = fe80::20c:29ff:fee5:a61d%eth0 [PEER]
    *N* [ 04:15:28 | main ] Id: a30e79a4…
    *** [ 04:15:28 | main ] Opened blockchain DB. Latest: 955f36d073ccb026b78ab3424c15cf966a7563aa270413859f78702b9e8e22cb
    *** [ 04:15:28 | main ] Opened state DB.
    !!! [ 04:16:32 | main ] Weird port being recorded: 0
    !!! [ 04:16:32 | main ] Weird port being recorded: 10101
    *** [ 04:16:40 | p2p ] UPnP device not found.
    *N* [ 04:16:40 | p2p ] Id: 0b8535ba…
    !!! [ 04:16:41 | p2p ] Weird port being recorded: 10101

    !!! [ 04:16:41 | p2p ] Weird port being recorded: 10101
    !!! [ 04:16:41 | p2p ] Weird port being recorded: 32503
    !N! [ 04:16:59 | p2p | 44 ] Error reading: Connection reset by peer
    !N! [ 04:17:00 | p2p | 48 ] Error reading: Connection reset by peer
    !N! [ 04:18:30 | p2p | -1 ] Error reading: Operation cancelled
    !N! [ 04:18:30 | p2p | -1 ] Error reading: Operation cancelled
    !N! [ 04:18:30 | p2p | -1 ] Error reading: Operation cancelled
    !N! [ 04:18:30 | p2p | -1 ] Error reading: Operation cancelled
    !!! [ 04:18:31 | p2p ] Weird port being recorded: 10101
    !!! [ 04:18:31 | p2p ] Weird port being recorded: 10101
    !!! [ 04:18:35 | p2p ] Weird port being recorded: 3030
    !!! [ 04:18:35 | p2p ] Weird port being recorded: 20202 peer
    !N! [ 04:18:50 | p2p | 48 ] Error reading: Connection reset by peer
    !!! [ 04:18:50 | p2p ] Weird port being recorded: 112
    !!! [ 04:18:52 | p2p ] Weird port being recorded: 10553
    !N! [ 04:19:09 | p2p | 437 ] Error reading: Connection reset by peer
    !N! [ 04:19:09 | p2p | 48 ] Error reading: Connection reset by peer
    !N! [ 04:19:28 | p2p | 200 ] Error reading: Connection reset by peer
    !N! [ 04:26:13 | p2p | 48 ] Error reading: Connection reset by peer
    +N+ [ 04:26:19 | p2p ] Attempting connection to node e52c3bde… @ 109.201.137.163:30303 ( Connection refused )
    +N+ [ 04:26:23 | p2p ] Attempting connection to node afc431e8… @
    +N+ [ 04:26:24 | p2p ] Attempting connection to node 6a617dc3… @ 37.120.31.241:30303 from 0b8535ba…
    +N+ [ 04:26:24 | p2p ] Connection refused to node 18ef2b81… @ 184.75.212.242:30303 ( Connection refused )
    !N! [ 04:27:48 | p2p | 44 ] Error reading: Connection reset by peer
    !N! [ 04:27:48 | p2p | 48 ] Error reading: Connection reset by peer
  • KenKKenK Member Posts: 44 admin
    @Kapacorn‌ Generally the test net works with the latest version as it is designed for our dev team to actually use to develop the client. You have two choices, either start a private chain and force mine your own coins to play around with the system, or restore the VM to before alethzero is installed and run steps 16-19 so that you will have the latest build of Alethzero - this may not be stable however.
  • PhonikGPhonikG Member Posts: 41 ✭✭

    Can you make a VM image for QEMU-KVM? Some of us are much more comfortable with open source software.

    You could also convert it to a VirtualBox VM as well... this would remove the 30 day license restriction.
  • Eva_PEva_P Member Posts: 6
    I've downloaded your torrent file but I don't understand what to do next. VMWare sees it in the left window as Ethereum Ubuntu but when I try to power it up a window pops up saying "Binary translation is incompatible with long mode on this platform. Long mode will be disabled... etc." Then I press OK and another window pops up:

  • BitcoinzieBitcoinzie Member Posts: 73 ✭✭
    1) What OS are you using.
    2)Is it 32 or 64 bit version
    3)Did you Power cycle your host machine
  • BitcoinzieBitcoinzie Member Posts: 73 ✭✭
    Found this online after a quick search communities.vmware.com/thread/471616
  • Eva_PEva_P Member Posts: 6
    1) Windows 8.1 Pro
    2) 64bit
    3) I'm not sure how to do it
  • BitcoinzieBitcoinzie Member Posts: 73 ✭✭
    edited December 2014
    Restart your computer = Power-Cycle. The link i posted will show you how to turn on Intel VT-x. It's in your BIOS, I can't get this Alethzero vm to function on my machine, win 8.1 64 as well, even with a good install it's clunky and i got the same upnp error that everyone else is. It fires up and all, but the virtual switches it installs wreak havoc on my connections. You'll probably run into the same problem. I also had issues building my own vm of alethzero on hyper-v. I was going to seed it for 8.1 users. I had earlier pocs that functioned, I think the release is just a little unstable.
  • Eva_PEva_P Member Posts: 6
    Lol, great. So I may just as well save the effort.
  • BitcoinzieBitcoinzie Member Posts: 73 ✭✭
    Maybe not, I'm running AMD hardware and it looks like you have an intel machine. I'd like to see you enable Intel VT-x and see if you can run it stable. Could just be that my machine sucks at virtualization.. I have an intel machine put away somewhere this could tell me if I should dig it out. Also giving back as much info as possible is good for alpha and beta releases, you should follow it through and give feedback wherever possible it's your open source duty, if you're going to use it, help make it better.
  • BitcoinzieBitcoinzie Member Posts: 73 ✭✭
    Go to PC Settings -> Update and Recovery -> Recovery -> Advanced Start-up -> Troubleshoot -> Advanced Options -> WEFI Firware Settings
    This will enable your PC to restart with BIOS menu

    Under BIOS

    Go to Configuration -> Intel Virtualization Technology -> enable -> Save and Exit

    This will enable intel vt-x on the PC

    NOTE: for few versions of BIOS intel vt-x option is found under security tab
  • Eva_PEva_P Member Posts: 6
    Yes, thank you for the instructions.
    Give me a few hours, I dont have my laptop w me.
  • o0ragman0oo0ragman0o Member, Moderator Posts: 1,291 mod
    Going on manual install instructions (as I already had a fresh Ubuntu 14.04 VM) this build fails at 64%:

    [ 64%] Building CXX object libethereum/CMakeFiles/ethereum.dir/Client.cpp.o /home/****/cpp-ethereum/libethereum/Client.cpp: In member function ‘virtual dev::eth::LogEntries dev::eth::Client::logs(const dev::eth::LogFilter&) const’: /home/****/cpp-ethereum/libethereum/Client.cpp:630:10: error: ‘total’ was not declared in this scope if (!total) ^ /home/****/cpp-ethereum/libethereum/Client.cpp:631:6: error: ‘falsePos’ was not declared in this scope falsePos++; ^ /home/****/cpp-ethereum/libethereum/Client.cpp:634:4: error: ‘skipped’ was not declared in this scope skipped++; ^ make[2]: *** [libethereum/CMakeFiles/ethereum.dir/Client.cpp.o] Error 1 make[1]: *** [libethereum/CMakeFiles/ethereum.dir/all] Error 2 make: *** [all] Error 2

    ragman
  • o0ragman0oo0ragman0o Member, Moderator Posts: 1,291 mod
    hmm sorry, code tag looks pretty mussedup
  • Eva_PEva_P Member Posts: 6
    Bitcoinzie, it worked! What do I do next?



  • BitcoinzieBitcoinzie Member Posts: 73 ✭✭
    open Alethzero and write some dapps.. Glad it worked out for you!!!
  • BitcoinzieBitcoinzie Member Posts: 73 ✭✭
    Looks like it's time to dig up the beast.. damn I hate my intel machine.
  • Eva_PEva_P Member Posts: 6
    Alright! I need to go back to the previous tutorial. Thank you for the help! I thought the computer illiterate me wouldn't be able to pull it off.
    Why do u hate intel? I love my Lenovo ThinkPad, his name is Zorg and he's a beast!
  • BitcoinzieBitcoinzie Member Posts: 73 ✭✭
    I switched to AMD last year and I was sold. Just to awesome to explain in words. I run photoshop, illustrator, DW, netbeans, surf the net whatever else I feel like running at the same time. like Nothing!! My intel is just old and worn out.
  • BitcoinzieBitcoinzie Member Posts: 73 ✭✭
    Eva_P said:

    Alright! I need to go back to the previous tutorial. Thank you for the help! I thought the computer illiterate me wouldn't be able to pull it off.

    That's not how we operate around here, always lend a hand where a hand is needed. :) you're welcome!!

  • o0ragman0oo0ragman0o Member, Moderator Posts: 1,291 mod
    This host does not support Intel VT-x.
    damn again! Core 2 Quad 8200...had to be one of the only ones without VT-x :(
  • linageelinagee Member Posts: 31 ✭✭

    This host does not support Intel VT-x.
    damn again! Core 2 Quad 8200...had to be one of the only ones without VT-x :(
    6 year old CPU? Time to upgrade to a newer machine! :D
  • pstpst Member Posts: 3
    Your post talks about torrenting the VM as the best way to get AlethZero and play around. But the magnet has no seed, no peer from my end. Could it be because it leverages TPB? I thought Magnets/DHT alleviate SPoF...
  • BitcoinzieBitcoinzie Member Posts: 73 ✭✭
    I'm seeding it now
  • BitcoinzieBitcoinzie Member Posts: 73 ✭✭
    magnet:?xt=urn:btih:26677D6B29B709E66E00B6CD3AC80C6C7EE3BF02&dn=Ethereum%20VM.zip&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce
  • wjschaferwjschafer Member Posts: 4
    Hey guys - please don't use this - way too complicated. go here: https://github.com/ethereum/cpp-ethereum/wiki/Installing-clients

    Thanks Caktux!!
  • o0ragman0oo0ragman0o Member, Moderator Posts: 1,291 mod
    linagee said:


    6 year old CPU? Time to upgrade to a newer machine! :D

    Or a Q8400 from ebay for 60 bucks! At least it'll get me working. No point getting a new PC yet. I built this one to last and this is the first time I've ever actually had a virtualisation problem.

  • o0ragman0oo0ragman0o Member, Moderator Posts: 1,291 mod
    thx wjschafer! Have it running in windows but it doesn't seem to like serpent :(
  • alexey_petrenkoalexey_petrenko RussiaMember Posts: 28

    Going on manual install instructions (as I already had a fresh Ubuntu 14.04 VM) this build fails at 64%:

    [ 64%] Building CXX object libethereum/CMakeFiles/ethereum.dir/Client.cpp.o /home/****/cpp-ethereum/libethereum/Client.cpp: In member function ‘virtual dev::eth::LogEntries dev::eth::Client::logs(const dev::eth::LogFilter&) const’: /home/****/cpp-ethereum/libethereum/Client.cpp:630:10: error: ‘total’ was not declared in this scope if (!total) ^ /home/****/cpp-ethereum/libethereum/Client.cpp:631:6: error: ‘falsePos’ was not declared in this scope falsePos++; ^ /home/****/cpp-ethereum/libethereum/Client.cpp:634:4: error: ‘skipped’ was not declared in this scope skipped++; ^ make[2]: *** [libethereum/CMakeFiles/ethereum.dir/Client.cpp.o] Error 1 make[1]: *** [libethereum/CMakeFiles/ethereum.dir/all] Error 2 make: *** [all] Error 2

    ragman

    How did you manage to work around this? I am facing similar issue now.
Sign In or Register to comment.