Ubuntu – Virt-Manager Error

18.04kvmqemuvirtualization

I've installed QEMU-KVM and Virt-manager according to this guide: https://linuxconfig.org/install-and-set-up-kvm-on-ubuntu-18-04-bionic-beaver-linux.

I can get pretty far until I reach step 4 of 5 when creating a new VM:

Uncaught error validating install parameters: Requested operation is not valid: storage pool 'default' is not active
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/create.py", line 1902, in _validate
return self._validate_storage_page()
File "/usr/share/virt-manager/virtManager/create.py", line 2218, in _validate_storage_page
self._guest.name, do_log=True)
File "/usr/share/virt-manager/virtManager/create.py", line 2210, in _get_storage_path
path = self._addstorage.get_default_path(vmname)
File "/usr/share/virt-manager/virtManager/addstorage.py", line 235, in get_default_path
suffix=suffix, collidelist=newcollidelist)
File "/usr/share/virt-manager/virtinst/storage.py", line 588, in find_free_name
pool_object.refresh(0)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3229, in refresh
if ret == -1: raise libvirtError ('virStoragePoolRefresh() failed', pool=self)
libvirtError: Requested operation is not valid: storage pool 'default' is not active

Best Answer

The storage pool must be active before the storage it contains can be used.

By default the storage pool named default is active and autostarted, but it might have been reconfigured on your system.

You can start it yourself with virsh, e.g., to start the pool:

sudo virsh pool-start default

And to mark the pool as autostarted at boot time:

sudo virsh pool-autostart default