2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2025-06-23 13:52:26 +00:00

add grub-efi support

* tests: increase timeout
* ci: split e2e tests

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
2023-09-12 13:59:11 +02:00
parent d4c3476031
commit a41bbdb745
29 changed files with 524 additions and 162 deletions

View File

@ -44,6 +44,7 @@ type config struct {
arch string
cpus uint
memory uint
bios string
accel string
detached bool
qemuBinPath string
@ -92,6 +93,12 @@ func WithMemory(memory uint) Option {
}
}
func WithBios(bios string) Option {
return func(c *config) {
c.bios = bios
}
}
func WithAccel(accel string) Option {
return func(c *config) {
c.accel = accel

View File

@ -197,6 +197,10 @@ func (c *config) buildQemuCmdline() ([]string, error) {
qemuArgs = append(qemuArgs, "-m", fmt.Sprintf("%d", c.memory))
qemuArgs = append(qemuArgs, "-uuid", c.uuid.String())
if c.bios != "" {
qemuArgs = append(qemuArgs, "-bios", c.bios)
}
// Need to specify the vcpu type when running qemu on arm64 platform, for security reason,
// the vcpu should be "host" instead of other names such as "cortex-a53"...
if c.arch == "aarch64" {