Skip to content

Commit 38848ee

Browse files
committed
attempt to virt-install
1 parent 40b02f6 commit 38848ee

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@
1212
/config.local.yml
1313
/oom
1414
/config.production.yml
15+
/vm/*.qcow2

vm/build.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
set -xEeuo pipefail
2+
3+
rm -rf combustion
4+
mkdir combustion
5+
cat > combustion/script <<'EOF'
6+
#!/bin/sh
7+
echo "root:root" | chpasswd
8+
mkdir -p /root/.ssh
9+
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyxZ7UNHtckkGX/Za849siHAagQ1U2MnYI11DtZWSTm4XZHARyKrit/1VidZ8MVNIwiZv9g6aZNVbGRohBv6SCAc8PWEYy/zWFPcCyw08NmUn5vJvboCUzpYiMLJuOUGuWohNpRFcConXr0OU/cSg5W5WIB9wxdpXncqrI1MayEjW1WfCGlt4uNM353BTHJ2jSDZiWzysWnXnzDaeeuuAcQM3sQpTKXy97ldptlyXcR8Jsb4oRnENCbuo/RLuAxRtFoA6FP2EUaU6h7r8I0M33REE+8PjsW8EDxI5QYyUUe2pfzSk5xnL5k4h6cX+hmQ271ccmYtkN+4AkHJhpSOiv oleg@home
10+
" > /root/.ssh/authorized_keys
11+
chmod 600 /root/.ssh/authorized_keys
12+
EOF
13+
14+
truncate -s 10M combustion.img
15+
/sbin/mkfs.vfat -n combustion combustion.img
16+
mcopy -oi combustion.img -s combustion/* ::
17+
18+
virt-install \
19+
--name leap-micro-6.1 \
20+
--memory 2048 --vcpus 2 \
21+
--disk path=openSUSE-Leap-Micro.x86_64-Default-qcow.qcow2,format=qcow2,bus=virtio \
22+
--disk path=./combustion.img,device=disk,bus=virtio \
23+
--os-variant opensuse15.4 \
24+
--import --graphics none --noautoconsole

vm/combustion.img

10 MB
Binary file not shown.

vm/combustion/script

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
echo "root:root" | chpasswd
3+
mkdir -p /root/.ssh
4+
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyxZ7UNHtckkGX/Za849siHAagQ1U2MnYI11DtZWSTm4XZHARyKrit/1VidZ8MVNIwiZv9g6aZNVbGRohBv6SCAc8PWEYy/zWFPcCyw08NmUn5vJvboCUzpYiMLJuOUGuWohNpRFcConXr0OU/cSg5W5WIB9wxdpXncqrI1MayEjW1WfCGlt4uNM353BTHJ2jSDZiWzysWnXnzDaeeuuAcQM3sQpTKXy97ldptlyXcR8Jsb4oRnENCbuo/RLuAxRtFoA6FP2EUaU6h7r8I0M33REE+8PjsW8EDxI5QYyUUe2pfzSk5xnL5k4h6cX+hmQ271ccmYtkN+4AkHJhpSOiv oleg@home
5+
" > /root/.ssh/authorized_keys
6+
chmod 600 /root/.ssh/authorized_keys

0 commit comments

Comments
 (0)