Skip to content

Commit

Permalink
Add hyperV support
Browse files Browse the repository at this point in the history
Add hyperV support to cosa including a buildextend command to create
vhdx images.

Supports coreos/fedora-coreos-tracker#1411

Signed-off-by: Brent Baude <[email protected]>
  • Loading branch information
baude committed Feb 13, 2023
1 parent 2cf91c9 commit 175a78b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/coreos-assembler.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
// commands we'd expect to use in the local dev path
var buildCommands = []string{"init", "fetch", "build", "run", "prune", "clean", "list"}
var advancedBuildCommands = []string{"buildfetch", "buildupload", "oc-adm-release", "push-container", "upload-oscontainer", "buildextend-extensions"}
var buildextendCommands = []string{"aliyun", "aws", "azure", "digitalocean", "exoscale", "extensions", "extensions-container", "gcp", "hashlist-experimental", "ibmcloud", "kubevirt", "legacy-oscontainer", "live", "metal", "metal4k", "nutanix", "openstack", "qemu", "secex", "virtualbox", "vmware", "vultr"}
var buildextendCommands = []string{"aliyun", "aws", "azure", "digitalocean", "exoscale", "extensions", "extensions-container", "gcp", "hashlist-experimental", "hyperv", "ibmcloud", "kubevirt", "legacy-oscontainer", "live", "metal", "metal4k", "nutanix", "openstack", "qemu", "secex", "virtualbox", "vmware", "vultr"}
var utilityCommands = []string{"aws-replicate", "compress", "copy-container", "koji-upload", "kola", "push-container-manifest", "remote-build-container", "remote-prune", "remote-session", "sign", "tag", "update-variant"}
var otherCommands = []string{"shell", "meta"}

Expand Down
3 changes: 2 additions & 1 deletion pkg/builds/cosa_v1.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package builds

// generated by 'make schema'
// source hash: ce57421ef973f926c59065fd4eb122d5d22fe76681f952376091631178ce5dc1
// source hash: 8b3d3f50ea1a036d7209c463bc27cbcbc29707b69d162c900d291e401496a8ce

type AdvisoryDiff []AdvisoryDiffItems

Expand Down Expand Up @@ -92,6 +92,7 @@ type BuildArtifacts struct {
Exoscale *Artifact `json:"exoscale,omitempty"`
ExtensionsContainer *Artifact `json:"extensions-container,omitempty"`
Gcp *Artifact `json:"gcp,omitempty"`
HyperV *Artifact `json:"hyperv,omitempty"`
IbmCloud *Artifact `json:"ibmcloud,omitempty"`
Initramfs *Artifact `json:"initramfs,omitempty"`
Iso *Artifact `json:"iso,omitempty"`
Expand Down
9 changes: 8 additions & 1 deletion pkg/builds/schema_doc.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Generated by ./generate-schema.sh
// Source hash: ce57421ef973f926c59065fd4eb122d5d22fe76681f952376091631178ce5dc1
// Source hash: 8b3d3f50ea1a036d7209c463bc27cbcbc29707b69d162c900d291e401496a8ce
// DO NOT EDIT

package builds
Expand Down Expand Up @@ -460,6 +460,7 @@ var generatedSchemaJSON = `{
"legacy-oscontainer",
"gcp",
"kubevirt",
"hyperv",
"ibmcloud",
"powervs",
"initramfs",
Expand Down Expand Up @@ -659,6 +660,12 @@ var generatedSchemaJSON = `{
"type": "object",
"title": "KubeVirt",
"$ref": "#/definitions/artifact"
},
"hyperv": {
"$id": "#/properties/images/properties/hyperv",
"type": "object",
"title": "HyperV",
"$ref": "#/definitions/artifact"
}
}
},
Expand Down
1 change: 1 addition & 0 deletions src/cmd-buildextend-hyperv
5 changes: 5 additions & 0 deletions src/cosalib/qemuvariants.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@
"--format=oldgnu"
]
},
"hyperv": {
"image_format": "vhdx",
"image_suffix": "vhdx",
"platform": "hyperv",
},
"kubevirt": {
"image_format": "qcow2",
"platform": "kubevirt",
Expand Down
7 changes: 7 additions & 0 deletions src/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@
"legacy-oscontainer",
"gcp",
"kubevirt",
"hyperv",
"ibmcloud",
"powervs",
"initramfs",
Expand Down Expand Up @@ -653,6 +654,12 @@
"type": "object",
"title": "KubeVirt",
"$ref": "#/definitions/artifact"
},
"hyperv": {
"$id": "#/properties/images/properties/hyperv",
"type": "object",
"title": "HyperV",
"$ref": "#/definitions/artifact"
}
}
},
Expand Down

0 comments on commit 175a78b

Please sign in to comment.