This is a comprehensive PoC for using actual KubeVirt VirtualMachine resources with the HyperShift Agent platform, including full ISO boot support.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/dhcp.c b/dhcp.c | |
| index d8515aa..9b027c0 100644 | |
| --- a/dhcp.c | |
| +++ b/dhcp.c | |
| @@ -142,17 +142,37 @@ static void fill_one(struct msg *m, int o, int *offset) | |
| } | |
| /** | |
| - * fill() - Fill options in message | |
| - * @m: Message to fill |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| asst$ make clean | |
| rm -f passt passt.avx2 pasta pasta.avx2 qrap *~ *.o seccomp.h pasta.1 \ | |
| passt.tar passt.tar.gz *.deb *.rpm \ | |
| passt.pid README.plain.md | |
| passt$ make valgrind | |
| Warning: no syscall number for mmap2 | |
| none of these syscalls will be allowed | |
| seccomp profile passt allows: accept accept4 bind clock_gettime close connect epoll_ctl epoll_pwait epoll_wait exit_group fallocate fcntl ftruncate futex getpid getsockopt gettid gettimeofday kill listen lseek mmap munmap | |
| open read readlink recvfrom recvmmsg recvmsg rt_sigaction rt_sigprocmask rt_sigreturn rt_sigtimedwait sendmmsg sendmsg sendto setsockopt shutdown socket statx timerfd_create timerfd_gettime timerfd_settime unlink write writev | |
| Warni |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| index d8515aa..60b5365 100644 | |
| --- a/dhcp.c | |
| +++ b/dhcp.c | |
| @@ -291,8 +291,8 @@ int dhcp(const struct ctx *c, const struct pool *p) | |
| const struct ethhdr *eh; | |
| const struct iphdr *iph; | |
| const struct udphdr *uh; | |
| + struct msg *m, resp; | |
| unsigned int i; | |
| - struct msg *m; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/test/lib/setup b/test/lib/setup | |
| index ee67152..0cb551c 100755 | |
| --- a/test/lib/setup | |
| +++ b/test/lib/setup | |
| @@ -47,9 +47,12 @@ setup_passt() { | |
| [ ${TRACE} -eq 1 ] && __opts="${__opts} --trace" | |
| [ ${VHOST_USER} -eq 1 ] && __opts="${__opts} --vhost-user" | |
| - context_run passt "make clean" | |
| + __opts="${__opts} -H ${PASST_HOSTNAME}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| } else if (!gethostname(hostname + sizeof(HOSTNAME_PREFIX) - 1, | |
| HOST_NAME_MAX + 1 - sizeof(HOSTNAME_PREFIX)) || | |
| errno == ENAMETOOLONG) { | |
| hostname[HOST_NAME_MAX] = '\0'; | |
| if (sethostname(hostname, strlen(hostname))) | |
| warn("Unable to set pasta-prefixed hostname"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -xe | |
| kubectl patch kubevirts -n kubevirt kubevirt --type=json -p="[{\"op\": \"add\", \"path\": \"/spec/configuration/network\", \"value\": { | |
| \"binding\": { | |
| \"managedTap\": { | |
| \"domainAttachmentType\": \"managedTap\", | |
| \"migration\": {}, | |
| } | |
| } | |
| }}]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/pkg/network/setup/netpod/netpod.go b/pkg/network/setup/netpod/netpod.go | |
| index cd56083814..724ac4358c 100644 | |
| --- a/pkg/network/setup/netpod/netpod.go | |
| +++ b/pkg/network/setup/netpod/netpod.go | |
| @@ -20,12 +20,14 @@ | |
| package netpod | |
| import ( | |
| + "crypto/rand" | |
| "encoding/json" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| labels: | |
| app: ipam-virt-workloads | |
| app.kubernetes.io/component: manager | |
| app.kubernetes.io/created-by: kubevirt-ipam-controller | |
| app.kubernetes.io/instance: system | |
| app.kubernetes.io/managed-by: kustomize |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| labels: | |
| kubevirt.io: "" | |
| pod-security.kubernetes.io/enforce: "privileged" | |
| name: kubevirt | |
| --- | |
| apiVersion: apiextensions.k8s.io/v1 |
NewerOlder