forked from andonome/lk
edit metadata
This commit is contained in:
@@ -2,21 +2,21 @@
|
||||
title: "Docker"
|
||||
tags: [ "documentation", "Virtualization" ]
|
||||
---
|
||||
```bash
|
||||
```sh
|
||||
sudo pacman -S docker
|
||||
```
|
||||
|
||||
```bash
|
||||
```sh
|
||||
sudo usermod -aG docker $USER
|
||||
```
|
||||
|
||||
```bash
|
||||
```sh
|
||||
sudo systemctl start docker
|
||||
```
|
||||
|
||||
You need to either log out and back in again to be in the docker group, or run everything as root.
|
||||
|
||||
```bash
|
||||
```sh
|
||||
# docker info
|
||||
```
|
||||
|
||||
@@ -24,19 +24,19 @@ This should show you things are working.
|
||||
|
||||
Search for a distro you want
|
||||
|
||||
```bash
|
||||
```sh
|
||||
docker search debian
|
||||
```
|
||||
|
||||
If you get a hit, pull it.
|
||||
|
||||
```bash
|
||||
```sh
|
||||
docker pull debian
|
||||
```
|
||||
|
||||
Then run a live image:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
docker run -it debian
|
||||
```
|
||||
|
||||
@@ -44,13 +44,13 @@ docker run -it debian
|
||||
|
||||
Check currently running containers with
|
||||
|
||||
```bash
|
||||
```sh
|
||||
docker ps
|
||||
```
|
||||
|
||||
Check all containers with
|
||||
|
||||
```bash
|
||||
```sh
|
||||
docker ps -a
|
||||
```
|
||||
|
||||
@@ -58,7 +58,7 @@ Now we can get a list of all containers.
|
||||
|
||||
To delete one, take the id, e.g. '97796727e883', and run:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
docker rm 97796727e883
|
||||
```
|
||||
|
||||
@@ -66,7 +66,7 @@ docker rm 97796727e883
|
||||
|
||||
Get a list of docker container ips
|
||||
|
||||
```bash
|
||||
```sh
|
||||
docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' *container_name_or_id*
|
||||
```
|
||||
|
||||
|
@@ -6,27 +6,27 @@ tags: [ "System" ]
|
||||
|
||||
## Arch Linux
|
||||
|
||||
```bash
|
||||
```sh
|
||||
sudo pacman -S virtualbox-host-modules-arch virtualbox-guest-iso
|
||||
```
|
||||
|
||||
```bash
|
||||
```sh
|
||||
sudo modprobe vboxdrv
|
||||
```
|
||||
|
||||
```bash
|
||||
```sh
|
||||
# vboxreload
|
||||
```
|
||||
|
||||
Make dd image into vdi
|
||||
|
||||
```bash
|
||||
```sh
|
||||
VBoxManage convertdd base.dd output.vdi --format VDI
|
||||
```
|
||||
|
||||
If this doesn't work, try to make a new bite size with just
|
||||
|
||||
```bash
|
||||
```sh
|
||||
sudo dd if=image.dd of=image2.dd bs=512 conv=sync
|
||||
```
|
||||
|
||||
@@ -34,19 +34,19 @@ sudo dd if=image.dd of=image2.dd bs=512 conv=sync
|
||||
|
||||
List boxes:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
VBoxManage list vms
|
||||
```
|
||||
|
||||
Start a headless instance
|
||||
|
||||
```bash
|
||||
```sh
|
||||
VBoxManage startvm "rata" --type headless
|
||||
```
|
||||
|
||||
To pause the machine:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
VBoxManage controlvm "rata" pause --type headless
|
||||
```
|
||||
|
||||
@@ -64,15 +64,15 @@ You can do a number of things to virtualboxes this way:
|
||||
|
||||
Creating a VM requires registering it:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
VBoxManage createvm --name Ubuntu19.04 --register --ostype Ubuntu
|
||||
```
|
||||
|
||||
```bash
|
||||
```sh
|
||||
VBoxManage modifyvm Ubuntu19.04 --memory 1042
|
||||
```
|
||||
|
||||
```bash
|
||||
```sh
|
||||
VBoxManage storagectl Ubuntu19.04 -name IDE --add ide --controller PIIX4 --bootable on
|
||||
```
|
||||
|
||||
|
@@ -5,15 +5,15 @@ tags: [ "xe", "virtualization", "volume" ]
|
||||
# Make a local iso repository
|
||||
|
||||
|
||||
```bash
|
||||
```sh
|
||||
STORE_PATH=/var/opt/xen/ISO_Store
|
||||
```
|
||||
|
||||
```bash
|
||||
```sh
|
||||
mkdir -p $STORE_PATH
|
||||
```
|
||||
|
||||
```bash
|
||||
```sh
|
||||
xe sr-create name-label="$STORAGE_NAME" type=iso device-config:location=$STORE_PATH device-config:legacy_mode=true content-type=iso
|
||||
```
|
||||
|
||||
@@ -23,7 +23,7 @@ This creates a UUID for the new directory:
|
||||
|
||||
# Main Console
|
||||
|
||||
```bash
|
||||
```sh
|
||||
xsconsole
|
||||
```
|
||||
|
||||
@@ -31,13 +31,13 @@ xsconsole
|
||||
|
||||
List volumes:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
lvs
|
||||
```
|
||||
|
||||
List groups:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
vgs
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user