Skip to content

Instantly share code, notes, and snippets.

@rchatsiri
Created May 14, 2019 11:47
Show Gist options
  • Save rchatsiri/8ef112a819ce57e17b2d2932ba8b53e5 to your computer and use it in GitHub Desktop.
Save rchatsiri/8ef112a819ce57e17b2d2932ba8b53e5 to your computer and use it in GitHub Desktop.
Firecracker server
devops00@firework-vm01:~/workspacesdn/firecracker/build/debug$ sudo 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": "./hello-vmlinux.bin",
> "boot_args": "console=ttyS0 reboot=k panic=1 pci=off"
> }'
HTTP/1.1 204 No Content
Date: Tue, 14 May 2019 10:11:08 GMT
devops00@firework-vm01:~/workspacesdn/firecracker/build/debug$ sudo 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": "./hello-rootfs.ext4",
> "is_root_device": true,
> "is_read_only": false
> }'
HTTP/1.1 204 No Content
Date: Tue, 14 May 2019 10:11:21 GMT
devops00@firework-vm01:~/workspacesdn/firecracker/build/debug$ sudo 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"
> }'
HTTP/1.1 204 No Content
Date: Tue, 14 May 2019 10:11:25 GMT
devops00@firework-vm01:~/workspacesdn/firecracker/build/debug$ sudo ./firecracker --api-sock /tmp/firecracker.socket
[ 0.000000] Linux version 4.14.55-84.37.amzn2.x86_64 (mockbuild@ip-10-0-1-79) (gcc version 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC)) #1 SMP Wed Jul 25 18:47:15 UTC 2018
[ 0.000000] Command line: console=ttyS0 reboot=k panic=1 pci=off root=/dev/vda virtio_mmio.device=4K@0xd0000000:5
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000007ffffff] usable
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] DMI not present or invalid.
[ 0.000000] Hypervisor detected: KVM
[ 0.000000] tsc: Fast TSC calibration failed
[ 0.000000] tsc: Unable to calibrate against PIT
[ 0.000000] tsc: No reference (HPET/PMTIMER) available
[ 0.000000] e820: last_pfn = 0x8000 max_arch_pfn = 0x400000000
[ 0.000000] MTRR: Disabled
[ 0.000000] x86/PAT: MTRRs disabled, skipping PAT initialization too.
[ 0.000000] CPU MTRRs all blank - virtualized system.
[ 0.000000] x86/PAT: Configuration [0-7]: WB WT UC- UC WB WT UC- UC
[ 0.000000] found SMP MP-table at [mem 0x0009fc00-0x0009fc0f] mapped at [ffffffffff200c00]
[ 0.000000] Scanning 1 areas for low memory corruption
[ 0.000000] No NUMA configuration found
[ 0.000000] Faking a node at [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] NODE_DATA(0) allocated [mem 0x07fde000-0x07ffffff]
[ 0.000000] kvm-clock: Using msrs 4b564d01 and 4b564d00
[ 0.000000] kvm-clock: cpu 0, msr 0:7fdc001, primary cpu clock
[ 0.000000] kvm-clock: using sched offset of 23592413754 cycles
[ 0.000000] clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff]
[ 0.000000] DMA32 [mem 0x0000000001000000-0x0000000007ffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009efff]
[ 0.000000] node 0: [mem 0x0000000000100000-0x0000000007ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x0000000007ffffff]
[ 0.000000] Intel MultiProcessor Specification v1.4
[ 0.000000] MPTABLE: OEM ID: FC
[ 0.000000] MPTABLE: Product ID: 000000000000
[ 0.000000] MPTABLE: APIC at: 0xFEE00000
[ 0.000000] Processor #0 (Bootup-CPU)
[ 0.000000] IOAPIC[0]: apic_id 2, version 17, address 0xfec00000, GSI 0-23
[ 0.000000] Processors: 1
[ 0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[ 0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[ 0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x000fffff]
[ 0.000000] e820: [mem 0x08000000-0xffffffff] available for PCI devices
[ 0.000000] Booting paravirtualized kernel on KVM
[ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
[ 0.000000] random: get_random_bytes called from start_kernel+0x94/0x486 with crng_init=0
[ 0.000000] setup_percpu: NR_CPUS:128 nr_cpumask_bits:128 nr_cpu_ids:1 nr_node_ids:1
[ 0.000000] percpu: Embedded 41 pages/cpu @ffff880007c00000 s128728 r8192 d31016 u2097152
[ 0.000000] KVM setup async PF for cpu 0
[ 0.000000] kvm-stealtime: cpu 0, msr 7c15040
[ 0.000000] PV qspinlock hash table entries: 256 (order: 0, 4096 bytes)
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32137
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: console=ttyS0 reboot=k panic=1 pci=off root=/dev/vda virtio_mmio.device=4K@0xd0000000:5
[ 0.000000] PID hash table entries: 512 (order: 0, 4096 bytes)
[ 0.000000] Memory: 111064K/130680K available (8204K kernel code, 622K rwdata, 1464K rodata, 1268K init, 2820K bss, 19616K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Kernel/User page tables isolation: enabled
[ 0.004000] Hierarchical RCU implementation.
[ 0.004000] RCU restricting CPUs from NR_CPUS=128 to nr_cpu_ids=1.
[ 0.004000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.004000] NR_IRQS: 4352, nr_irqs: 48, preallocated irqs: 16
[ 0.004000] Console: colour dummy device 80x25
[ 0.004000] console [ttyS0] enabled
[ 0.004000] tsc: Detected 1900.000 MHz processor
[ 0.004148] Calibrating delay loop (skipped) preset value.. 3800.00 BogoMIPS (lpj=7600000)
[ 0.008024] pid_max: default: 32768 minimum: 301
[ 0.016207] Security Framework initialized
[ 0.020050] SELinux: Initializing.
[ 0.025202] Dentry cache hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.032400] Inode-cache hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.040087] Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
[ 0.048025] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes)
[ 0.063211] Last level iTLB entries: 4KB 512, 2MB 8, 4MB 8
[ 0.064023] Last level dTLB entries: 4KB 512, 2MB 32, 4MB 32, 1GB 0
[ 0.072039] Spectre V2 : Mitigation: Full generic retpoline
[ 0.076023] Spectre V2 : Spectre v2 mitigation: Enabling Indirect Branch Prediction Barrier
[ 0.080023] Spectre V2 : Enabling Restricted Speculation for firmware calls
[ 0.088022] Speculative Store Bypass: Vulnerable
[ 0.130318] Freeing SMP alternatives memory: 28K
[ 0.140303] smpboot: Max logical packages: 1
[ 0.147027] x2apic enabled
[ 0.148023] Switched APIC routing to physical x2apic.
[ 0.168000] ..TIMER: vector=0x30 apic1=0 pin1=0 apic2=-1 pin2=-1
[ 0.168000] smpboot: CPU0: Intel(R) Xeon(R) Processor @ 1.90GHz (family: 0x6, model: 0x2d, stepping: 0x7)
[ 0.168388] Performance Events: unsupported p6 CPU model 45 no PMU driver, software events only.
[ 0.172394] Hierarchical SRCU implementation.
[ 0.177863] smp: Bringing up secondary CPUs ...
[ 0.180026] smp: Brought up 1 node, 1 CPU
[ 0.184025] smpboot: Total of 1 processors activated (3800.00 BogoMIPS)
[ 0.190402] devtmpfs: initialized
[ 0.192209] x86/mm: Memory block size: 128MB
[ 0.196705] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.200033] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.205772] NET: Registered protocol family 16
[ 0.208652] cpuidle: using governor ladder
[ 0.212027] cpuidle: using governor menu
[ 0.234441] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.236509] dmi: Firmware registration failed.
[ 0.240401] NetLabel: Initializing
[ 0.244028] NetLabel: domain hash size = 128
[ 0.248030] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO
[ 0.252215] NetLabel: unlabeled traffic allowed by default
[ 0.256818] clocksource: Switched to clocksource kvm-clock
[ 0.263213] VFS: Disk quotas dquot_6.6.0
[ 0.267935] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.282413] NET: Registered protocol family 2
[ 0.287743] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.295527] TCP bind hash table entries: 1024 (order: 2, 16384 bytes)
[ 0.302877] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.310155] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.316964] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.324061] NET: Registered protocol family 1
[ 0.329761] virtio-mmio: Registering device virtio-mmio.0 at 0xd0000000-0xd0000fff, IRQ 5.
[ 0.340437] platform rtc_cmos: registered platform RTC device (no PNP device found)
[ 0.350159] Scanning for low memory corruption every 60 seconds
[ 0.357921] audit: initializing netlink subsys (disabled)
[ 0.365497] Initialise system trusted keyrings
[ 0.370921] Key type blacklist registered
[ 0.376223] audit: type=2000 audit(1557828686.571:1): state=initialized audit_enabled=0 res=1
[ 0.385809] workingset: timestamp_bits=36 max_order=15 bucket_order=0
[ 0.395860] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.411657] Key type asymmetric registered
[ 0.416179] Asymmetric key parser 'x509' registered
[ 0.421628] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[ 0.429617] io scheduler noop registered (default)
[ 0.435236] io scheduler cfq registered
[ 0.440456] virtio-mmio virtio-mmio.0: Failed to enable 64-bit or 32-bit DMA. Trying to continue, but this might not work.
[ 0.453653] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[ 0.499229] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a U6_16550A
[ 0.514500] loop: module loaded
[ 0.521092] tun: Universal TUN/TAP device driver, 1.6
[ 0.527191] hidraw: raw HID events driver (C) Jiri Kosina
[ 0.533711] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[ 0.541262] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 0.547946] Initializing XFRM netlink socket
[ 0.553491] NET: Registered protocol family 10
[ 0.559977] Segment Routing with IPv6
[ 0.564586] NET: Registered protocol family 17
[ 0.570140] Bridge firewalling registered
[ 0.575064] sched_clock: Marking stable (574955920, 0)->(1518384027, -943428107)
[ 0.584165] registered taskstats version 1
[ 0.588815] Loading compiled-in X.509 certificates
[ 0.595634] Loaded X.509 cert 'Build time autogenerated kernel key: 3472798b31ba23b86c1c5c7236c9c91723ae5ee9'
[ 0.606656] zswap: default zpool zbud not available
[ 0.612109] zswap: pool creation failed
[ 0.616809] Key type encrypted registered
[ 0.626515] EXT4-fs (vda): mounted filesystem with ordered data mode. Opts: (null)
[ 0.634888] VFS: Mounted root (ext4 filesystem) on device 254:0.
[ 0.642824] devtmpfs: mounted
[ 0.650069] Freeing unused kernel memory: 1268K
[ 0.660147] Write protecting the kernel read-only data: 12288k
[ 0.678103] Freeing unused kernel memory: 2016K
[ 0.688808] Freeing unused kernel memory: 584K
OpenRC init version 0.35.5.87b1ff59c1 starting
Starting sysinit runlevel
OpenRC 0.35.5.87b1ff59c1 is starting up Linux 4.14.55-84.37.amzn2.x86_64 (x86_64)
* Mounting /proc ...
[ ok ]
* Mounting /run ...
* /run/openrc: creating directory
* /run/lock: creating directory
* /run/lock: correcting owner
* Caching service dependencies ...
Service `hwdrivers' needs non existent service `dev'
[ ok ]
Starting boot runlevel
* Remounting devtmpfs on /dev ...
[ ok ]
[ 0.973444] random: fast init done
* Mounting /dev/mqueue ...
[ ok ]
* Mounting /dev/pts ...
[ ok ]
* Mounting /dev/shm ...
[ ok ]
* Setting hostname ...
[ ok ]
* Checking local filesystems ...
[ ok ]
* Remounting filesystems ...
[ ok ]
* Mounting local filesystems ...
[ ok ]
* Loading modules ...
modprobe: can't change directory to '/lib/modules': No such file or directory
modprobe: can't change directory to '/lib/modules': No such file or directory
[ ok ]
* Mounting misc binary format filesystem ...
[ ok ]
* Mounting /sys ...
[ ok ]
* Mounting security filesystem ...
[ ok ]
* Mounting debug filesystem ...
[ ok ]
* Mounting SELinux filesystem ...
[ ok ]
* Mounting persistent storage (pstore) filesystem ...
[ ok ]
Starting default runlevel
[ 1.376169] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x36c657b5833, max_idle_ns: 881590513399 ns
Welcome to Alpine Linux 3.8
Kernel 4.14.55-84.37.amzn2.x86_64 on an x86_64 (ttyS0)
localhost login: 2019-05-14T03:12:25.960093189 [anonymous-instance:ERROR:vmm/src/lib.rs:1499] Failed to log metrics: Logger was not initialized.
2019-05-14T03:13:25.960069372 [anonymous-instance:ERROR:vmm/src/lib.rs:1499] Failed to log metrics: Logger was not initialized.
2019-05-14T03:14:25.960121553 [anonymous-instance:ERROR:vmm/src/lib.rs:1499] Failed to log metrics: Logger was not initialized.
2019-05-14T03:15:25.960164557 [anonymous-instance:ERROR:vmm/src/lib.rs:1499] Failed to log metrics: Logger was not initialized.
2019-05-14T03:16:25.960073283 [anonymous-instance:ERROR:vmm/src/lib.rs:1499] Failed to log metrics: Logger was not initialized.
2019-05-14T03:17:25.960076765 [anonymous-instance:ERROR:vmm/src/lib.rs:1499] Failed to log metrics: Logger was not initialized.
Welcome to Alpine Linux 3.8
Kernel 4.14.55-84.37.amzn2.x86_64 on an x86_64 (ttyS0)
localhost login: 2019-05-14T03:18:25.960147959 [anonymous-instance:ERROR:vmm/src/lib.rs:1499] Failed to log metrics: Logger was not initialized.
2019-05-14T03:19:25.960199043 [anonymous-instance:ERROR:vmm/src/lib.rs:1499] Failed to log metrics: Logger was not initialized.
2019-05-14T03:20:25.960086383 [anonymous-instance:ERROR:vmm/src/lib.rs:1499] Failed to log metrics: Logger was not initialized.
2019-05-14T03:21:25.960103775 [anonymous-instance:ERROR:vmm/src/lib.rs:1499] Failed to log metrics: Logger was not initialized.
2019-05-14T03:22:25.960072268 [anonymous-instance:ERROR:vmm/src/lib.rs:1499] Failed to log metrics: Logger was not initialized.
2019-05-14T03:23:25.960139577 [anonymous-instance:ERROR:vmm/src/lib.rs:1499] Failed to log metrics: Logger was not initialized.
2019-05-14T03:24:25.960118402 [anonymous-instance:ERROR:vmm/src/lib.rs:1499] Failed to log metrics: Logger was not initialized.
2019-05-14T03:25:25.960239176 [anonymous-instance:ERROR:vmm/src/lib.rs:1499] Failed to log metrics: Logger was not initialized.
Welcome to Alpine Linux 3.8
Kernel 4.14.55-84.37.amzn2.x86_64 on an x86_64 (ttyS0)
localhost login:
Welcome to Alpine Linux 3.8
Kernel 4.14.55-84.37.amzn2.x86_64 on an x86_64 (ttyS0)
localhost login: root
Password:
Welcome to Alpine!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment