Hi there!
Just wanted you to know that you are a bunch of warriors to create such a revolutionary OS.
I battled the whole weekend to get it working, but I managed to build a working qemu image in a matter of seconds now, without even using the iso.
It’s also very simpler to apply a cloud-config and copy files in the OS in a declarative way.
I’d like to know what you guys think of this approach (it looks a bit like ./scripts/run from rancher/os ).
Here is the script:
#!bin/sh
set -x -e
function clean_up {
sudo umount mount || true
sudo kpartx -d rancheros.img || true
sudo losetup -d /dev/loop0 || true
}
trap "clean_up; exit" SIGHUP SIGINT SIGTERM
clean_up
qemu-img create rancheros.img 1G
sudo losetup /dev/loop0 rancheros.img
echo "n
p
1
w" | sudo fdisk /dev/loop0 || true
sudo kpartx -a rancheros.img
docker run --privileged -it \
-v /dev/mapper:/dev/mapper \
-v $(pwd):/cluster \
rancher/os:v0.4.2-rc2 \
-c /cluster/cloud-config.yml \
-t generic \
-d /cluster/rancheros.img \
-p /dev/mapper/loop1p1 \
#-f /cluster/images.tar.xz:var/lib/system-docker/preload/images.tar.xz
sync
qemu-system-x86_64 -enable-kvm \
-m 1024 \
-net nic,model=virtio \
-net user,hostfwd=tcp::2222-:22 \
-drive if=virtio,file=rancheros.img,format=raw