Commit 892b6b01 authored by Heinz N. Gies's avatar Heinz N. Gies

Some cleanup

parent 9b909937
Pipeline #12320806 passed with stage
in 3 minutes and 59 seconds
......@@ -79,7 +79,7 @@ Some of the steps above require a reboot, there is however no reason not just do
## installation
1. Install rust (https://rustup.rs/) and cargo: `pkg install rust cargo pkgconf openssl`
1. Install rust (https://rustup.rs/) and cargo: `pkg install rust cargo pkgconf openssl`
2. Clone this repository using Git or download it as a Zip archive
3. Build the vmadm binary: `cargo build --release`
4. Copy the executable: `cp target/release/vmadm /usr/local/sbin`
......@@ -89,6 +89,7 @@ Some of the steps above require a reboot, there is however no reason not just do
8. Import a dataset using `vmadm images avail` and `vmadm images import`.
9. Create a jail: `cat example.json | vmadm create`
Note if you plan to run linux jails you need to load the linux kernel module: `kldload linux fdescfs linprocfs linsysfs tmpfs`
The devfs ruleset to used can be adjusted in the `/usr/local/etc/vmadm.toml` by adding `devfs_ruleset = <rule number>`.
......@@ -135,3 +136,12 @@ SUBCOMMANDS:
```
Travis CI scripts form: https://github.com/japaric/trust
## tricks
Make it feel more SmartOS'ish:
```
alias zlogin vmadm console
alias imgadm vmadm images
```
\ No newline at end of file
......@@ -10,9 +10,11 @@ URL_ARCH=${ARCH};
case "${ARCH}" in
amd64)
ARCH=x86_64;
ARCH_URL=x86;
;;
arm64)
URL_ARCH=arm64/aarch64
echo only x86 is supported
exit 1
;;
esac
......@@ -35,7 +37,7 @@ fi
if [ -z "$2" ]
then
VSN=`uname -r`
VSN=6
else
VSN=$2
fi
......@@ -69,20 +71,12 @@ do
cp /$f /${ROOT}/$ID/root/$f
done
# Write some basic CentOS configuration files:
cp /etc/resolv.conf /${ROOT}/$ID/root/etc/resolv.conf
echo "linproc /jails/centos/proc linprocfs rw 0 0" >> /${ROOT}/$ID/fstab_centos6
>&2 echo "Prepping solitary confinement"
mkdir -p /${ROOT}/${ID}/root/jail
TARGET=/tmp/centos-${ARCH}-${VSN}.tgz
if [ ! -f ${TARGET} ]
then
fetch https://download.openvz.org/template/precreated/centos-6-x86.tar.gz -o ${TARGET}
fetch https://download.openvz.org/template/precreated/centos-${VNS}-${ARCH_URL}.tar.gz -o ${TARGET}
else
echo "Image seems to already exist, not re-downloading, delete ${TARGET} to force re-download"
fi
......@@ -100,7 +94,7 @@ cat <<EOF > $ID.json
{
"v": 2,
"uuid": "${ID}",
"name": "FreeBSD",
"name": "CentOS",
"version": "${VSN}",
"type": "lx-jail-dataset",
"os": "Linux",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment