Comments (8)
We have noticed that @kvaps already did exactly that.
kubevirt/kubevirt#7648
kubevirt/community#186
We will try to get this to work to solve our issue.
from macvtap-cni.
I have tried the following configuration.
The virt-launcher starts successfully, and I the interface is liked correctly to ovn. However, the VM stays in the Scheduled state and doesn't start. I have not been able to find any reason for this. Do you have an idea why ?
kind: Vpc
apiVersion: kubeovn.io/v1
metadata:
name: virt-lab1-vpc
spec:
---
kind: Subnet
apiVersion: kubeovn.io/v1
metadata:
name: virt-lab1
spec:
vpc: virt-lab1-vpc
provider: net1.default.ovn
cidrBlock: 10.0.1.0/24
protocol: IPv4
---
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: net1
namespace: default
spec:
config: '{
"cniVersion": "0.3.0",
"type": "kube-ovn",
"server_socket": "/run/openvswitch/kube-ovn-daemon.sock",
"provider": "net1.default.ovn",
"promiscMode": true
}'
---
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachine
metadata:
name: vm-ubuntu-1
spec:
running: true
template:
metadata:
labels:
special: vmi-macvtap
spec:
nodeSelector:
kubernetes.io/hostname: node1
domain:
devices:
disks:
- name: containerdisk
disk:
bus: virtio
- name: cloudinitdisk
disk:
bus: virtio
interfaces:
- name: default
masquerade: {}
- name: l2-network
macvtap: {}
machine:
type: ""
resources:
requests:
memory: 1024M
networks:
- name: default
pod: {}
- name: l2-network
multus: # Secondary multus network
networkName: net1
terminationGracePeriodSeconds: 0
volumes:
- name: containerdisk
containerDisk:
image: quay.io/containerdisks/ubuntu:22.04
- name: cloudinitdisk
cloudInitNoCloud:
networkData: |
version: 2
ethernets:
enp1s0:
dhcp4: true
enp2s0:
addresses:
- 10.0.1.2/24
userData: |-
#cloud-config
password: ubuntu
chpasswd: { expire: False }
ssh_authorized_keys:
- ssh-rsa
packages:
- qemu-guest-agent
- lldpd
- nmap
runcmd:
- [ systemctl, start, qemu-guest-agent]
---
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachine
metadata:
name: vm-ubuntu-2
spec:
running: true
template:
metadata:
labels:
special: vmi-macvtap
spec:
nodeSelector:
kubernetes.io/hostname: node2
domain:
devices:
disks:
- name: containerdisk
disk:
bus: virtio
- name: cloudinitdisk
disk:
bus: virtio
interfaces:
- name: default
masquerade: {}
- name: l2-network
macvtap: {}
machine:
type: ""
resources:
requests:
memory: 1024M
networks:
- name: default
pod: {}
- name: l2-network
multus: # Secondary multus network
networkName: net1
terminationGracePeriodSeconds: 0
volumes:
- name: containerdisk
containerDisk:
image: quay.io/containerdisks/ubuntu:22.04
- name: cloudinitdisk
cloudInitNoCloud:
networkData: |
version: 2
ethernets:
enp1s0:
dhcp4: true
enp2s0:
addresses:
- 10.0.1.3/24
userData: |-
#cloud-config
password: ubuntu
chpasswd: { expire: False }
ssh_authorized_keys:
- ssh-rsa
packages:
- qemu-guest-agent
- lldpd
- nmap
runcmd:
- [ systemctl, start, qemu-guest-agent]
Interfaces:
110: 2bfd2aa6_net1_h@if109: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1400 qdisc noqueue master ovs-system state UP mode DEFAULT group default qlen 1000
link/ether ce:5d:a9:7b:a8:d7 brd ff:ff:ff:ff:ff:ff link-netns cni-930cbdbf-0ee2-10f0-7021-beb7912911a4
netns: cni-930cbdbf-0ee2-10f0-7021-beb7912911a4
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: k6t-eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1400 qdisc noqueue state DOWN mode DEFAULT group default
link/ether 02:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
3: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1400 qdisc fq_codel master k6t-eth0 state DOWN mode DEFAULT group default qlen 1000
link/ether f2:cd:72:d5:b8:27 brd ff:ff:ff:ff:ff:ff
107: eth0@if108: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1400 qdisc noqueue state UP mode DEFAULT group default
link/ether 00:00:00:61:cc:37 brd ff:ff:ff:ff:ff:ff link-netnsid 0
alias 2bfd2aa6e0de_c
109: net1@if110: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1400 qdisc noqueue state UP mode DEFAULT group default
link/ether 00:00:00:85:77:b9 brd ff:ff:ff:ff:ff:ff link-netnsid 0
alias 2bfd2aa6_net1_c
from macvtap-cni.
I have tried the following configuration. The virt-launcher starts successfully, and I the interface is liked correctly to ovn. However, the VM stays in the Scheduled state and doesn't start. I have not been able to find any reason for this. Do you have an idea why ?
kind: Vpc apiVersion: kubeovn.io/v1 metadata: name: virt-lab1-vpc spec: --- kind: Subnet apiVersion: kubeovn.io/v1 metadata: name: virt-lab1 spec: vpc: virt-lab1-vpc provider: net1.default.ovn cidrBlock: 10.0.1.0/24 protocol: IPv4 --- apiVersion: "k8s.cni.cncf.io/v1" kind: NetworkAttachmentDefinition metadata: name: net1 namespace: default spec: config: '{ "cniVersion": "0.3.0", "type": "kube-ovn", "server_socket": "/run/openvswitch/kube-ovn-daemon.sock", "provider": "net1.default.ovn", "promiscMode": true }' --- apiVersion: kubevirt.io/v1alpha3 kind: VirtualMachine metadata: name: vm-ubuntu-1 spec: running: true template: metadata: labels: special: vmi-macvtap spec: nodeSelector: kubernetes.io/hostname: node1 domain: devices: disks: - name: containerdisk disk: bus: virtio - name: cloudinitdisk disk: bus: virtio interfaces: - name: default masquerade: {} - name: l2-network macvtap: {} machine: type: "" resources: requests: memory: 1024M networks: - name: default pod: {} - name: l2-network multus: # Secondary multus network networkName: net1 terminationGracePeriodSeconds: 0 volumes: - name: containerdisk containerDisk: image: quay.io/containerdisks/ubuntu:22.04 - name: cloudinitdisk cloudInitNoCloud: networkData: | version: 2 ethernets: enp1s0: dhcp4: true enp2s0: addresses: - 10.0.1.2/24 userData: |- #cloud-config password: ubuntu chpasswd: { expire: False } ssh_authorized_keys: - ssh-rsa packages: - qemu-guest-agent - lldpd - nmap runcmd: - [ systemctl, start, qemu-guest-agent] --- apiVersion: kubevirt.io/v1alpha3 kind: VirtualMachine metadata: name: vm-ubuntu-2 spec: running: true template: metadata: labels: special: vmi-macvtap spec: nodeSelector: kubernetes.io/hostname: node2 domain: devices: disks: - name: containerdisk disk: bus: virtio - name: cloudinitdisk disk: bus: virtio interfaces: - name: default masquerade: {} - name: l2-network macvtap: {} machine: type: "" resources: requests: memory: 1024M networks: - name: default pod: {} - name: l2-network multus: # Secondary multus network networkName: net1 terminationGracePeriodSeconds: 0 volumes: - name: containerdisk containerDisk: image: quay.io/containerdisks/ubuntu:22.04 - name: cloudinitdisk cloudInitNoCloud: networkData: | version: 2 ethernets: enp1s0: dhcp4: true enp2s0: addresses: - 10.0.1.3/24 userData: |- #cloud-config password: ubuntu chpasswd: { expire: False } ssh_authorized_keys: - ssh-rsa packages: - qemu-guest-agent - lldpd - nmap runcmd: - [ systemctl, start, qemu-guest-agent]
Interfaces:
110: 2bfd2aa6_net1_h@if109: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1400 qdisc noqueue master ovs-system state UP mode DEFAULT group default qlen 1000 link/ether ce:5d:a9:7b:a8:d7 brd ff:ff:ff:ff:ff:ff link-netns cni-930cbdbf-0ee2-10f0-7021-beb7912911a4 netns: cni-930cbdbf-0ee2-10f0-7021-beb7912911a4 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: k6t-eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1400 qdisc noqueue state DOWN mode DEFAULT group default link/ether 02:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff 3: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1400 qdisc fq_codel master k6t-eth0 state DOWN mode DEFAULT group default qlen 1000 link/ether f2:cd:72:d5:b8:27 brd ff:ff:ff:ff:ff:ff 107: eth0@if108: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1400 qdisc noqueue state UP mode DEFAULT group default link/ether 00:00:00:61:cc:37 brd ff:ff:ff:ff:ff:ff link-netnsid 0 alias 2bfd2aa6e0de_c 109: net1@if110: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1400 qdisc noqueue state UP mode DEFAULT group default link/ether 00:00:00:85:77:b9 brd ff:ff:ff:ff:ff:ff link-netnsid 0 alias 2bfd2aa6_net1_c
AFAIU, you're not using a macvtap interface: your net-attach-def requests a secondary interface of type kube-ovn
. This means the macvtap-cni will not even be invoked.
from macvtap-cni.
IIUC, you are requesting an entirely new feature: you want to use as macvtap's lower device an interface that exists in the pod network namespace.
This project was created to ensure we could connect to host networks in a simple way; the solution was then to use a device plugin + CNI combo, aided by multus to get the character device available in the pod.
I don't think what we have currently is a good fit for what you're requesting, but let me think this through a little bit.
/cc @kvaps this sounds like something you would be interested on.
from macvtap-cni.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
from macvtap-cni.
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten
from macvtap-cni.
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
/close
from macvtap-cni.
@kubevirt-bot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity.
Reopen the issue with/reopen
.
Mark the issue as fresh with/remove-lifecycle rotten
./close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
from macvtap-cni.
Related Issues (14)
- Unexpected name for interface HOT 8
- support IPAM HOT 3
- Any plans for arm64 support? HOT 1
- failed to lookup device "": Link not found HOT 1
- macvtap-cni pods panicking - signal SIGSEGV: segmentation violation code=0x1 addr=0x1 pc=0x88945c HOT 1
- creating macvtap-cni pod failed HOT 1
- /dev/tap devices created on physical host rather than container when running in kind HOT 19
- macvtap-cni might terminate in case of stress listing / deleting devices HOT 4
- cluster-up fails due to docker.io rate limits HOT 4
- macvtap-cni's pod in CrashLoopBackOff when using k8s v1.25 HOT 1
- Using a NetworkAttachementDefinition to configure the device plugin HOT 16
- Trying to setup Macvtap HOT 8
- MacVtap L2 Network connectivity (LLDP) only working while running tcpdump HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from macvtap-cni.