kvm虚拟机启动报错:libvirtError: Requested operation is not valid: network 'default' is not active

使用virt-manage启动虚拟机时报错:libvirtError: Requested operation is not valid: network 'default' is not active

详情如下:

动域时出错: Requested operation is not valid: network 'default' is not active

Traceback (most recent call last):

  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 88, in cb_wrapper

    callback(asyncjob, *args, **kwargs)

  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 124, in tmpcb

    callback(*args, **kwargs)

  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 83, in newfn

    ret = fn(self, *args, **kwargs)

  File "/usr/share/virt-manager/virtManager/domain.py", line 1404, in startup

    self._backend.create()

  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 1035, in create

    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)

libvirtError: Requested operation is not valid: network 'default' is not active


原因:

zdb@kylin-PC:~$ sudo virsh net-list --all

Name                State      Autostart    Persistent

----------------------------------------------------------

default              inactive  no            yes

default网络没有自启动,导致出错。


解决办法:

zdb@kylin-PC:~$ sudo virsh net-start default

Network default started

zdb@kylin-PC:~$ sudo virsh net-autostart  default

Network default marked as autostarted

你可能感兴趣的:(kvm虚拟机启动报错:libvirtError: Requested operation is not valid: network 'default' is not active)