add to VM notes

This commit is contained in:
openoms
2022-01-31 10:25:21 +00:00
parent 53441e3854
commit 22974320b1

View File

@@ -17,22 +17,31 @@ All testers are welcome. Open an issue for your specific board to collaborate an
--- ---
## Virtual Machine ## Virtual Machine
Instructions to run a RaspiBlitz as a VM on a Linux host machine.
The process is similar if you want to run RaspiBlitz on the bare metal.
Tested with: Tested with:
* Debian image in VirtualBox and linux virt-manager / [cockpit-machines](https://github.com/cockpit-project/cockpit-machines)
* Ubuntu image in VirtualBox and linux virt-manager / [cockpit-machines](https://github.com/cockpit-project/cockpit-machines) * Ubuntu image in VirtualBox and linux virt-manager / [cockpit-machines](https://github.com/cockpit-project/cockpit-machines)
* Debian image in VirtualBox https://github.com/rootzoll/raspiblitz/issues/2756#issuecomment-983532237 * Debian image in VirtualBox https://github.com/rootzoll/raspiblitz/issues/2756#issuecomment-983532237
* TrueNAS (FreeBSD bhyve) with an Ubuntu VM: https://github.com/rootzoll/raspiblitz/issues/2104#issuecomment-917444238 * TrueNAS (FreeBSD bhyve) with an Ubuntu VM: https://github.com/rootzoll/raspiblitz/issues/2104#issuecomment-917444238
To just experiment can load a virtualbox image from: https://www.osboxes.org/ubuntu (does not need installation) ### Create the base image
Password: `osboxes.org` * Download and install the base OS on an at least 32GB drive
Can carry on straight to building the OS: * Debian is the most tested and is closest to the RaspberryOS: <https://www.debian.org/distrib/>
* Ubuntu should work, but less tested
* To just experiment can load a virtualbox image from: <https://www.osboxes.org/debian/> or <https://www.osboxes.org/ubuntu>.
These not need installation, password: `osboxes.org`
### Building the Raspiblitz scripts
* Run the build script in the terminal of the guest OS (with sudo access):
``` ```
# download the build script # download the build script
wget https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/build_sdcard.sh wget https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/build_sdcard.sh
# run # run
sudo bash build_sdcard.sh -f true -b dev -d headless -t false -w off sudo bash build_sdcard.sh -f true -b dev -d headless -t false -w off
# Options: # Options:
# -h, --help this help info # -h, --help this help info
# -i, --interaction [0|1] interaction before proceeding with exection (default: 1) # -i, --interaction [0|1] interaction before proceeding with exection (default: 1)
@@ -44,12 +53,29 @@ sudo bash build_sdcard.sh -f true -b dev -d headless -t false -w off
# -w, --wifi-region [off|US|GB|other] wifi iso code (default: US) or 'off' # -w, --wifi-region [off|US|GB|other] wifi iso code (default: US) or 'off'
``` ```
Switch off when ready * Switch off when ready
and attach an other disk (can be even small if you prune or [stop bitcoind](https://github.com/rootzoll/raspiblitz/issues/1500#issuecomment-982779830) ). * Attach an other disk (can be even small if you prune or [stop bitcoind](https://github.com/rootzoll/raspiblitz/issues/1500#issuecomment-982779830) manually.
The second virtual disk will be used as the BLOCKCHAIN drive. The second virtual disk will be used as the BLOCKCHAIN drive.
This makes that data portable and independent from the OS similar to the combination of the SDcard and separate SSD. This makes that data portable and independent from the OS similar to the combination of the SDcard and separate SSD.
### Notes:
#### Data drive:
* create a raw image of 500+ GB for best compatibility
* if there are permission issues try to symlink the disk image to `/var/lib/libvirt/images`
#### Mount a raw disk image on the host system to copy blockchain
* this is not necessary, but faster than to copy over the network
* from <https://support.hpe.com/hpesc/public/docDisplay?docId=emr_na-c02814204>
```
losetup /dev/loop0 VirtualMachineImage.raw
sudo apt install kpartx -y
kpartx -a /dev/loop0
sudo mkdir /mnt/rawdisk
mount /dev/mapper/loop0p1 /mnt/rawdisk
```
* the guest data-drive will be available in `/mnt/rawdisk`
--- ---
## Armbian ## Armbian
Many SBC-s are supported: Many SBC-s are supported: