Hi guys
we faced with an error while nic attaching with followed errors:
> [Z0][VMM][I]: <interface type='bridge'> <virtualport type='openvswitch'/> <source bridge='ovsbr0'/> <mac address='00:07:e4:1a:44:09'/> <target dev='one-84-6'/> <model type='virtio'/> </interface>
> [Z0][VMM][I]: EOT
> [Z0][VMM][I]: )" failed: error: Failed to attach device from /dev/fd/63
> [Z0][VMM][I]: error: Unable to create tap device one-84-6: Device or resource busy
> [Z0][VMM][E]: Could not attach NIC 6 (00:07:e4:1a:44:09) to one-84
> [Z0][VMM][I]: ExitCode: 1
> [Z0][VMM][I]: Failed to execute virtualization driver operation: attach_nic.
> [Z0][VMM][E]: Error attaching new VM NIC: Could not attach NIC 6 (00:07:e4:1a:44:09) to one-84
> [Z0][VM][I]: New LCM state is RUNNING
> [Z0][VM][I]: New LCM state is HOTPLUG_NIC
after we looked deeper, we found what earlier were other errors with NIC attachment:
>[Z0][VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/reconfigure 'one-84' 'hda' '/var/lib/one//datastores/0/84/disk.1' 84 BQB974790008-24
>[Z0][VMM][E]: reconfigure: Command "virsh --connect qemu+tcp://localhost/system change-media one-84 hda /var/lib/one//datastores/0/84/disk.1 --insert" failed: error: Failed to complete action insert on media
>[Z0][VMM][I]: error: internal error: unable to execute QEMU command 'change': Could not open '/var/lib/one//datastores/0/84/disk.1': Operation not permitted
>[Z0][VMM][E]: Could not insert CDROM /var/lib/one//datastores/0/84/disk.1 to hda
>[Z0][VMM][I]: ExitCode: 1
>[Z0][VMM][I]: Failed to execute virtualization driver operation: reconfigure.
>[Z0][VMM][E]: Error attaching new VM NIC: Could not insert CDROM /var/lib/one//datastores/0/84/disk.1 to hda
due to previous errors, we found what the VM’s xml from libvirt differs from ONE’s xml of the same VM and contain the information about NIC, what one was unable to connect. this led to phantom ovs port creation and duplicated mac addresses in VM on another host of this cluster what leads to network issues
we understood what after NIC attaching, ONE needs to edit context file/cdrom to make changes about new HW
Context drive /var/lib/one//datastores/0/84/disk.1 is present in the system and looks correct
turning off and then turning on VM is helped in this situation.
does anyone know, that can be the root cause of this:
>[Z0][VMM][E]: reconfigure: Command "virsh --connect qemu+tcp://localhost/system change-media one-84 hda /var/lib/one//datastores/0/84/disk.1 --insert" failed: error: Failed to complete action insert on media
>[Z0][VMM][I]: error: internal error: unable to execute QEMU command 'change': Could not open '/var/lib/one//datastores/0/84/disk.1': Operation not permitted
>[Z0][VMM][E]: Could not insert CDROM /var/lib/one//datastores/0/84/disk.1 to hda
We use opennebula 5.6 and libvirt libvirt-3.10
Help in advice please!