Cockpit VirtMachine Error

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Cockpit VirtMachine Error

      I posted over the weekend about my problem accessing Cockpit, which I found the solution to shortly after posting. However, I have run into a separate issue in Cockpit related to the Virtual Machines tab. I tried to create a new virtual machine (a basic Ubuntu machine) and received an error:

      ERROR Requested operation is not valid: network 'default' is not active Domain installation does not appear to have been successful. If it was, you can restart your domain by running: virsh --connect qemu:///system start Ubuntu otherwise, please restart your installation.

      This led me to this guide, which seemed promising. But when I got to entering the virsh net-start default command, it threw this error:

      error: Failed to start network default error: internal error: Failed to initialize a valid firewall backend

      When I run virsh net-list --all, I get this:

      Name State Autostart Persistent
      ----------------------------------------------------------
      default inactive no yes

      Some of the "solutions" I found suggest installing firewalld and a handful of other packages, but once I installed firewalld I immediately lost access to the OMV web GUI and shellinabox. I have since uninstalled firewalld. Do I need to install and configure firewalld somehow in order to get Cockpit to allow me to install virtual machines? I have been searching for hours and have yet to find anything helpful except a post from December that doesn't really have a solution that I can understand. I tried the virsh # net-define /root/default.xml command but that just got me into the virsh terminal, which I have no idea how to use.

      Anybody have any suggestions? ?(

      Thanks in advance!
    • jollyrogr wrote:

      Did you run the virsh command as root? redhat.com/archives/libvirt-us…15-December/msg00005.html

      Libvirt wiki: wiki.libvirt.org/page/Networking
      Thanks for the reply. Yes, I was logged in as root.

      I had seen the Libvirt wiki, however,I'm not sure how to approach this issue and I'm worried about screwing something up.

      Do I need to do any port forwarding in order to get certain features in Cockpit to work?
    • New

      Had the same error, for fixing your error:
      apt-get install dnsmasq
      apt-get install ebtables //should be installed
      virsh net-start default
      systemctl restart libvirtd
      then you need to grant access to the iso file...
      chmod go+rx /your/path/to/the/iso/folder
      chmod o-rwx /your/path/to/the/iso/folder/*

      BUT then you will probably get an error that libvirt cannot connect to the vnc server...

      I am stuck there -.-

      The post was edited 1 time, last by djakupov ().

    • New

      Ok I made it. You can then start the vm by editing the XML of the VM. When you create you VM in cockpit ssh to your host and type "virsh edit YourVMName"

      Go the vnc node with " <graphics type='vnc' port='5901' autoport='no' listen='127.0.0.1'>" change autoport to no and set the desired port. I guess you need to make this step for every vm.

      More over I uncommented in /etc/libvirt/qemu.conf user and group so libvirt is being started with root rights
    • New

      djakupov wrote:

      Go the vnc node with " <graphics type='vnc' port='5901' autoport='no' listen='127.0.0.1'>" change autoport to no and set the desired port. I guess you need to make this step for every vm.
      OK, this makes sense, I just have one question. Is there a way to change the IP Cockpit uses? For some reason it says 127.0.0.1 when my network uses 10.0.0.1. Or is this unrelated? I couldn't find a way to change it in the Cockpit web GUI so I'm wondering if there's a way to do it globally via command line.