Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(api): patch experiments #533

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions images/virt-artifact/patches/024-test.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/pkg/instancetype/instancetype.go b/pkg/instancetype/instancetype.go
index 6860766acd..127ea05475 100644
--- a/pkg/instancetype/instancetype.go
+++ b/pkg/instancetype/instancetype.go
@@ -553,6 +553,8 @@ func (m *InstancetypeMethods) ApplyToVmi(field *k8sfield.Path, instancetypeSpec
conflicts = append(conflicts, applyInstanceTypeAnnotations(instancetypeSpec.Annotations, vmiMetadata)...)
}

+ vmiSpec.Domain.Firmware.Bootloader.BIOS.UseSerial = pointer.P(true)
+
if preferenceSpec != nil {
// By design Preferences can't conflict with the VMI so we don't return any
applyCPUPreferences(preferenceSpec, vmiSpec)
diff --git a/pkg/virt-launcher/virtwrap/converter/converter.go b/pkg/virt-launcher/virtwrap/converter/converter.go
index 0565ceb5dd..fae3f33aca 100644
--- a/pkg/virt-launcher/virtwrap/converter/converter.go
+++ b/pkg/virt-launcher/virtwrap/converter/converter.go
@@ -1230,6 +1230,10 @@ func Convert_v1_Firmware_To_related_apis(vmi *v1.VirtualMachineInstance, domain
UseSerial: "yes",
}
}
+
+ domain.Spec.OS.BIOS = &api.BIOS{
+ UseSerial: "yes",
+ }
}

if len(firmware.Serial) > 0 {
13 changes: 13 additions & 0 deletions images/virt-artifact/patches/024-test.patchf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# diff --git a/pkg/virt-launcher/virtwrap/util/libvirt_helper.go b/pkg/virt-launcher/virtwrap/util/libvirt_helper.go
# index 35b9f98808..ab672d112f 100644
# --- a/pkg/virt-launcher/virtwrap/util/libvirt_helper.go
# +++ b/pkg/virt-launcher/virtwrap/util/libvirt_helper.go
# @@ -218,7 +218,7 @@ func (l LibvirtWrapper) StartVirtqemud(stopChan chan struct{}) {
# go func() {
# for {
# exitChan := make(chan struct{})
# - args := []string{"-f", "/var/run/libvirt/virtqemud.conf"}
# + args := []string{"-serial", "file:\"/var/log/serial.log\"", "-f", "/var/run/libvirt/virtqemud.conf"}
# cmd := exec.Command("/usr/sbin/virtqemud", args...)
# if l.user != 0 {
# cmd.SysProcAttr = &syscall.SysProcAttr{
Loading