I am having issues ‘re’-attaching a nic to a VM that had already gone through the operation of ‘detach nic’.
As an example: I am running a pfSense VM and have a number of IPs (nics) attached for 1:1 NATing. However, I detached a nic, and attempted to attach another nic and failure occurs.
As a troubleshooting step, I’ve attempted this on a number of different VMs, and this issue is apparent in every one of them. The issue is VM/OS agnostic.
Front end, and hypervisor run on Debian Jessie, the VM is Ubuntu 16
Steps to reproduce:
-Drill down into VM, Network, Attach nic. – that works.
-Detach nic, also works.
-Attach nic, does not work.
What should be my next steps?
p.s. - could be related, I’ve yet to find an explanation but there are times when a VM will have incredibly slow speeds AFTER contextualization. Booting from ISO and not a template is fine. The work around (sometimes) is to live migrate to another hypervisor to ‘snap it out of it’s funk’
TIA! Logs below.
Thu Jan 18 13:36:53 2018 [Z0][VM][I]: New LCM state is HOTPLUG_NIC
Thu Jan 18 13:36:53 2018 [Z0][VMM][I]: ExitCode: 0
Thu Jan 18 13:36:53 2018 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Thu Jan 18 13:36:53 2018 [Z0][VMM][I]: ExitCode: 0
Thu Jan 18 13:36:53 2018 [Z0][VMM][I]: Successfully execute virtualization driver operation: attach_nic.
Thu Jan 18 13:36:53 2018 [Z0][VMM][I]: ExitCode: 0
Thu Jan 18 13:36:53 2018 [Z0][VMM][I]: Successfully execute network driver operation: post.
Thu Jan 18 13:36:53 2018 [Z0][VMM][I]: ExitCode: 0
Thu Jan 18 13:36:53 2018 [Z0][VMM][I]: Successfully execute virtualization driver operation: prereconfigure.
Thu Jan 18 13:36:54 2018 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_context.
Thu Jan 18 13:36:54 2018 [Z0][VMM][I]: ExitCode: 0
Thu Jan 18 13:36:54 2018 [Z0][VMM][I]: Successfully execute virtualization driver operation: reconfigure.
Thu Jan 18 13:36:54 2018 [Z0][VMM][I]: VM NIC Successfully attached.
Thu Jan 18 13:36:54 2018 [Z0][VM][I]: New LCM state is RUNNING
Thu Jan 18 13:37:17 2018 [Z0][VM][I]: New LCM state is HOTPLUG_NIC
Thu Jan 18 13:37:22 2018 [Z0][VMM][I]: ExitCode: 0
Thu Jan 18 13:37:22 2018 [Z0][VMM][I]: Successfully execute virtualization driver operation: detach_nic.
Thu Jan 18 13:37:22 2018 [Z0][VMM][I]: ExitCode: 0
Thu Jan 18 13:37:22 2018 [Z0][VMM][I]: Successfully execute network driver operation: clean.
Thu Jan 18 13:37:22 2018 [Z0][VMM][I]: VM NIC Successfully detached.
Thu Jan 18 13:37:22 2018 [Z0][VM][I]: New LCM state is RUNNING
Thu Jan 18 13:37:28 2018 [Z0][VM][I]: New LCM state is HOTPLUG_NIC
Thu Jan 18 13:37:29 2018 [Z0][VMM][I]: ExitCode: 0
Thu Jan 18 13:37:29 2018 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Thu Jan 18 13:37:29 2018 [Z0][VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/attach_nic ‘one-361’ ‘02:00:26:41:f2:b0’ ‘brpublic’ ‘virtio’ ‘dummy’ ‘one-361-2’ 361 ac-hv-06
Thu Jan 18 13:37:29 2018 [Z0][VMM][E]: attach_nic: Command “virsh --connect qemu:///system attach-device one-361 <(
Thu Jan 18 13:37:29 2018 [Z0][VMM][I]: cat <Thu Jan 18 13:37:29 2018 [Z0][VMM][I]:
Thu Jan 18 13:37:29 2018 [Z0][VMM][I]:
Thu Jan 18 13:37:29 2018 [Z0][VMM][I]:
Thu Jan 18 13:37:29 2018 [Z0][VMM][I]:
Thu Jan 18 13:37:29 2018 [Z0][VMM][I]:
Thu Jan 18 13:37:29 2018 [Z0][VMM][I]:
Thu Jan 18 13:37:29 2018 [Z0][VMM][I]:
Thu Jan 18 13:37:29 2018 [Z0][VMM][I]: EOT
Thu Jan 18 13:37:29 2018 [Z0][VMM][I]: )” failed: error: Failed to attach device from /dev/fd/63
Thu Jan 18 13:37:29 2018 [Z0][VMM][I]: error: Unable to create tap device one-361-2: Device or resource busy
Thu Jan 18 13:37:29 2018 [Z0][VMM][E]: Could not attach (one-361-2) to one-361
Thu Jan 18 13:37:29 2018 [Z0][VMM][I]: ExitCode: 1
Thu Jan 18 13:37:29 2018 [Z0][VMM][I]: Failed to execute virtualization driver operation: attach_nic.
Thu Jan 18 13:37:29 2018 [Z0][VMM][E]: Error attaching new VM NIC: Could not attach (one-361-2) to one-361
Thu Jan 18 13:37:29 2018 [Z0][VM][I]: New LCM state is RUNNING