No description
This repository has been archived on 2026-05-09. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Swift 76.1%
  • Shell 20.4%
  • Makefile 3.5%
Find a file
2023-04-16 15:49:24 +00:00
bin Fixed ssh connection when SSHAgent has too much keys 2023-04-16 15:49:24 +00:00
installer Fixed ssh connection when SSHAgent has too much keys 2023-04-16 15:49:24 +00:00
src Refactoring code (trying to clean) 2022-11-21 21:32:54 +01:00
.gitignore Fixed ssh connection when SSHAgent has too much keys 2023-04-16 15:49:24 +00:00
LICENSE Add LICENSE 2022-11-17 08:07:52 +00:00
Makefile README Update 2022-11-20 19:25:37 +01:00
README.md README Update 2022-11-20 19:25:37 +01:00

appleVM Project

The appleVM (or AVM) aims to give users an headless Ubuntu VM on Apple Silicon Macs running with Apple Virtualization Framework which brings nearly native performance. The main program runs with Swift but functionnalities are accessed through Bash scripts.

The project is hosted on GitLab and releases are available on my cdn ATTSCDN

This programs comes with no warranty, use it at your own risk.

Usage

  • avmstart will start your VM
  • avmshell will launch a shell to your VM (it starts your VM if needed)
  • avmstop will stop your VM (even if shells are opened), it'll kill the VM if necessary
  • avmserial will launch your VM with a serial console and in foreground, so killing the process will kill the VM (requires the VM to be stopped), please use shutdown inside the VM to stop it at the end
  • avmset will set a new configuration variable to your VM
    • avmset cpu CPU will set cpu in cores
    • avmset ram RAM will set ram in MBytes
  • avmshow will display your VM current configuration
  • avmmount NAME PATH will automount PATH (please use an absolute path) at /home/avm/shared/NAME at boot
  • avmunmount NAME will disable automount of NAME share
  • avminstall will install a clean VM (requires to have no VM installed, see avmremove)
  • avmremove will remove your current VM if it exists

Install

Simply use this command in your terminal : wget -O - https://cdn.attssystem.fr/applevm/installer/install.sh -q | zsh. The same script can be used to update, data of the VM will be saved.

You can watch an example video that shows installation on a blank system at cdn.attssystem.fr

Be careful : The installer will add something to your PATH (it will alter ~/.zshrc) and will add keys to your .ssh/ !

Uninstall

Simply use this command in your terminal : wget -O - https://cdn.attssystem.fr/applevm/installer/uninstall.sh -q | zsh. This script is dangerous, be careful when using it.

Configuration

AVM uses an Ubuntu 22.10 Server for ARM VM. Username is avm and password is avm, password is never required because it allows AVM to send sudo commands (for instance to stop VM).

AVM is using 192.168.65.1/24 network which is only local to your computer, the VM is connected through 192.168.65.2/24 and uses gateway given above.

Connection to the VM is made using SSH with pre-generated keys. During the installation process, new keys are generated and replace the old ones on the VM.

Aliases

The VM comes with presinstalled aliases in ~/.bashrc :

alias shutdown='sudo shutdown -h now'
alias reboot='sudo reboot -h now'
alias ufw='sudo ufw'
alias ports='sudo lsof -i -P -n | grep LISTEN'
alias install='sudo apt install'
alias remove='sudo apt remove'
alias update='sudo apt update'
alias upgrade='sudo apt update && sudo apt upgrade'
alias dist-upgrade='sudo apt dist-upgrade'
alias svim='sudo vim'
alias restart='sudo systemctl restart'
alias start='sudo systemctl start'
alias stop='sudo systemctl stop'
alias status='sudo systemctl status'
alias enable='sudo systemctl enable'
alias disable='sudo systemctl disable'
alias docker-compose='sudo docker-compose'
alias docker='sudo docker'

VM clean install

An archived version of a clean VM is downloadable at : cdn.attssystem.fr. It weighs ~3GB compressed and ~7GB uncompressed.

It is used for installation but can be downloaded at any time.