[one-users] Error while hot adding virtio nic model to VM

kiran ranjane kiran.ranjane at gmail.com
Wed Aug 27 06:52:20 PDT 2014


Hi Javier,

Restarted ONE and Sunstone-server service and now I am able to hot attach
virtio nic model.

Thanks for you help

Regards
Kiran Ranjane


On Wed, Aug 27, 2014 at 7:09 PM, kiran ranjane <kiran.ranjane at gmail.com>
wrote:

> Hi Javier,
>
> I have upgraded to latest libvirt version also applied patch to the file
> still getting same error. Do I need to restart any other service?
>
> *Restarted Service* :
>
> sudo service apparmor restart
> sudo service libvirt-bin restart
>
>
> libvirtd --version
> libvirtd (libvirt) 1.2.7
>
>
> Added patch to /etc/apparmor.d/abstractions/libvirt-qemu
>
>   # this is needed with libcap-ng support, however it breaks a lot of
> things
>   # atm, so just silence the denial until libcap-ng works right. LP:
> #522845
>   deny capability setpcap,
>
>   network inet stream,
>   network inet6 stream,
>
>   /dev/net/tun rw,
>   /dev/tap* rw,
>   /dev/kvm rw,
>   /dev/ptmx rw,
>   /dev/kqemu rw,
>   /dev/vhost-net rw,
>   @{PROC}/*/status r,
>   owner @{PROC}/*/auxv r,
>   @{PROC}/sys/vm/overcommit_memory r,
>
>   # For hostdev access. The actual devices will be added dynamically
>   /sys/bus/usb/devices/ r,
>   /sys/devices/**/usb[0-9]*/** r,
>
>   # WARNING: this gives the guest direct access to host hardware and
> specific
>
>
> Regards
> Kiran Ranjane
>
>
>
> On Wed, Aug 27, 2014 at 6:36 PM, Javier Fontan <jfontan at opennebula.org>
> wrote:
>
>> It seems to be a bug in libvirt from Ubuntu 14.04. There is a fixed
>> pakage in the trusty-proposed repo. You can try adding the
>> ubuntu-proposed repo and upgrading libvirt or try applying this patch
>>
>> https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1322568/comments/3
>>
>> The bug report is here:
>>
>> https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1322568
>>
>> On Wed, Aug 27, 2014 at 2:51 PM, kiran ranjane <kiran.ranjane at gmail.com>
>> wrote:
>> > Yes, it made libvirt unusable and had to install apparmor it again.
>> >
>> > Tried again on a linux VM got the same error :
>> >
>> > Wed Aug 27 18:20:33 2014 [Z0][VMM][I]: Successfully execute network
>> driver
>> > operation: pre.
>> > Wed Aug 27 18:20:33 2014 [Z0][VMM][I]: Command execution fail:
>> > /var/tmp/one/vmm/kvm/attach_nic 'one-30' '02:00:c0:a8:7a:13' 'virbr0'
>> > 'virtio' 'dummy' 30 kvm-node
>> > Wed Aug 27 18:20:33 2014 [Z0][VMM][E]: attach_nic: Command "virsh
>> --connect
>> > qemu:///system attach-device one-30 <(
>> > Wed Aug 27 18:20:33 2014 [Z0][VMM][I]: cat <<EOT
>> > Wed Aug 27 18:20:33 2014 [Z0][VMM][I]: <interface type='bridge'>
>> > Wed Aug 27 18:20:33 2014 [Z0][VMM][I]: <source bridge='virbr0'/>
>> > Wed Aug 27 18:20:33 2014 [Z0][VMM][I]: <mac
>> address='02:00:c0:a8:7a:13'/>
>> > Wed Aug 27 18:20:33 2014 [Z0][VMM][I]: <model type='virtio'/>
>> > Wed Aug 27 18:20:33 2014 [Z0][VMM][I]:
>> > Wed Aug 27 18:20:33 2014 [Z0][VMM][I]: </interface>
>> > Wed Aug 27 18:20:33 2014 [Z0][VMM][I]: EOT
>> > Wed Aug 27 18:20:33 2014 [Z0][VMM][I]: )" failed: error: Failed to
>> attach
>> > device from /dev/fd/63
>> > Wed Aug 27 18:20:33 2014 [Z0][VMM][I]: error: internal error: unable to
>> > execute QEMU command 'getfd': No file descriptor supplied via SCM_RIGHTS
>> > Wed Aug 27 18:20:33 2014 [Z0][VMM][E]: Could not attach () to one-30
>> > Wed Aug 27 18:20:33 2014 [Z0][VMM][I]: ExitCode: 1
>> > Wed Aug 27 18:20:33 2014 [Z0][VMM][I]: Failed to execute virtualization
>> > driver operation: attach_nic.
>> > Wed Aug 27 18:20:33 2014 [Z0][VMM][E]: Error attaching new VM NIC:
>> Could not
>> > attach () to one-30
>> >
>> >
>> > On Wed, Aug 27, 2014 at 6:12 PM, Javier Fontan <jfontan at opennebula.org>
>> > wrote:
>> >>
>> >> You can try but I think disabling apparmor will make libvirt unusable.
>> >> I'm not sure about it.
>> >>
>> >> On Wed, Aug 27, 2014 at 2:20 PM, kiran ranjane <
>> kiran.ranjane at gmail.com>
>> >> wrote:
>> >> > Hi Javier,
>> >> >
>> >> > I am using Ubuntu 14.04 as host OS, Do you want me to disable
>> apparmor?
>> >> >
>> >> > Regards
>> >> > Kiran Ranjane
>> >> >
>> >> >
>> >> > On Wed, Aug 27, 2014 at 5:44 PM, Javier Fontan <
>> jfontan at opennebula.org>
>> >> > wrote:
>> >> >>
>> >> >> There seems to be a problem related with libvirt and selinux. Can
>> you
>> >> >> try disabling SElinux and doing the attach again? Virtio nic attach
>> is
>> >> >> supported.
>> >> >>
>> >> >> On Fri, Aug 22, 2014 at 2:01 PM, kiran ranjane
>> >> >> <kiran.ranjane at gmail.com>
>> >> >> wrote:
>> >> >> > Hello Everyone,
>> >> >> >
>> >> >> > I am getting error while hot plugging virtio nic model to VM
>> >> >> > One 4.8
>> >> >> > Host - Ubuntu 14.04
>> >> >> > VM -  Windows 2008 R2 (Virtio Drivers already install in the VM)
>> >> >> >
>> >> >> >
>> >> >> > Fri Aug 22 17:22:41 2014 [Z0][VMM][I]: Command execution fail:
>> >> >> > /var/tmp/one/vmm/kvm/attach_nic 'one-15' '02:00:c0:a8:7a:08'
>> 'virbr0'
>> >> >> > 'virtio' 'dummy' 15 kvm-node
>> >> >> > Fri Aug 22 17:22:41 2014 [Z0][VMM][E]: attach_nic: Command "virsh
>> >> >> > --connect
>> >> >> > qemu:///system attach-device one-15 <(
>> >> >> > Fri Aug 22 17:22:41 2014 [Z0][VMM][I]: cat <<EOT
>> >> >> > Fri Aug 22 17:22:41 2014 [Z0][VMM][I]: <interface type='bridge'>
>> >> >> > Fri Aug 22 17:22:41 2014 [Z0][VMM][I]: <source bridge='virbr0'/>
>> >> >> > Fri Aug 22 17:22:41 2014 [Z0][VMM][I]: <mac
>> >> >> > address='02:00:c0:a8:7a:08'/>
>> >> >> > Fri Aug 22 17:22:41 2014 [Z0][VMM][I]: <model type='virtio'/>
>> >> >> > Fri Aug 22 17:22:41 2014 [Z0][VMM][I]:
>> >> >> > Fri Aug 22 17:22:41 2014 [Z0][VMM][I]: </interface>
>> >> >> > Fri Aug 22 17:22:41 2014 [Z0][VMM][I]: EOT
>> >> >> > Fri Aug 22 17:22:41 2014 [Z0][VMM][I]: )" failed: error: Failed to
>> >> >> > attach
>> >> >> > device from /dev/fd/63
>> >> >> > Fri Aug 22 17:22:41 2014 [Z0][VMM][I]: error: internal error:
>> unable
>> >> >> > to
>> >> >> > execute QEMU command 'getfd': No file descriptor supplied via
>> >> >> > SCM_RIGHTS
>> >> >> > Fri Aug 22 17:22:41 2014 [Z0][VMM][E]: Could not attach () to
>> one-15
>> >> >> > Fri Aug 22 17:22:41 2014 [Z0][VMM][I]: ExitCode: 1
>> >> >> > Fri Aug 22 17:22:41 2014 [Z0][VMM][I]: Failed to execute
>> >> >> > virtualization
>> >> >> > driver operation: attach_nic.
>> >> >> > Fri Aug 22 17:22:41 2014 [Z0][VMM][E]: Error attaching new VM NIC:
>> >> >> > Could
>> >> >> > not
>> >> >> > attach () to one-15
>> >> >> >
>> >> >> > Regards
>> >> >> > Kiran Ranjane
>> >> >> >
>> >> >> > _______________________________________________
>> >> >> > Users mailing list
>> >> >> > Users at lists.opennebula.org
>> >> >> > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Javier Fontán Muiños
>> >> >> Developer
>> >> >> OpenNebula - Flexible Enterprise Cloud Made Simple
>> >> >> www.OpenNebula.org | @OpenNebula | github.com/jfontan
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Javier Fontán Muiños
>> >> Developer
>> >> OpenNebula - Flexible Enterprise Cloud Made Simple
>> >> www.OpenNebula.org | @OpenNebula | github.com/jfontan
>> >
>> >
>>
>>
>>
>> --
>> Javier Fontán Muiños
>> Developer
>> OpenNebula - Flexible Enterprise Cloud Made Simple
>> www.OpenNebula.org | @OpenNebula | github.com/jfontan
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20140827/aad1c44e/attachment-0001.htm>


More information about the Users mailing list