Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not create domain with virt-install #70

Open
tuxpeople opened this issue May 3, 2021 · 2 comments
Open

Could not create domain with virt-install #70

tuxpeople opened this issue May 3, 2021 · 2 comments

Comments

@tuxpeople
Copy link

This is what I try:

[root@lab1 ~]# kvm-install-vm create -c 2 -m 2048 -d 20 -v foo4
- Copying cloud image (CentOS-8-GenericCloud-8.1.1911-20200113.3.x86_64.qcow2) ... OK
- Resizing the disk to 20G ... OK
- Generating ISO for cloud-init ... OK
- Creating storage pool with the following command
    virsh  \
     pool-create-as  \
     --name=foo4  \
     --type=dir  \
     --target=/data/virt/vms/foo4
OK
- Installing the domain with the following command
    virt-install  \
     --import  \
     --name=foo4  \
     --memory=2048  \
     --vcpus=2  \
     --cpu=host  \
     --disk=foo4.qcow2,format=qcow2,bus=virtio  \
     --disk=foo4-cidata.iso  \
     --network=bridge=bridge99,model=virtio  \
     --os-type=linux  \
     --os-variant=centos8  \
     --noautoconsole  \
     --graphics=spice,port=-1,listen=localhost
ERR: Could not create domain with virt-install.

Even with -v, not that much of information. Let's try it manually by copying the command from above:

[root@lab1 ~]#     virt-install  \
>      --import  \
>      --name=foo4  \
>      --memory=2048  \
>      --vcpus=2  \
>      --cpu=host  \
>      --disk=foo4.qcow2,format=qcow2,bus=virtio  \
>      --disk=foo4-cidata.iso  \
>      --network=bridge=bridge99,model=virtio  \
>      --os-type=linux  \
>      --os-variant=centos8  \
>      --noautoconsole  \
>      --graphics=spice,port=-1,listen=localhost
ERROR    Fehler: --disk foo4.qcow2,format=qcow2,bus=virtio: Size must be specified for non existent volume 'foo4.qcow2'

Is it me, using it wrong or is it a bug?

@eayin2
Copy link

eayin2 commented Jun 20, 2021

You need to check in libvirtd logs, for systemd e.g.: journalctl -u libvirtd -n 1000 -f. Maybe the bridge bridge99 tied to the physical NIC didn't exist yet, then it fails to setup the network.

@H--o-l
Copy link
Contributor

H--o-l commented Jun 23, 2021

Same issue here since I update to Fedora 34.
For me journalctl -u libvirtd -n 1000 -f give the following:

-- Boot 96183c7b2a98412ab4c228b37c9658e2 --
juin 23 09:20:38 fedora systemd[1]: Starting Virtualization daemon...
juin 23 09:20:38 fedora systemd[1]: Started Virtualization daemon.
juin 23 09:20:38 fedora libvirtd[1256]: libcap-ng used by "/usr/sbin/libvirtd" failed due to not having CAP_SETPCAP in capng_apply
juin 23 09:20:38 fedora libvirtd[1258]: libcap-ng used by "/usr/sbin/libvirtd" failed due to not having CAP_SETPCAP in capng_apply
juin 23 09:22:38 fedora systemd[1]: libvirtd.service: Deactivated successfully.

I find these two upstream bugs report:
https://bugzilla.redhat.com/show_bug.cgi?id=1924218
https://bugzilla.redhat.com/show_bug.cgi?id=1952715#c4

Didn't find a workaround for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants