Git Product home page Git Product logo

alpivm's Introduction

AlpiVM

Termux Version

Required packages

pkg install qemu-system-x86_64-headless qemu-utils wget

(incase wget is not installed)

Installing Alpine

First off, we need to create a disk image and grab Alpine image

qemu-img create -f qcow2 alpine.qcow2 4G
wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/x86_64/alpine-virt-3.13.2-x86_64.iso 

Next, create boot.sh or any name and add the content

qemu-system-x86_64 -smp 2 -m 2040 \
-drive file=alpine.qcow2,if=virtio \
-netdev user,id=n1,hostfwd=tcp::6379-:6379,hostfwd=tcp::9000-:9000 \
-device virtio-net,netdev=n1 \
-cdrom alpine-virt-3.13.2-x86_64.iso -boot d \
-nographic

Then, launch boot.sh with:

bash boot.sh

Taken from HERE

Boot into the installation ISO using qemu,
Login into shell with user "root" and no password,
Create a directory with the command mkdir -p /etc/udhcpc/
Create a file /etc/udhcpc/udhcpc.conf with the line RESOLV_CONF="no" preventing udhcpd (Busybox' DHCP server) from overwriting /etc/resolv.conf,
Create /etc/resolv.conf with

nameserver 8.8.8.8
nameserver 8.8.4.4

entries,
Conclude the installation via setup-alpine as usual.

Now press enter mutiple times to choose the default until it shows ssh and choose none
When it shows the disk selection, choose vda ( or sda if it only shows sda )
Then type sys on the disk type screen
Press y and enter key

After installation, run the command:

poweroff

Booting from hard disk

Edit the boot.sh and remove the cdrom line and run the command again:

bash boot.sh

Then login with the credentials you entered in the setup

And your done!

Linux Version

Instead of pkg, use apt (in Debian or Ubuntu) or pacman -S (in Arch Linux "if you even have one") or zypper (in openSUSE)
Same instructions as Termux Version

Windows Version

Install QEmu HERE
Download Alpine HERE

Bootscript

Instead of boot.sh, use boot.bat (or any name but with .bat)
Use the content here instead:
First setup:

qemu-system-x86_64 -smp 2 -m 2040 -drive file=alpine.qcow2,if=virtio -netdev user,id=n1,hostfwd=tcp::6379-:6379,hostfwd=tcp::9000-:9000 -device virtio-net,netdev=n1 -cdrom alpine-virt-3.13.2-x86_64.iso -boot d -nographic

Hard Disk boot:
Same as First Setup but without CDROM line Same instructions as in Termux Version

alpivm's People

Contributors

clockiscool1234 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.