在ubuntu22上安装webvirtcloud-docker
参考:MuratovAS/webvirtcloud-docker
https://github.com/MuratovAS/webvirtcloud-docker
Install
KVM config
/etc/libvirt/libvirtd.conf
unix_sock_rw_perms = "0770"
unix_sock_group = "libvirt"
auth_unix_rw = "none"
安装各种库,特别是libvirt-daemon-system
apt-get docker.io docker-compose install libvirt-dev libvirt-daemon libvirt-clients
qemu-kvm libvirt-daemon-system libvirt-daemon virtinst bridge-utils libosinfo-bin
Container construction
make build
After that, you will have the image muratovas/webvirtcloud
Subnetting
docker network create --driver=macvlan -o parent=virbr0 -o macvlan_mode=bridge kvm_net
docker network create internet
kvm_net - needed to communicate the container with the virtual machine (optional) internet - bridge to the subnet of your host machine
You need to find out the host ip in the subnet internet.
docker network inspect internet
Subsequently, register it in docker-compose.yml
environment:
KVM_HOST: "172.24.0.1"
Run
make start