ubuntu部署kvm
目录
1、修改虚拟机配置
2、查看是否支持虚拟化
3、下载KVM
3.1查看虚拟网络
4、安装cockpit
5、浏览器访问
1、修改虚拟机配置
内存和处理器的配置要稍微多一些
虚拟化的选项要勾选上
2、查看是否支持虚拟化
输入命令,有类似回复则说明支持虚拟化
3、下载KVM
我使用的是ubuntu主机,默认源下载速度比较慢,需要更换为阿里云的源
rm -rf /etc/apt/sources.list.d/*
cat > /etc/apt/sources.list <<-eof
deb https://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse
eof
apt install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virtinst virt-manager virt-viewer cpu-checker
3.1查看虚拟网络
4、安装cockpit
apt -y install cockpit cockpit-machines
修改配置文件,允许root用户登陆
vim /etc/cockpit/disallowed-users
重启服务
systemctl restart cockpit
5、浏览器访问
在浏览器输入你的IP:9090
点击高级,点击继续前往
密码就是你设备的root密码
这就是登陆进去的画面