All Projects → oVirt → 512-byte-vm

oVirt / 512-byte-vm

Licence: GPL-3.0 license
A VM image in 512 bytes. Yes, you read it right.

Programming Languages

assembly
5116 projects
shell
77523 projects

Projects that are alternatives of or similar to 512-byte-vm

Corewar
A reproduction of the Core War game. Assembly compiler, Virtual Machine and GUI.
Stars: ✭ 173 (+496.55%)
Mutual labels:  virtual-machine, asm
RISVM
A low overhead, embeddable bytecode virtual machine in C++
Stars: ✭ 21 (-27.59%)
Mutual labels:  virtual-machine, asm
c8c
The chip8 compiler, assembler, and virtual machine
Stars: ✭ 110 (+279.31%)
Mutual labels:  virtual-machine, asm
Customasm
💻 An assembler for custom, user-defined instruction sets! https://hlorenzi.github.io/customasm/web/
Stars: ✭ 211 (+627.59%)
Mutual labels:  virtual-machine, asm
embed
An embeddable, tiny Forth interpreter with metacompiler.
Stars: ✭ 80 (+175.86%)
Mutual labels:  virtual-machine
libjit
Unofficial libjit mirror.
Stars: ✭ 46 (+58.62%)
Mutual labels:  virtual-machine
scancode.io
ScanCode.io is a server to script and automate software composition analysis pipelines with ScanPipe pipelines. This project is sponsored by NLnet project https://nlnet.nl/project/vulnerabilitydatabase/ Google Summer of Code, nexB and others generous sponsors!
Stars: ✭ 66 (+127.59%)
Mutual labels:  virtual-machine
hassio-vagrant
Vagrant box running Hass.io / Home Assistant
Stars: ✭ 42 (+44.83%)
Mutual labels:  virtual-machine
dcc
Direct/Interactive C Compiler
Stars: ✭ 18 (-37.93%)
Mutual labels:  asm
lunatic
lunatic: a toy lua interpreter
Stars: ✭ 16 (-44.83%)
Mutual labels:  virtual-machine
specter
a (tiny) VM project built with Go
Stars: ✭ 57 (+96.55%)
Mutual labels:  virtual-machine
Freeze-OS
An Operating System that runs on top of an interpreter.
Stars: ✭ 24 (-17.24%)
Mutual labels:  virtual-machine
boot2flappy
Flappy Bird as bootable UEFI executable
Stars: ✭ 48 (+65.52%)
Mutual labels:  asm
riscvm
Tiny RISC-V virtual machine
Stars: ✭ 26 (-10.34%)
Mutual labels:  virtual-machine
application-server
Application Server
Stars: ✭ 57 (+96.55%)
Mutual labels:  virtual-machine
wizard-engine
Research WebAssembly Engine
Stars: ✭ 164 (+465.52%)
Mutual labels:  virtual-machine
Laythe
A gradually typed language originally based on the crafting interpreters series
Stars: ✭ 58 (+100%)
Mutual labels:  virtual-machine
APIInfo-Plugin-x86
APIInfo Plugin (x86) - A Plugin For x64dbg
Stars: ✭ 42 (+44.83%)
Mutual labels:  asm
ciao
Ciao is a modern Prolog implementation that builds up from a logic-based simple kernel designed to be portable, extensible, and modular.
Stars: ✭ 190 (+555.17%)
Mutual labels:  virtual-machine
fastquery
FastQuery(Method of fast database query) 基于Java语言. 他的使命是:简化Java操作数据层.做为一个开发者,仅仅只需要设计编写DAO接口即可,在项目初始化阶段采用ASM生成好实现类. 因此,开发代码不得不简洁而优雅.从而,大幅度提升开发效率.
Stars: ✭ 63 (+117.24%)
Mutual labels:  asm

The 512-byte VM (Cloud native!)

GitHub release (latest by date) GitHub license GitHub branch checks state

This is a virtual machine that fits in 512 bytes (the boot sector).

Why?!

Because when you test integration with virtualization systems such as oVirt (hint, hint), you often need a VM image to upload. If you have to run dozens or hundreds of test cases you don't want to be uploading GB-sized images.

Can I use it?

Sure! Go grab it from the releases section! We have raw, QCOW2, VDI, VMDK, VHD and ISO images.

How?

Very much simplified, the first thing that loads when a computer, or a VM starts is the BIOS (or UEFI in newer systems). The BIOS provides some very basic functions, such as being able to print to the screen conveniently.

At any rate, the BIOS loads the boot loader from the MBR on the disk (first 512 bytes). UEFI is much smarter, but let's not deal with that right now. The MBR is a set of purely machine instructions that will be run pretty much as it is. This is different from how operating systems load binaries such as EXE files or ELF binaries, since those contain a header and a bunch of other information. The only requirement for the boot sector code is that it must end in 0xAA55 and the BIOS will happily execute it.

So, we compile 512-byte-vm.asm using the NASM assembler and that's it, that's our disk image:

nasm -o 512-byte-vm.raw 512-byte-vm.asm

Beautiful, raw data, right on the disk. You can run it directly using qemu:

qemu-system-x86_64 -drive file=512-byte-vm.raw,format=raw

Alternatively, you can convert it to various formats using qemu-img:

qemu-img convert -c -f raw -O qcow2 512-byte-vm.raw 512-byte-vm.qcow2
qemu-img convert -f raw -O vmdk 512-byte-vm.raw 512-byte-vm.vmdk

Alternatively, you could also use the build script.

Where can I learn more?

We didn't come up with this on our own. Here are a few resources that should get you started:

  • The OSDev Wiki contains a wealth of material in case you want to write your own OS. The Roll Your Own Bootloader section is especially useful if you want to do something similar.
  • The Interrupt Jump Table contains an index of several (older) interrupts that can be used to interact with hardware.
  • This page contains the x86 CPU opcodes that the ASM instructions compile to.

Can I contribute?

Sure! Here's the detailed guide on how to do that!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].