Skip to content

Commit 2ba5eb1

Browse files
[mq] working branch - merge 5aedb8b on top of main at d6e5c40
{"baseBranch":"main","baseCommit":"d6e5c406649683cba01ce44879f5f5194d3c3f83","createdAt":"2025-10-28T14:59:01.743779Z","headSha":"5aedb8b38bcf23b72adedc6bbfb085fc6ccf9780","id":"899511be-c4f1-42ee-af4d-3dc57e234d57","priority":"200","pullRequestNumber":"1757","queuedAt":"2025-10-28T14:59:01.742911Z","status":"STATUS_QUEUED"}
2 parents 858d3ef + 5aedb8b commit 2ba5eb1

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

scenarios/aws/microVMs/microvms/domain.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ func newDomainConfiguration(e config.Env, set *vmconfig.VMSet, vcpu, memory, gdb
142142
efi := filepath.Join(GetWorkingDirectory(set.Arch), "efi.fd")
143143

144144
// OS-dependent settings
145-
var hypervisor string
146145
var commandLine pulumi.StringInput = pulumi.String("")
147146
var hostOS string
148147
if set.Arch == LocalVMSet {
@@ -159,10 +158,8 @@ func newDomainConfiguration(e config.Env, set *vmconfig.VMSet, vcpu, memory, gdb
159158

160159
var driver string
161160
if hostOS == "linux" {
162-
hypervisor = "kvm"
163161
driver = "<driver name=\"qemu\" type=\"qcow2\" io=\"io_uring\"/>"
164162
} else if hostOS == "darwin" {
165-
hypervisor = "hvf"
166163
// We have to use QEMU network devices because libvirt does not support the macOS
167164
// network devices.
168165
netID := libvirtResourceName(domainName, "netdev")
@@ -192,7 +189,7 @@ func newDomainConfiguration(e config.Env, set *vmconfig.VMSet, vcpu, memory, gdb
192189
resources.Efi: pulumi.String(efi),
193190
resources.VCPU: pulumi.Sprintf("%d", vcpu),
194191
resources.CPUTune: pulumi.String(cputune),
195-
resources.Hypervisor: pulumi.String(hypervisor),
192+
resources.Hypervisor: pulumi.String(set.Hypervisor()),
196193
resources.CommandLine: commandLine,
197194
resources.DiskDriver: pulumi.String(driver),
198195
},

scenarios/aws/microVMs/microvms/libvirt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func (vm *VMCollection) SetupCollectionDomainConfigurations(depends []pulumi.Res
158158
}
159159

160160
// Setup individual Nvram disk for arm64 distro images
161-
if resources.GetLocalArchRecipe(set.Recipe) == vmconfig.RecipeDistroARM64 {
161+
if set.Hypervisor() != "hvf" && resources.GetLocalArchRecipe(set.Recipe) == vmconfig.RecipeDistroARM64 {
162162
for _, domain := range domains {
163163
varstorePath := filepath.Join(GetWorkingDirectory(domain.vmset.Arch), fmt.Sprintf("varstore.%s", domain.DomainName))
164164
varstoreArgs := command.Args{

scenarios/aws/microVMs/vmconfig/config.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package vmconfig
22

3+
import "runtime"
4+
35
type PoolType string
46

57
type VMSetID string
@@ -57,6 +59,13 @@ type VMSet struct {
5759
VMHost Host `json:"host,omitempty"`
5860
}
5961

62+
func (set VMSet) Hypervisor() string {
63+
if set.Arch == "local" && runtime.GOOS == "darwin" {
64+
return "hvf"
65+
}
66+
return "kvm"
67+
}
68+
6069
type Config struct {
6170
Workdir string `json:"workdir"`
6271
VMSets []VMSet `json:"vmsets"`

0 commit comments

Comments
 (0)