File tree Expand file tree Collapse file tree 5 files changed +19
-5
lines changed Expand file tree Collapse file tree 5 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -12,4 +12,5 @@ go 1.11
12
12
require (
13
13
github.com/awslabs/tc-redirect-tap v0.0.0-20220715050423-f2af44521093 // indirect
14
14
github.com/containernetworking/plugins v1.1.1 // indirect
15
+ github.com/kunalkushwaha/ltag v0.2.3 // indirect
15
16
)
Original file line number Diff line number Diff line change @@ -393,6 +393,8 @@ github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn
393
393
github.com/kr/pty v1.1.1 /go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ =
394
394
github.com/kr/pty v1.1.5 /go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA =
395
395
github.com/kr/text v0.1.0 /go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI =
396
+ github.com/kunalkushwaha/ltag v0.2.3 h1:5rwJiC1oQ/OiamZ8JNCHQGUe7OkHTFrRtyNon3VYPok =
397
+ github.com/kunalkushwaha/ltag v0.2.3 /go.mod h1:w1hVMWOh870f+WAv/UIoZAy0bHCbPP4+W6JxNcPUiQA =
396
398
github.com/magiconair/properties v1.8.0 /go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ =
397
399
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 /go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc =
398
400
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e /go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc =
Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ DISABLE_ROOT_TESTS?=1
17
17
DOCKER_IMAGE_TAG? =latest
18
18
EXTRAGOARGS: =
19
19
FIRECRACKER_DIR =build/firecracker
20
- FIRECRACKER_TARGET? =x86_64-unknown-linux-musl
20
+ arch =$(shell uname -m)
21
+ FIRECRACKER_TARGET? =$(arch ) -unknown-linux-musl
21
22
22
23
FC_TEST_DATA_PATH? =testdata
23
24
FC_TEST_BIN_PATH: =$(FC_TEST_DATA_PATH ) /bin
@@ -28,7 +29,6 @@ UID = $(shell id -u)
28
29
GID = $(shell id -g)
29
30
30
31
firecracker_version =v1.0.0
31
- arch =$(shell uname -m)
32
32
33
33
# The below files are needed and can be downloaded from the internet
34
34
release_url =https://github.com/firecracker-microvm/firecracker/releases/download/$(firecracker_version ) /firecracker-$(firecracker_version ) -$(arch ) .tgz
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import (
24
24
"os/exec"
25
25
"os/signal"
26
26
"path/filepath"
27
+ "runtime"
27
28
"strconv"
28
29
"strings"
29
30
"sync"
@@ -65,6 +66,9 @@ type SeccompConfig struct {
65
66
// be started again.
66
67
var ErrAlreadyStarted = errors .New ("firecracker: machine already started" )
67
68
69
+ // ErrGraceShutdown signifies that the Machine will shutdown gracefully and SendCtrlAltDelete is unable to send
70
+ //var ErrGraceShutdown = errors.New("Shutdown gracefully: SendCtrlAltDelete is not supported if the arch is ARM64")
71
+
68
72
type MMDSVersion string
69
73
70
74
const (
@@ -456,7 +460,11 @@ func (m *Machine) Start(ctx context.Context) error {
456
460
// Shutdown requests a clean shutdown of the VM by sending CtrlAltDelete on the virtual keyboard
457
461
func (m * Machine ) Shutdown (ctx context.Context ) error {
458
462
m .logger .Debug ("Called machine.Shutdown()" )
459
- return m .sendCtrlAltDel (ctx )
463
+ if runtime .GOARCH != "arm64" {
464
+ return m .sendCtrlAltDel (ctx )
465
+ } else {
466
+ return m .StopVMM ()
467
+ }
460
468
}
461
469
462
470
// Wait will wait until the firecracker process has finished. Wait is safe to
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import (
20
20
"net"
21
21
"os"
22
22
"path/filepath"
23
+ "runtime"
23
24
"sync"
24
25
"testing"
25
26
"time"
@@ -253,7 +254,7 @@ func testNetworkMachineCNI(t *testing.T, useConfFile bool) {
253
254
}
254
255
fctesting .RequiresRoot (t )
255
256
256
- cniBinPath := []string {"/opt/cni/bin" , testDataBin }
257
+ cniBinPath := []string {testDataBin , "/opt/cni/bin" }
257
258
258
259
dir , err := ioutil .TempDir ("" , fsSafeTestName .Replace (t .Name ()))
259
260
require .NoError (t , err )
@@ -312,6 +313,9 @@ func testNetworkMachineCNI(t *testing.T, useConfFile bool) {
312
313
require .NoError (t , err , "cni conf should parse" )
313
314
}
314
315
316
+ if runtime .GOARCH == "arm64" {
317
+ return
318
+ }
315
319
numVMs := 10
316
320
vmIPs := make (chan string , numVMs )
317
321
@@ -405,7 +409,6 @@ func newCNIMachine(t *testing.T,
405
409
MachineCfg : models.MachineConfiguration {
406
410
VcpuCount : Int64 (2 ),
407
411
MemSizeMib : Int64 (256 ),
408
- Smt : Bool (true ),
409
412
},
410
413
Drives : []models.Drive {
411
414
{
You can’t perform that action at this time.
0 commit comments