GNU/Linux >> LINUX-Kenntnisse >  >> Cent OS

So erhöhen Sie die KVM-Gastspeicherressourcen

Dieser Beitrag veranschaulicht die Schritte zum Erhöhen des KVM-Gastspeichers. Wenn der aktuelle Arbeitsspeicher des KVM-Gasts dem Arbeitsspeicherlimit entspricht, können Sie den Arbeitsspeicher mithilfe der folgenden Schritte offline erhöhen:

1. Überprüfen Sie den aktuellen Speicherstatus des KVM-Gasts:

[root@kvm-host]# virsh dumpxml kvm-guest | grep -i memory
<memory unit='KiB'>8392704</memory>                   ### the maximum amount of memory that can be allocated to the VM
<currentMemory unit='KiB'>8392704</currentMemory>     ### current Guest VM memory
[root@kvm-host]# virsh dominfo kvm-guest
Id: 12
Name: kvm-guest
UUID: 8f6fc48c-a6f4-429d-b77e-88a4b8d3d961
OS Type: hvm
State: running
CPU(s): 4
CPU time: 429.8s
Max memory: 8392704 KiB
Used memory: 8392704 KiB
Persistent: yes
Autostart: disable
Managed save: no
Security model: selinux
Security DOI: 0
Security label: system_u:system_r:svirt_t:s0:c339,c981 (enforcing)
[root@kvm-host]# virsh dominfo kvm-guest
Id: 12
Name: kvm-guest
UUID: 8f6fc48c-a6f4-429d-b77e-88a4b8d3d961
OS Type: hvm
State: running
CPU(s): 4
CPU time: 429.8s
Max memory: 8392704 KiB
Used memory: 8392704 KiB
Persistent: yes
Autostart: disable
Managed save: no
Security model: selinux
Security DOI: 0
Security label: system_u:system_r:svirt_t:s0:c339,c981 (enforcing)

2. Fahren Sie die Gast-VM herunter:

[root@kvm-host]# virsh list
Id Name State
----------------------------------------------------
12 kvm-guest running
[root@kvm-host]# virsh destroy kvm-guest
Domain kvm-guest destroyed
[root@kvm-host]# virsh list
Id Name State
----------------------------------------------------

3. Speicher aktualisieren:

# virsh edit guest_vm

Zum Beispiel:

[root@kvm-host]# virsh edit kvm-guest
Domain kvm-guest XML configuration edited.

Von:

<memory unit='KiB'>8392704</memory>
<currentMemory unit='KiB'>8392704</currentMemory>

An:

<memory unit='KiB'>16777216</memory>
<currentMemory unit='KiB'>16777216</currentMemory>

4. Booten Sie die Gast-VM:

[root@kvm-host]# virsh start kvm-guest
Domain kvm-guest started

5. Prüfen Sie, ob der Speicher erhöht wurde:

Vom KVM-Host:

[root@kvm-host]# virsh dominfo kvm-guest
...
Name: kvm-guest
UUID: 8f6fc48c-a6f4-429d-b77e-88a4b8d3d961
Max memory: 16777216 KiB
Used memory: 16777216 KiB
...
[root@kvm-host]# virsh dumpxml kvm-guest |grep -i memo
<memory unit='KiB'>16777216</memory>
<currentMemory unit='KiB'>16777216</currentMemory>

Von Gast:

[root@localhost ~]# free -g
total used free shared buffers cached
Mem: 15 0 15 0 0 0
-/+ buffers/cache: 0 15
Swap: 3 0 3
So erhöhen Sie die vCPU-Ressourcen des KVM-Gasts


Cent OS
  1. So installieren Sie KVM unter CentOS 8 Linux

  2. So erhöhen Sie das PHP-Speicherlimit

  3. Linux – Wie kann man Maxsymlinks erhöhen?

  4. So deaktivieren Sie NUMA in CentOS / RHEL 6,7

  5. So mounten Sie das Qcow2 Virtual Disk-Image des Gasts, das LVM auf einer KVM-Host-Maschine enthält

So aktivieren Sie den Zugriff auf die Virsh-Konsole für KVM-Gäste

So erhöhen Sie Speicher und CPU auf Vagrant Machine

So installieren Sie KVM auf Manjaro 21

So installieren Sie KVM unter CentOS 8

Wie kann man das Timeout in Putty erhöhen?

Wie kann die angezeigte Bildschirmauflösung auf QEMU / KVM erhöht werden?