Я нахожусь на хост-машине с Centos 6.5, qemu + KVM и 2 виртуальными хостами (за NAT). Оба виртуальных хоста были настроены с помощью диспетчера виртуальных машин (один из них работает с Windows 2003, а другой - с Centos 6.5), оба имеют фиксированную оперативную память (8 ГБ и 4 ГБ). У меня 2 проблемы / вопроса.
Если я настраиваю не фиксированный объем ОЗУ в Virt.manager (например, разрешаю использовать от 4 Гб до 8 Гб), моя виртуальная машина съедает всю доступную память на хост-машине (более 8 Гб)
В htop хост-машины я вижу не один процесс qemu для каждой виртуальной машины, а множество процессов одного и того же virt. машина. Что случилось?
Если я захожу в virt.machine и проверяю free -m, я вижу, что там много свободной памяти.
Добавлено (VM domxml):
<domain type='kvm'>
<name>myvm</name>
<uuid>27934a14-b54e-1e4e-65de-7f6d03b1e7ce</uuid>
<memory unit='KiB'>8388608</memory>
<currentMemory unit='KiB'>8388608</currentMemory>
<vcpu placement='static'>2</vcpu>
<os>
<type arch='x86_64' machine='rhel6.6.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/var/lib/libvirt/images/myvm.img'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</disk>
<disk type='block' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' target='0' unit='0'/>
</disk>
<controller type='usb' index='0' model='ich9-ehci1'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci1'>
<master startport='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci2'>
<master startport='2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci3'>
<master startport='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
</controller>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='network'>
<mac address='52:54:00:99:ee:4f'/>
<source network='default'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
<sound model='ich6'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</memballoon>
</devices>
</domain>
Добавлен вывод "ps -ef | grep myvm":
qemu 8105 1 21 апр 23? 06:23:05 / usr / libexec / qemu-kvm -name myvm -S -M rhel6.6.0 -enable-kvm -m 8192 -realtime mlock = off -smp 2, sockets = 2, cores = 1, thread = 1 -uuid 27934a14-b54e-1e4e-65de-7f6d03b1e7ce -nodefconfig -nodefaults -chardev socket, id = charmonitor, path = / var / lib / libvirt / qemu / myvm.monitor, server, nowait -mon chardev = charmonitor, id = monitor , mode = control -rtc base = utc -no-shutdown -device ich9-usb-ehci1, id = usb, bus = pci.0, addr = 0x5.0x7 -device ich9-usb-uhci1, masterbus = usb.0, firstport = 0, bus = pci.0, многофункциональный = on, addr = 0x5 -device ich9-usb-uhci2, masterbus = usb.0, firstport = 2, bus = pci.0, addr = 0x5.0x1 -device ich9- usb-uhci3, masterbus = usb.0, firstport = 4, bus = pci.0, addr = 0x5.0x2 -drive file = / var / lib / libvirt / images / myvm.img, if = none, id = drive- virtio-disk0, format = raw, cache = none -device virtio-blk-pci, scsi = off, bus = pci.0, addr = 0x6, drive = drive-virtio-disk0, id = virtio-disk0, bootindex = 1 -drive if = none, media = cdrom, id = drive-ide0-1-0, readonly = on, format = raw -device ide-drive, bus = ide.1, unit = 0, drive = drive-ide0-1 -0, id = ide0-1-0 -netdev tap, f d = 22, id = hostnet0, vhost = on, vhostfd = 23 -device virtio-net-pci, netdev = hostnet0, id = net0, mac = 52: 54: 00: 99: ee: 4f, bus = pci.0 , addr = 0x3 -chardev pty, id = charserial0 -device isa-serial, chardev = charserial0, id = serial0 -device usb-tablet, id = input0 -vnc 127.0.0.1:0 -vga cirrus -device intel-hda, id = sound0, bus = pci.0, addr = 0x4 -device hda-duplex, id = sound0-codec0, bus = sound0.0, cad = 0 -device virtio-balloon-pci, id = balloon0, bus = pci.0 , адрес = 0x7 -msg timestamp = on