07-12-周日_11-38-48

This commit is contained in:
AaronXu
2026-07-12 11:38:48 +08:00
parent f6c4fd2f99
commit 0af872fe15
3 changed files with 13 additions and 11 deletions

View File

@@ -321,13 +321,14 @@ tmpfs 1.6G 84K 1.6G 1% /run/user/0
```bash ```bash
[root@localhost ~]# virt-install \ [root@localhost ~]# virt-install \
--connect qemu:///system \ --connect qemu:///system \
--name vm1 \ --name ubuntu-22.04-1 \
--memory 2048 \ --memory 4096 \
--vcpus 2 \ --vcpus 4 \
--disk path=/var/lib/libvirt/images/vm1.img,size=8 \ --disk path=/var/lib/libvirt/images/ubuntu-22.04-1.qcow2,size=20,bus=virtio \
--os-variant rhel9.0 \ --os-variant ubuntu22.04 \
--cdrom /var/lib/libvirt/Rocky-9.7-x86_64-dvd.iso \ --cdrom /var/lib/libvirt/ubuntu-22.04.5-live-server-amd64_1.iso \
--graphics vnc,listen=0.0.0.0,port=5905 \ --boot cdrom,hd,bootmenu.enable=on \
--graphics vnc,listen=0.0.0.0,port=5905,password='123' \
--noautoconsole --noautoconsole
``` ```
@@ -356,20 +357,21 @@ tmpfs 1.6G 84K 1.6G 1% /run/user/0
```bash ```bash
[root@localhost ~]# yum install cockpit -y [root@localhost ~]# yum install cockpit -y
[root@localhost ~]# yum -y install cockpit-machines
[root@localhost ~]# vim /etc/cockpit/disallowed-users [root@localhost ~]# vim /etc/cockpit/disallowed-users
#root #root
[root@localhost ~]# systemctl start cockpit [root@localhost ~]# systemctl enable --now cockpit
``` ```
访问9090端口 访问9090端口
<img src="KVM%E8%99%9A%E6%8B%9F%E5%8C%96%E6%8A%80%E6%9C%AF/image-20240817214618130.png" alt="image-20240817214618130" style="zoom:80%;" /> ![image-20260712113626463](KVM虚拟化技术/image-20260712113626463.png)
创建虚拟机 创建虚拟机
这里就不演示具体过程了,这种方法用的比较少 ![image-20260712113638529](KVM虚拟化技术/image-20260712113638529.png)
<img src="KVM%E8%99%9A%E6%8B%9F%E5%8C%96%E6%8A%80%E6%9C%AF/image-20240817214704100.png" alt="image-20240817214704100" style="zoom:80%;" />
# KVM基础管理 # KVM基础管理

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB