:: Re: [DNG] VM not running after kern…
Top Page
Delete this message
Reply to this message
Author: Marc Shapiro
Date:  
To: dng
Subject: Re: [DNG] VM not running after kernel update
On 4/4/25 11:12 AM, Daniel Abrecht via Dng wrote:
> I can't tell what exactly is wrong on your machine, but I can say for
> certain that updating only the kernel can not break anything in such a
> way. There has to be something wrong with libvirt or it's configuration.
>
> libvirt manager talks to libvirt, libvirt stores the config and starts
> qemu. It is possible to use qemu without libvirt, but let's try just
> fixing this for now.
> The "network 'default'" refers to the network configuration which is
> named 'default', and is managed by libvirt. The 'default' one comes,
> as the name suggests, by default with the libvirt installation. It is
> possible to remove or modify it, though.
> These network configs can include various things. Bridges, NAT, dhcp,
> etc. VMs can then use one of those configs. They must be active for
> that, though. When a network config is activated, it sets up the
> bridges and stuff which VMs can then later use.
>
> If you have virsh installed, you can easily list the networks using
> `virsh net-list --all`. On my system, that looks like this:
>
> daniel@jerboa:~$ virsh net-list --all
>  Name      State      Autostart   Persistent
> ----------------------------------------------
>  default   inactive   no          yes
>  dmz       active     yes         yes
>  iot       active     yes         yes
>  lan       active     yes         yes
>
> As you can see, I don't actually use the default network, so I haven't
> started it, but you probably need to start it on your system. On my
> system, the default network config looks like this:
>
> daniel@jerboa:~$ virsh net-dumpxml default
> <network>
>   <name>default</name>
>   <uuid>1c88998c-27a7-4423-9f74-4940c6bcc479</uuid>
>   <forward mode='nat'/>
>   <bridge name='virbr0' stp='on' delay='0'/>
>   <mac address='52:54:00:e4:10:24'/>
>   <ip address='192.168.122.1' netmask='255.255.255.0'>
>     <dhcp>
>       <range start='192.168.122.2' end='192.168.122.254'/>
>     </dhcp>
>   </ip>
> </network>
>
> So it'd create a bridge (think of it like a switch), does NAT (so this
> works a lot like a router), and uses dhcp to give VMs an address.
>
> Now to how to fix this. First, try to start the default network. You
> can do this using `virsh net-start default`.
> You probably also want it to start automatically when libvirt or the
> system starts, that can be enabled using `virsh net-autostart default`.
>
> If you're lucky, maybe that's all that needs to be done. The default
> network just wasn't set to autostart, so it didn't start after the
> reboot, and you couldn't start the VM because it needed that network.


Almost.  The default network is now started, and set to autostart.  That
done, virtual manager was unable to find the VM file.  There doesn't
seem to be a way to tell it that the file is not in its standard
location.  My VMs are on a separate partition (which I used to mount  on
/usr/local/vdisks/) that I must have unmounted and remounted on
/var/lib/libvirt/images, but forgot to change /etc/fstab to make it
permanent.  That is also done, now.

Thanks for the help.  My VM is working, now, and should continue to do so.

Marc