-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-test.sh
More file actions
executable file
·62 lines (52 loc) · 1.89 KB
/
Copy pathrun-test.sh
File metadata and controls
executable file
·62 lines (52 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!bash
set -e
echo "Prerequisites: you first have to create the tap device, like this :"
echo "sudo ip tuntap add tapfc1 mode tap"
echo "Elsewhere run :"
echo "rm /tmp/firecracker.socket && firecracker"
echo ""
echo Running ArnOs on Firecracker...
curl --unix-socket /tmp/firecracker.socket -i \
-X PUT 'http://localhost/boot-source' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"kernel_image_path": "/home/arnaud/repos/third/firecracker/hello-vmlinux.bin",
"boot_args": "console=ttyS0 reboot=k panic=1 pci=off"
}'
curl --unix-socket /tmp/firecracker.socket -i \
-X PUT 'http://localhost/drives/rootfs' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"drive_id": "rootfs",
"path_on_host": "/home/arnaud/repos/third/firecracker/hello-rootfs.ext4",
"is_root_device": true,
"is_read_only": false
}'
curl --unix-socket /tmp/firecracker.socket -i \
-X PUT 'http://localhost/logger' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"log_fifo": "/dev/stdout",
"metrics_fifo": "/dev/null"
}'
curl --unix-socket /tmp/firecracker.socket -i \
-X PUT 'http://localhost/network-interfaces/iface_1' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"iface_id": "iface_1",
"host_dev_name": "tapfc1",
"guest_mac": "06:00:c0:a8:34:02"
}'
curl --unix-socket /tmp/firecracker.socket -i -X GET 'http://localhost/machine-config'
curl --unix-socket /tmp/firecracker.socket -i \
-X PUT 'http://localhost/actions' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"action_type": "InstanceStart"
}'
echo all commands sent