# Ovswitch: No tap device found for nic 0

**URL:** <https://forum.opennebula.io/t/ovswitch-no-tap-device-found-for-nic-0/10881>\
**Category:** Product Support\
**Created:** [October 13, 2022, 1:31pm UTC](https://forum.opennebula.io/t/ovswitch-no-tap-device-found-for-nic-0/10881 "2022-10-13T13:31:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![opositorvlc2](https://avatars.discourse-cdn.com/v4/letter/o/46a35a/32.png) [@opositorvlc2](https://forum.opennebula.io/u/opositorvlc2)\
**Post date:** [October 13, 2022, 1:31pm UTC](https://forum.opennebula.io/t/ovswitch-no-tap-device-found-for-nic-0/10881/1 "2022-10-13T13:31:23Z")

</div>

Hi,  
My Opennebula setup:  
Frontend + Node : Rocky Linux 8.6 + OpenNebula 6.4.0 + KVM + ovswitch 2.17  
ovswitch is configured correctly (I can receive and send traffic from/to Internet)

Trying to start any VM (for instance Rocky Linux 8 from MarketPlace) I obtain this error:  
“DEPLOY: ovswitch: No tap device found for nic 0 ExitCode: 1”

The started VM remains in state RUNNING but I can’t connect because opennebula doesn’t create a new port in the ovswitch bridge. However opennebula can create a new interface in the system (ip address).

Thanks in advance.

[root@localhost ~]# ovs-vsctl show  
6f6d3911-b12a-43d2-b0e9-880369a896e8  
Bridge ovsbr0  
Port enp0s8  
Interface enp0s8  
Port ovsbr0  
Interface ovsbr0  
type: internal  
Port enp0s3  
Interface enp0s3  
ovs\_version: “2.17.3”

Virtual Network template:  
BRIDGE = “ovsbr0”  
BRIDGE\_TYPE = “linux”  
DESCRIPTION = “A private network for VM inter-communication”  
DNS = “”  
GATEWAY = “192.168.1.1”  
NAME = “Private Network”  
NETWORK\_ADDRESS = “192.168.1.0”  
NETWORK\_MASK = “255.255.255.0”  
OUTER\_VLAN\_ID = “”  
PHYDEV = “enp0s3”  
SEARCH\_DOMAIN = “”  
SECURITY\_GROUPS = “0”  
VLAN\_ID = “”  
VN\_MAD = “ovswitch”

[root@localhost ~]# ifconfig  
enp0s3: flags=4163\<UP,BROADCAST,RUNNING,MULTICAST\> mtu 1500  
ether 08:00:27:83:a4:dd txqueuelen 1000 (Ethernet)  
RX packets 9154138 bytes 2175483509 (2.0 GiB)  
RX errors 0 dropped 0 overruns 0 frame 0  
TX packets 204229 bytes 47832133 (45.6 MiB)  
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

enp0s8: flags=4163\<UP,BROADCAST,RUNNING,MULTICAST\> mtu 1500  
inet 172.20.20.5 netmask 255.255.255.0 broadcast 172.20.20.255  
ether 08:00:27:87:b7:26 txqueuelen 1000 (Ethernet)  
RX packets 0 bytes 0 (0.0 B)  
RX errors 0 dropped 0 overruns 0 frame 0  
TX packets 8491016 bytes 1556236871 (1.4 GiB)  
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73\<UP,LOOPBACK,RUNNING\> mtu 65536  
inet 127.0.0.1 netmask 255.0.0.0  
inet6 ::1 prefixlen 128 scopeid 0x10  
loop txqueuelen 1000 (Local Loopback)  
RX packets 3392256 bytes 6689311852 (6.2 GiB)  
RX errors 0 dropped 0 overruns 0 frame 0  
TX packets 3392256 bytes 6689311852 (6.2 GiB)  
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

one-24-0: flags=4163\<UP,BROADCAST,RUNNING,MULTICAST\> mtu 1500  
inet6 fe80::fc00:acff:fe14:1464 prefixlen 64 scopeid 0x20  
ether fe:00:ac:14:14:64 txqueuelen 1000 (Ethernet)  
RX packets 21 bytes 1342 (1.3 KiB)  
RX errors 0 dropped 0 overruns 0 frame 0  
TX packets 44 bytes 6431 (6.2 KiB)  
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

ovsbr0: flags=4163\<UP,BROADCAST,RUNNING,MULTICAST\> mtu 1500  
inet 1\*\*.1\*\*.207.125 netmask 255.255.254.0 broadcast 0.0.0.0  
inet6 fe80::a00:27ff:fe83:a4dd prefixlen 64 scopeid 0x20  
ether 08:00:27:83:a4:dd txqueuelen 1000 (Ethernet)  
RX packets 8675198 bytes 2019424197 (1.8 GiB)  
RX errors 0 dropped 16737 overruns 0 frame 0  
TX packets 140308 bytes 37526462 (35.7 MiB)  
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

virbr0: flags=4099\<UP,BROADCAST,MULTICAST\> mtu 1500  
inet 192.168.124.1 netmask 255.255.255.0 broadcast 192.168.124.255  
ether 52:54:00:b6:c5:f2 txqueuelen 1000 (Ethernet)  
RX packets 0 bytes 0 (0.0 B)  
RX errors 0 dropped 0 overruns 0 frame 0  
TX packets 0 bytes 0 (0.0 B)  
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

* * *

My VM template:  
User template  
ERROR = “Thu Oct 13 09:37:20 2022: DEPLOY: ovswitch: No tap device found for nic 0 ExitCode: 1”  
LXD\_SECURITY\_PRIVILEGED = “true”  
Template  
AUTOMATIC\_DS\_REQUIREMENTS = “("CLUSTERS/ID" @\> 0)”  
AUTOMATIC\_NIC\_REQUIREMENTS = “("CLUSTERS/ID" @\> 0)”  
AUTOMATIC\_REQUIREMENTS = “(CLUSTER\_ID = 0) & !(PUBLIC\_CLOUD = YES) & !(PIN\_POLICY = PINNED)”  
CONTEXT = [  
DISK\_ID = “1”,  
ETH0\_DNS = “”,  
ETH0\_EXTERNAL = “”,  
ETH0\_GATEWAY = “192.168.1.1”,  
ETH0\_GATEWAY6 = “”,  
ETH0\_IP = “172.20.20.100”,  
ETH0\_IP6 = “”,  
ETH0\_IP6\_GATEWAY = “”,  
ETH0\_IP6\_METHOD = “”,  
ETH0\_IP6\_METRIC = “”,  
ETH0\_IP6\_PREFIX\_LENGTH = “”,  
ETH0\_IP6\_ULA = “”,  
ETH0\_MAC = “02:00:ac:14:14:64”,  
ETH0\_MASK = “255.255.255.0”,  
ETH0\_METHOD = “”,  
ETH0\_METRIC = “”,  
ETH0\_MTU = “”,  
ETH0\_NETWORK = “192.168.1.0”,  
ETH0\_SEARCH\_DOMAIN = “”,  
ETH0\_VLAN\_ID = “”,  
ETH0\_VROUTER\_IP = “”,  
ETH0\_VROUTER\_IP6 = “”,  
ETH0\_VROUTER\_MANAGEMENT = “”,  
NETWORK = “YES”,  
SSH\_PUBLIC\_KEY = “”,  
TARGET = “hda” ]  
CPU = “1”  
DISK = [  
ALLOW\_ORPHANS = “YES”,  
CLONE = “YES”,  
CLONE\_TARGET = “SYSTEM”,  
CLUSTER\_ID = “0”,  
DATASTORE = “default”,  
DATASTORE\_ID = “1”,  
DEV\_PREFIX = “vd”,  
DISK\_ID = “0”,  
DISK\_SNAPSHOT\_TOTAL\_SIZE = “0”,  
DISK\_TYPE = “FILE”,  
DRIVER = “qcow2”,  
FORMAT = “qcow2”,  
IMAGE = “Rocky Linux 8”,  
IMAGE\_ID = “8”,  
IMAGE\_STATE = “2”,  
LN\_TARGET = “SYSTEM”,  
ORIGINAL\_SIZE = “4096”,  
READONLY = “NO”,  
SAVE = “NO”,  
SIZE = “4096”,  
SOURCE = “/var/lib/one//datastores/1/df30e070da2fcd2cc0f1be3e2d9a42a6”,  
TARGET = “vda”,  
TM\_MAD = “ssh”,  
TYPE = “FILE” ]  
GRAPHICS = [  
LISTEN = “0.0.0.0”,  
PORT = “5924”,  
TYPE = “vnc” ]  
MEMORY = “768”  
NIC = [  
AR\_ID = “0”,  
BRIDGE = “ovsbr0”,  
BRIDGE\_TYPE = “openvswitch”,  
CLUSTER\_ID = “0”,  
GATEWAY = “192.168.1.1”,  
IP = “172.20.20.100”,  
MAC = “02:00:ac:14:14:64”,  
NAME = “NIC0”,  
NETWORK = “Private Network”,  
NETWORK\_ID = “4”,  
NIC\_ID = “0”,  
PHYDEV = “enp0s3”,  
SECURITY\_GROUPS = “0”,  
SSH = “YES”,  
TARGET = “one-24-0”,  
VN\_MAD = “ovswitch” ]  
OS = [  
ARCH = “x86\_64”,  
UUID = “3ac67a4a-421f-466a-ad9c-3b520aaa0159” ]  
SECURITY\_GROUP\_RULE = [  
PROTOCOL = “ALL”,  
RULE\_TYPE = “OUTBOUND”,  
SECURITY\_GROUP\_ID = “0”,  
SECURITY\_GROUP\_NAME = “default” ]  
SECURITY\_GROUP\_RULE = [  
PROTOCOL = “ALL”,  
RULE\_TYPE = “INBOUND”,  
SECURITY\_GROUP\_ID = “0”,  
SECURITY\_GROUP\_NAME = “default” ]  
TEMPLATE\_ID = “8”  
TM\_MAD\_SYSTEM = “ssh”  
VMID = “24”

My Logs:  
Thu Oct 13 09:37:16 2022 [Z0][VM][I]: New state is ACTIVE  
Thu Oct 13 09:37:16 2022 [Z0][VM][I]: New LCM state is PROLOG  
Thu Oct 13 09:37:18 2022 [Z0][VM][I]: New LCM state is BOOT  
Thu Oct 13 09:37:18 2022 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/24/deployment.0  
Thu Oct 13 09:37:19 2022 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm\_context.  
Thu Oct 13 09:37:19 2022 [Z0][VMM][I]: ExitCode: 0  
Thu Oct 13 09:37:19 2022 [Z0][VMM][I]: Successfully execute network driver operation: pre.  
Thu Oct 13 09:37:19 2022 [Z0][VMM][I]: ExitCode: 0  
Thu Oct 13 09:37:19 2022 [Z0][VMM][I]: Successfully execute virtualization driver operation: /bin/mkdir -p.  
Thu Oct 13 09:37:19 2022 [Z0][VMM][I]: ExitCode: 0  
Thu Oct 13 09:37:19 2022 [Z0][VMM][I]: Successfully execute virtualization driver operation: /bin/cat - \>/var/lib/one//datastores/0/24/vm.xml.  
Thu Oct 13 09:37:19 2022 [Z0][VMM][I]: ExitCode: 0  
Thu Oct 13 09:37:19 2022 [Z0][VMM][I]: Successfully execute virtualization driver operation: /bin/cat - \>/var/lib/one//datastores/0/24/ds.xml.  
Thu Oct 13 09:37:20 2022 [Z0][VMM][I]: ExitCode: 0  
Thu Oct 13 09:37:20 2022 [Z0][VMM][I]: Successfully execute virtualization driver operation: deploy.  
Thu Oct 13 09:37:20 2022 [Z0][VMM][I]: Command execution fail (exit code: 1): cat \<\< EOT | /var/tmp/one/vnm/ovswitch/post ‘/var/lib/one//datastores/0/24  
Thu Oct 13 09:37:20 2022 [Z0][VMM][I]: /var/lib/one//datastores/0/24/deployment.0  
Thu Oct 13 09:37:20 2022 [Z0][VMM][I]: 3ac67a4a-421f-466a-ad9c-3b520aaa0159’ ‘cabernetvm’  
Thu Oct 13 09:37:20 2022 [Z0][VMM][I]: No tap device found for nic 0  
Thu Oct 13 09:37:20 2022 [Z0][VMM][I]: ExitCode: 1  
Thu Oct 13 09:37:20 2022 [Z0][VMM][I]: error: failed to get domain ‘/var/lib/one//datastores/0/24/var/lib/one//datastores/0/24/deployment.03ac67a4a-421f-466a-ad9c-3b520aaa0159’  
Thu Oct 13 09:37:20 2022 [Z0][VMM][I]: /var/tmp/one/datastore/xpath.rb:70:in `block in <main>': undefined method `elements’ for nil:NilClass (NoMethodError)  
Thu Oct 13 09:37:20 2022 [Z0][VMM][I]: from /var/tmp/one/datastore/xpath.rb:64:in `each' Thu Oct 13 09:37:20 2022 [Z0][VMM][I]: from /var/tmp/one/datastore/xpath.rb:64:in `’  
Thu Oct 13 09:37:20 2022 [Z0][VMM][I]: Datastore path not found  
Thu Oct 13 09:37:20 2022 [Z0][VMM][I]: ExitCode: 0  
Thu Oct 13 09:37:20 2022 [Z0][VMM][I]: Successfully execute virtualization driver operation: cancel.  
Thu Oct 13 09:37:20 2022 [Z0][VMM][I]: clean: Executed “sudo -n ovs-vsctl --if-exists del-port ovsbr0 one-24-0”.  
Thu Oct 13 09:37:20 2022 [Z0][VMM][I]: ExitCode: 0  
Thu Oct 13 09:37:20 2022 [Z0][VMM][I]: Successfully execute network driver operation: clean.  
Thu Oct 13 09:37:20 2022 [Z0][VMM][I]: Failed to execute network driver operation: post.  
Thu Oct 13 09:37:20 2022 [Z0][VMM][E]: DEPLOY: ovswitch: No tap device found for nic 0 ExitCode: 1  
Thu Oct 13 09:37:20 2022 [Z0][VM][I]: New LCM state is BOOT\_FAILURE  
Thu Oct 13 09:37:22 2022 [Z0][LCM][I]: VM reported RUNNING by the drivers  
Thu Oct 13 09:37:22 2022 [Z0][VM][I]: New LCM state is RUNNING

---

<div class="post-metadata">

**Author:** ![dclavijo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dclavijo/32/5265_2.png) [@dclavijo](https://forum.opennebula.io/u/dclavijo)\
**Post date:** [October 13, 2022, 1:35pm UTC](https://forum.opennebula.io/t/ovswitch-no-tap-device-found-for-nic-0/10881/2 "2022-10-13T13:35:36Z")

</div>

> Frontend + Node : Rocky Linux 8.6 + OpenNebula 6.4.0 + KVM + ovswitch 2.17

Rocky Linux is not a [supported platform](https://docs.opennebula.io/6.4/intro_release_notes/release_notes/platform_notes.html#certified-components-version) on frontend and virtualization nodes. It is only supported as a Guest OS.

---

<div class="post-metadata">

**Author:** ![opositorvlc2](https://avatars.discourse-cdn.com/v4/letter/o/46a35a/32.png) [@opositorvlc2](https://forum.opennebula.io/u/opositorvlc2)\
**Post date:** [October 19, 2022, 2:49pm UTC](https://forum.opennebula.io/t/ovswitch-no-tap-device-found-for-nic-0/10881/3 "2022-10-19T14:49:44Z")

</div>

Now trying with Alma Linux as host and Rocky Linus as guest VM I’m getting this error:

DEPLOY: error: Failed to create domain from /var/lib/one//datastores/0/3/deployment.0 error: invalid argument: could not get preferred machine for /usr/bin/qemu-kvm-one type=kvm Could not create domain from /var/lib/one//datastores/0/3/deployment.0 ExitCode: 255

---

<div class="post-metadata">

**Author:** ![dclavijo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dclavijo/32/5265_2.png) [@dclavijo](https://forum.opennebula.io/u/dclavijo)\
**Post date:** [October 19, 2022, 3:46pm UTC](https://forum.opennebula.io/t/ovswitch-no-tap-device-found-for-nic-0/10881/4 "2022-10-19T15:46:12Z")

</div>

Make sure KVM is properly configured on your host. Or use LXC alternatively is KVM is unavailable.
