跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

lima_yaml.go

444 行 · 19.7 KB历史下载
1// SPDX-FileCopyrightText: Copyright The Lima Authors
2// SPDX-License-Identifier: Apache-2.0
3
4package limatype
5
6import (
7 "net"
8 "runtime"
9
10 "github.com/lima-vm/go-qcow2reader/image"
11 "github.com/opencontainers/go-digest"
12 "github.com/sirupsen/logrus"
13 "golang.org/x/sys/cpu"
14)
15
16type LimaYAML struct {
17 Base BaseTemplates `yaml:"base,omitempty" json:"base,omitempty"`
18 MinimumLimaVersion *string `yaml:"minimumLimaVersion,omitempty" json:"minimumLimaVersion,omitempty" jsonschema:"nullable"`
19 VMType *VMType `yaml:"vmType,omitempty" json:"vmType,omitempty" jsonschema:"nullable"`
20 VMOpts VMOpts `yaml:"vmOpts,omitempty" json:"vmOpts,omitempty"`
21 OS *OS `yaml:"os,omitempty" json:"os,omitempty" jsonschema:"nullable"`
22 Arch *Arch `yaml:"arch,omitempty" json:"arch,omitempty" jsonschema:"nullable"`
23 Images []Image `yaml:"images,omitempty" json:"images,omitempty" jsonschema:"nullable"`
24 // Deprecated: Use vmOpts.qemu.cpuType instead.
25 CPUType CPUType `yaml:"cpuType,omitempty" json:"cpuType,omitempty" jsonschema:"nullable"`
26 CPUs *int `yaml:"cpus,omitempty" json:"cpus,omitempty" jsonschema:"nullable"`
27 Memory *string `yaml:"memory,omitempty" json:"memory,omitempty" jsonschema:"nullable"` // go-units.RAMInBytes
28 Disk *string `yaml:"disk,omitempty" json:"disk,omitempty" jsonschema:"nullable"` // go-units.RAMInBytes
29 AdditionalDisks []Disk `yaml:"additionalDisks,omitempty" json:"additionalDisks,omitempty" jsonschema:"nullable"`
30 Mounts []Mount `yaml:"mounts,omitempty" json:"mounts,omitempty"`
31 MountTypesUnsupported []string `yaml:"mountTypesUnsupported,omitempty" json:"mountTypesUnsupported,omitempty" jsonschema:"nullable"`
32 MountType *MountType `yaml:"mountType,omitempty" json:"mountType,omitempty" jsonschema:"nullable"`
33 MountInotify *bool `yaml:"mountInotify,omitempty" json:"mountInotify,omitempty" jsonschema:"nullable"`
34 SSH SSH `yaml:"ssh,omitempty" json:"ssh,omitempty"` // REQUIRED (FIXME)
35 Firmware Firmware `yaml:"firmware,omitempty" json:"firmware,omitempty"`
36 Audio Audio `yaml:"audio,omitempty" json:"audio,omitempty"`
37 Video Video `yaml:"video,omitempty" json:"video,omitempty"`
38 Provision []Provision `yaml:"provision,omitempty" json:"provision,omitempty"`
39 UpgradePackages *bool `yaml:"upgradePackages,omitempty" json:"upgradePackages,omitempty" jsonschema:"nullable"`
40 Containerd Containerd `yaml:"containerd,omitempty" json:"containerd,omitempty"`
41 GuestInstallPrefix *string `yaml:"guestInstallPrefix,omitempty" json:"guestInstallPrefix,omitempty" jsonschema:"nullable"`
42 Probes []Probe `yaml:"probes,omitempty" json:"probes,omitempty"`
43 PortForwards []PortForward `yaml:"portForwards,omitempty" json:"portForwards,omitempty"`
44 CopyToHost []CopyToHost `yaml:"copyToHost,omitempty" json:"copyToHost,omitempty"`
45 Message string `yaml:"message,omitempty" json:"message,omitempty"`
46 Networks []Network `yaml:"networks,omitempty" json:"networks,omitempty" jsonschema:"nullable"`
47 // `network` was deprecated in Lima v0.7.0, removed in Lima v0.14.0. Use `networks` instead.
48 Env map[string]string `yaml:"env,omitempty" json:"env,omitempty"`
49 Param map[string]string `yaml:"param,omitempty" json:"param,omitempty"`
50 DNS []net.IP `yaml:"dns,omitempty" json:"dns,omitempty"`
51 HostResolver HostResolver `yaml:"hostResolver,omitempty" json:"hostResolver,omitempty"`
52 // `useHostResolver` was deprecated in Lima v0.8.1, removed in Lima v0.14.0. Use `hostResolver.enabled` instead.
53 PropagateProxyEnv *bool `yaml:"propagateProxyEnv,omitempty" json:"propagateProxyEnv,omitempty" jsonschema:"nullable"`
54 CACertificates CACertificates `yaml:"caCerts,omitempty" json:"caCerts,omitempty"`
55 // Deprecated: Use vmOpts.vz.rosetta instead.
56 Rosetta Rosetta `yaml:"rosetta,omitempty" json:"rosetta,omitempty"`
57 Plain *bool `yaml:"plain,omitempty" json:"plain,omitempty" jsonschema:"nullable"`
58 TimeZone *string `yaml:"timezone,omitempty" json:"timezone,omitempty" jsonschema:"nullable"`
59 NestedVirtualization *bool `yaml:"nestedVirtualization,omitempty" json:"nestedVirtualization,omitempty" jsonschema:"nullable"`
60 User User `yaml:"user,omitempty" json:"user,omitempty"`
61 TPM *bool `yaml:"tpm,omitempty" json:"tpm,omitempty" jsonschema:"nullable"`
62 OsOpts OsOpts `yaml:"osOpts,omitempty" json:"osOpts,omitempty"`
63}
64
65type BaseTemplates []LocatorWithDigest
66
67type LocatorWithDigest struct {
68 URL string `yaml:"url" json:"url"`
69 Digest *string `yaml:"digest,omitempty" json:"digest,omitempty"` // TODO currently unused
70}
71
72type (
73 OS = string
74 Arch = string
75 MountType = string
76 VMType = string
77)
78
79type CPUType = map[Arch]string
80
81const (
82 LINUX OS = "Linux"
83 DARWIN OS = "Darwin"
84 FREEBSD OS = "FreeBSD"
85 WINDOWS OS = "Windows"
86
87 X8664 Arch = "x86_64"
88 AARCH64 Arch = "aarch64"
89 ARMV7L Arch = "armv7l"
90 PPC64LE Arch = "ppc64le"
91 RISCV64 Arch = "riscv64"
92 S390X Arch = "s390x"
93
94 REVSSHFS MountType = "reverse-sshfs"
95 NINEP MountType = "9p"
96 VIRTIOFS MountType = "virtiofs"
97 WSLMount MountType = "wsl2"
98
99 QEMU VMType = "qemu"
100 VZ VMType = "vz"
101 WSL2 VMType = "wsl2"
102 HCS VMType = "hcs"
103)
104
105var (
106 OSTypes = []OS{LINUX, DARWIN, FREEBSD, WINDOWS}
107 ArchTypes = []Arch{X8664, AARCH64, ARMV7L, PPC64LE, RISCV64, S390X}
108 MountTypes = []MountType{REVSSHFS, NINEP, VIRTIOFS, WSLMount}
109 VMTypes = []VMType{QEMU, VZ, WSL2, HCS}
110)
111
112type User struct {
113 Name *string `yaml:"name,omitempty" json:"name,omitempty" jsonschema:"nullable"`
114 Comment *string `yaml:"comment,omitempty" json:"comment,omitempty" jsonschema:"nullable"`
115 Home *string `yaml:"home,omitempty" json:"home,omitempty" jsonschema:"nullable"`
116 Shell *string `yaml:"shell,omitempty" json:"shell,omitempty" jsonschema:"nullable"`
117 UID *uint32 `yaml:"uid,omitempty" json:"uid,omitempty" jsonschema:"nullable"`
118 PasswordlessSudo *bool `yaml:"passwordlessSudo,omitempty" json:"passwordlessSudo,omitempty" jsonschema:"nullable"`
119}
120
121type VMOpts map[VMType]any
122
123type QEMUOpts struct {
124 MinimumVersion *string `yaml:"minimumVersion,omitempty" json:"minimumVersion,omitempty" jsonschema:"nullable"`
125 CPUType CPUType `yaml:"cpuType,omitempty" json:"cpuType,omitempty" jsonschema:"nullable"`
126}
127
128type VZOpts struct {
129 Rosetta Rosetta `yaml:"rosetta,omitempty" json:"rosetta,omitempty"`
130 DiskImageFormat *image.Type `yaml:"diskImageFormat,omitempty" json:"diskImageFormat,omitempty" jsonschema:"nullable"`
131}
132
133type Rosetta struct {
134 Enabled *bool `yaml:"enabled,omitempty" json:"enabled,omitempty" jsonschema:"nullable"`
135 BinFmt *bool `yaml:"binfmt,omitempty" json:"binfmt,omitempty" jsonschema:"nullable"`
136}
137
138type File struct {
139 Location string `yaml:"location" json:"location"` // REQUIRED
140 Arch Arch `yaml:"arch,omitempty" json:"arch,omitempty"`
141 Digest digest.Digest `yaml:"digest,omitempty" json:"digest,omitempty"`
142}
143
144type FileWithVMType struct {
145 File `yaml:",inline"`
146 VMType VMType `yaml:"vmType,omitempty" json:"vmType,omitempty"`
147}
148
149type Kernel struct {
150 File `yaml:",inline"`
151 Cmdline string `yaml:"cmdline,omitempty" json:"cmdline,omitempty"`
152}
153
154type Image struct {
155 File `yaml:",inline"`
156 Kernel *Kernel `yaml:"kernel,omitempty" json:"kernel,omitempty"`
157 Initrd *File `yaml:"initrd,omitempty" json:"initrd,omitempty"`
158 Variant string `yaml:"variant,omitempty" json:"variant,omitempty"`
159 ArchVariant string `yaml:"archVariant,omitempty" json:"archVariant,omitempty"`
160}
161
162type Disk struct {
163 Name string `yaml:"name" json:"name"` // REQUIRED
164 Format *bool `yaml:"format,omitempty" json:"format,omitempty"`
165 FSType *string `yaml:"fsType,omitempty" json:"fsType,omitempty"`
166 FSArgs []string `yaml:"fsArgs,omitempty" json:"fsArgs,omitempty"`
167}
168
169type Mount struct {
170 Location string `yaml:"location" json:"location"` // REQUIRED
171 MountPoint *string `yaml:"mountPoint,omitempty" json:"mountPoint,omitempty" jsonschema:"nullable"`
172 Writable *bool `yaml:"writable,omitempty" json:"writable,omitempty" jsonschema:"nullable"`
173 SSHFS SSHFS `yaml:"sshfs,omitempty" json:"sshfs,omitempty"`
174 NineP NineP `yaml:"9p,omitempty" json:"9p,omitempty"`
175 Virtiofs Virtiofs `yaml:"virtiofs,omitempty" json:"virtiofs,omitempty"`
176}
177
178type SFTPDriver = string
179
180const (
181 SFTPDriverBuiltin = "builtin"
182 SFTPDriverOpenSSHSFTPServer = "openssh-sftp-server"
183)
184
185type SSHFS struct {
186 Cache *bool `yaml:"cache,omitempty" json:"cache,omitempty" jsonschema:"nullable"`
187 FollowSymlinks *bool `yaml:"followSymlinks,omitempty" json:"followSymlinks,omitempty" jsonschema:"nullable"`
188 SFTPDriver *SFTPDriver `yaml:"sftpDriver,omitempty" json:"sftpDriver,omitempty" jsonschema:"nullable"`
189 // ReadonlyNames makes every path with a component matching one of these names read-only.
190 ReadonlyNames []string `yaml:"readonlyNames,omitempty" json:"readonlyNames,omitempty"`
191}
192
193type NineP struct {
194 SecurityModel *string `yaml:"securityModel,omitempty" json:"securityModel,omitempty" jsonschema:"nullable"`
195 ProtocolVersion *string `yaml:"protocolVersion,omitempty" json:"protocolVersion,omitempty" jsonschema:"nullable"`
196 Msize *string `yaml:"msize,omitempty" json:"msize,omitempty" jsonschema:"nullable"`
197 Cache *string `yaml:"cache,omitempty" json:"cache,omitempty" jsonschema:"nullable"`
198}
199
200type Virtiofs struct {
201 QueueSize *int `yaml:"queueSize,omitempty" json:"queueSize,omitempty"`
202}
203
204type SSH struct {
205 LocalPort *int `yaml:"localPort,omitempty" json:"localPort,omitempty" jsonschema:"nullable"`
206
207 // LoadDotSSHPubKeys loads ~/.ssh/*.pub in addition to $LIMA_HOME/_config/user.pub .
208 LoadDotSSHPubKeys *bool `yaml:"loadDotSSHPubKeys,omitempty" json:"loadDotSSHPubKeys,omitempty" jsonschema:"nullable"` // default: false
209 ForwardAgent *bool `yaml:"forwardAgent,omitempty" json:"forwardAgent,omitempty" jsonschema:"nullable"` // default: false
210 ForwardX11 *bool `yaml:"forwardX11,omitempty" json:"forwardX11,omitempty" jsonschema:"nullable"` // default: false
211 ForwardX11Trusted *bool `yaml:"forwardX11Trusted,omitempty" json:"forwardX11Trusted,omitempty" jsonschema:"nullable"` // default: false
212
213 OverVsock *bool `yaml:"overVsock,omitempty" json:"overVsock,omitempty" jsonschema:"nullable"` // default: depends on VMType
214}
215
216type Firmware struct {
217 // LegacyBIOS disables UEFI if set.
218 // LegacyBIOS is ignored for aarch64.
219 LegacyBIOS *bool `yaml:"legacyBIOS,omitempty" json:"legacyBIOS,omitempty" jsonschema:"nullable"`
220
221 // Images specify UEFI images (edk2-aarch64-code.fd.gz).
222 // Defaults to built-in UEFI.
223 Images []FileWithVMType `yaml:"images,omitempty" json:"images,omitempty"`
224}
225
226type Audio struct {
227 // Device is a QEMU audiodev string
228 Device *string `yaml:"device,omitempty" json:"device,omitempty" jsonschema:"nullable"`
229 // Interface is the virtual hardware presentation
230 Interface *string `yaml:"interface,omitempty" json:"interface,omitempty" jsonschema:"nullable"`
231 // Microphone attaches an audio *input* stream in addition to playback.
232 // Opt-in, because it makes the host ask for microphone permission.
233 // VZ driver only for now; the QEMU driver warns and ignores it.
234 Microphone *bool `yaml:"microphone,omitempty" json:"microphone,omitempty" jsonschema:"nullable"` // default: false
235}
236
237type VNCOptions struct {
238 Display *string `yaml:"display,omitempty" json:"display,omitempty" jsonschema:"nullable"`
239}
240
241type Video struct {
242 // Display is a QEMU display string
243 Display *string `yaml:"display,omitempty" json:"display,omitempty" jsonschema:"nullable"`
244 VNC VNCOptions `yaml:"vnc,omitempty" json:"vnc,omitempty"`
245}
246
247type ProvisionMode = string
248
249const (
250 ProvisionModeSystem ProvisionMode = "system"
251 ProvisionModeUser ProvisionMode = "user"
252 ProvisionModeBoot ProvisionMode = "boot"
253 ProvisionModeDependency ProvisionMode = "dependency"
254 ProvisionModeAnsible ProvisionMode = "ansible" // DEPRECATED
255 ProvisionModeData ProvisionMode = "data"
256 ProvisionModeYQ ProvisionMode = "yq"
257)
258
259type Provision struct {
260 Mode ProvisionMode `yaml:"mode,omitempty" json:"mode,omitempty" jsonschema:"default=system"`
261 SkipDefaultDependencyResolution *bool `yaml:"skipDefaultDependencyResolution,omitempty" json:"skipDefaultDependencyResolution,omitempty"`
262 Script *string `yaml:"script,omitempty" json:"script,omitempty"`
263 File *LocatorWithDigest `yaml:"file,omitempty" json:"file,omitempty" jsonschema:"nullable"`
264 Playbook string `yaml:"playbook,omitempty" json:"playbook,omitempty"` // DEPRECATED
265 // All ProvisionData fields must be nil unless Mode is ProvisionModeData
266 ProvisionData `yaml:",inline"` // Flatten fields for "strict" YAML mode
267 // ProvisionModeYQ borrows Owner, Path, and Permissions from ProvisionData
268 Expression *string `yaml:"expression,omitempty" json:"expression,omitempty" jsonschema:"nullable"`
269 Format *string `yaml:"format,omitempty" json:"format,omitempty" jsonschema:"nullable"`
270}
271
272type ProvisionData struct {
273 Content *string `yaml:"content,omitempty" json:"content,omitempty" jsonschema:"nullable"`
274 Overwrite *bool `yaml:"overwrite,omitempty" json:"overwrite,omitempty" jsonschema:"nullable"`
275 Owner *string `yaml:"owner,omitempty" json:"owner,omitempty"` // any owner string supported by `chown`, defaults to "root:root" on Linux
276 Path *string `yaml:"path,omitempty" json:"path,omitempty"`
277 Permissions *string `yaml:"permissions,omitempty" json:"permissions,omitempty"`
278}
279
280type Containerd struct {
281 System *bool `yaml:"system,omitempty" json:"system,omitempty" jsonschema:"nullable"` // default: false
282 User *bool `yaml:"user,omitempty" json:"user,omitempty" jsonschema:"nullable"` // default: true
283 Archives []File `yaml:"archives,omitempty" json:"archives,omitempty"` // default: see defaultContainerdArchives
284}
285
286type ProbeMode = string
287
288const (
289 ProbeModeReadiness ProbeMode = "readiness"
290)
291
292type Probe struct {
293 Mode ProbeMode `yaml:"mode,omitempty" json:"mode,omitempty" jsonschema:"default=readiness"`
294 Description string `yaml:"description,omitempty" json:"description,omitempty"`
295 Script *string `yaml:"script,omitempty" json:"script,omitempty"`
296 File *LocatorWithDigest `yaml:"file,omitempty" json:"file,omitempty" jsonschema:"nullable"`
297 Hint string `yaml:"hint,omitempty" json:"hint,omitempty"`
298}
299
300type Proto = string
301
302const (
303 ProtoTCP Proto = "tcp"
304 ProtoUDP Proto = "udp"
305 ProtoAny Proto = "any"
306)
307
308type PortForward struct {
309 GuestIPMustBeZero *bool `yaml:"guestIPMustBeZero,omitempty" json:"guestIPMustBeZero,omitempty"`
310 GuestIP net.IP `yaml:"guestIP,omitempty" json:"guestIP,omitempty"`
311 GuestPort int `yaml:"guestPort,omitempty" json:"guestPort,omitempty"`
312 GuestPortRange [2]int `yaml:"guestPortRange,omitempty" json:"guestPortRange,omitempty"`
313 GuestSocket string `yaml:"guestSocket,omitempty" json:"guestSocket,omitempty"`
314 HostIP net.IP `yaml:"hostIP,omitempty" json:"hostIP,omitempty"`
315 HostPort int `yaml:"hostPort,omitempty" json:"hostPort,omitempty"`
316 HostPortRange [2]int `yaml:"hostPortRange,omitempty" json:"hostPortRange,omitempty"`
317 HostSocket string `yaml:"hostSocket,omitempty" json:"hostSocket,omitempty"`
318 Proto Proto `yaml:"proto,omitempty" json:"proto,omitempty"`
319 Reverse bool `yaml:"reverse,omitempty" json:"reverse,omitempty"`
320 Ignore bool `yaml:"ignore,omitempty" json:"ignore,omitempty"`
321 Static bool `yaml:"static,omitempty" json:"static,omitempty"`
322}
323
324type CopyToHost struct {
325 GuestFile string `yaml:"guest,omitempty" json:"guest,omitempty"`
326 HostFile string `yaml:"host,omitempty" json:"host,omitempty"`
327 SkipIfMissing bool `yaml:"skipIfMissing,omitempty" json:"skipIfMissing,omitempty"`
328 DeleteOnStop bool `yaml:"deleteOnStop,omitempty" json:"deleteOnStop,omitempty"`
329}
330
331type Network struct {
332 // `Lima` and `Socket` are mutually exclusive; exactly one is required
333 Lima string `yaml:"lima,omitempty" json:"lima,omitempty"`
334 // Socket is a QEMU-compatible socket
335 Socket string `yaml:"socket,omitempty" json:"socket,omitempty"`
336 // VZNAT uses VZNATNetworkDeviceAttachment. Needs VZ. No root privilege is required.
337 VZNAT *bool `yaml:"vzNAT,omitempty" json:"vzNAT,omitempty"`
338
339 MACAddress string `yaml:"macAddress,omitempty" json:"macAddress,omitempty"`
340 Interface string `yaml:"interface,omitempty" json:"interface,omitempty"`
341 Metric *uint32 `yaml:"metric,omitempty" json:"metric,omitempty"`
342}
343
344type HostResolver struct {
345 Enabled *bool `yaml:"enabled,omitempty" json:"enabled,omitempty" jsonschema:"nullable"`
346 IPv6 *bool `yaml:"ipv6,omitempty" json:"ipv6,omitempty" jsonschema:"nullable"`
347 Hosts map[string]string `yaml:"hosts,omitempty" json:"hosts,omitempty" jsonschema:"nullable"`
348}
349
350type CACertificates struct {
351 RemoveDefaults *bool `yaml:"removeDefaults,omitempty" json:"removeDefaults,omitempty" jsonschema:"nullable"` // default: false
352 Files []string `yaml:"files,omitempty" json:"files,omitempty" jsonschema:"nullable"`
353 Certs []string `yaml:"certs,omitempty" json:"certs,omitempty" jsonschema:"nullable"`
354}
355
356type OsOpts map[OS]any
357
358type WindowsOpts struct {
359 VirtioWin []File `yaml:"virtioWin,omitempty" json:"virtioWin,omitempty"`
360}
361
362type DarwinOpts struct {
363 // SuppressFirstLoginSetup suppresses macOS first-login wizard screens (Darwin guests only).
364 SuppressFirstLoginSetup *bool `yaml:"suppressFirstLoginSetup,omitempty" json:"suppressFirstLoginSetup,omitempty" jsonschema:"nullable"`
365 // SuppressFirstLoginSetupPlist overrides the built-in com.apple.SetupAssistant.plist content
366 // used by SuppressFirstLoginSetup. Ignored unless SuppressFirstLoginSetup is true.
367 SuppressFirstLoginSetupPlist *string `yaml:"suppressFirstLoginSetupPlist,omitempty" json:"suppressFirstLoginSetupPlist,omitempty" jsonschema:"nullable"`
368}
369
370func NewOS(osname string) OS {
371 switch osname {
372 case "linux":
373 return LINUX
374 case "darwin":
375 return DARWIN
376 default:
377 logrus.Warnf("Unknown os: %s", osname)
378 return osname
379 }
380}
381
382func Goarm() int {
383 if runtime.GOOS != "linux" {
384 return 0
385 }
386 if runtime.GOARCH != "arm" {
387 return 0
388 }
389 if cpu.ARM.HasVFPv3 {
390 return 7
391 }
392 if cpu.ARM.HasVFP {
393 return 6
394 }
395 return 5 // default
396}
397
398func NewArch(arch string) Arch {
399 switch arch {
400 case "amd64":
401 return X8664
402 case "arm64":
403 return AARCH64
404 case "arm":
405 arm := Goarm()
406 if arm == 7 {
407 return ARMV7L
408 }
409 logrus.Warnf("Unknown arm: %d", arm)
410 return arch
411 case "ppc64le":
412 return PPC64LE
413 case "riscv64":
414 return RISCV64
415 case "s390x":
416 return S390X
417 default:
418 logrus.Warnf("Unknown arch: %s", arch)
419 return arch
420 }
421}
422
423func IsNativeArch(arch Arch) bool {
424 nativeX8664 := arch == X8664 && runtime.GOARCH == "amd64"
425 nativeAARCH64 := arch == AARCH64 && runtime.GOARCH == "arm64"
426 nativeARMV7L := arch == ARMV7L && runtime.GOARCH == "arm" && Goarm() == 7
427 nativePPC64LE := arch == PPC64LE && runtime.GOARCH == "ppc64le"
428 nativeRISCV64 := arch == RISCV64 && runtime.GOARCH == "riscv64"
429 nativeS390X := arch == S390X && runtime.GOARCH == "s390x"
430 return nativeX8664 || nativeAARCH64 || nativeARMV7L || nativePPC64LE || nativeRISCV64 || nativeS390X
431}
432
433func DefaultDriver() VMType {
434 switch runtime.GOOS {
435 case "darwin":
436 return VZ
437 default:
438 return QEMU
439 }
440}
441
442func DefaultNonNativeArchDriver() VMType {
443 return QEMU
444}