Giter VIP home page Giter VIP logo

raspberrypivm's Introduction

RaspberryPiVM

This repository contains a Raspberry Pi vm, it is sometimes good to have an ARMv6 machine for testing or development.

GUI: alt tag

Lite: alt tag

To configure vm all you have to do is:

  1. download the following images files and place it in same folder with this git project.

1.1. http://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2017-07-05/2017-07-05-raspbian-jessie-lite.zip

1.2. http://downloads.raspberrypi.org/raspbian/images/raspbian-2017-04-10/2017-04-10-raspbian-jessie.zip

  1. apt-get install qemu-system
  2. chmod +x boot.sh
  3. chmod +x boot_ui.sh
  4. chmod +x boot_ui_net.sh
  5. chmod +x boot_net.sh

To run the vm you have 4 options:

  1. run boot_ui.sh to run a Raspberry Pi machine with a desktop.
  2. run boot_ui_net.sh to run a Raspberry Pi machine with a desktop and network.
  3. run boot.sh to run a Raspberry Pi lite Machine.
  4. run boot.sh to run a Raspberry Pi lite Machine and network.

Both contains the default username/password of rasppbery pi which is pi/raspberry.

To connect to the machine make sure ssh is running by using:

service ssh start

From the host machine you can connect to the machine by using the following command:

ssh [email protected] -p 2222

On the other hand you can create a tunnel and allow remote machine to connect thru.

  1. on the host machine use the following command to create the tunnel:
ssh -N -L 1337:127.0.0.1:22 [email protected] -p 2222 -g
  1. on the remote machine just connect to the host machine ip and port 1337
ssh [email protected] -p 1337

If you want to connect your raspberry pi to the internet via the host machine you will have to pass the network thru you host machine to the vm

  1. install tap interface on your host machine

1.1.apt-get install uml-utilities # tunctl tool

1.2. tunctl -t tap0 -u root # start tap0 interface and assign it do id 0(root)

1.3. ifconfig tap0 172.30.0.1/24 # set ip address on the tap0 interface

1.4. sysctl net.ipv4.ip_forward=1 # forward the traffic back to the interface

1.5. iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # start the nat table

  1. run raspberry pi image with network *_net.sh and then configure the interface in the raspberry pi image

2.1. ifconfig eth0 172.30.0.2/24

2.2. route add default gw 172.30.0.1

2.3. add nameserver 1.1.1.1 to /etc/resolv.conf # configure DNS server

Have fun,

raspberrypivm's People

Contributors

romanzaikin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.