![Qemu 中的遷移失敗,錯誤為“未知 ramblock“mem1”,無法接受遷移”,但它存在於來源上](https://rvso.com/image/769300/Qemu%20%E4%B8%AD%E7%9A%84%E9%81%B7%E7%A7%BB%E5%A4%B1%E6%95%97%EF%BC%8C%E9%8C%AF%E8%AA%A4%E7%82%BA%E2%80%9C%E6%9C%AA%E7%9F%A5%20ramblock%E2%80%9Cmem1%E2%80%9D%EF%BC%8C%E7%84%A1%E6%B3%95%E6%8E%A5%E5%8F%97%E9%81%B7%E7%A7%BB%E2%80%9D%EF%BC%8C%E4%BD%86%E5%AE%83%E5%AD%98%E5%9C%A8%E6%96%BC%E4%BE%86%E6%BA%90%E4%B8%8A.png)
我正在嘗試遷移 QEMU 中的虛擬機,在將內存熱插拔到虛擬機後,我無法遷移它,並且我面臨著Unknown ramblock "mem1", cannot accept migration
這個名稱沒問題並且它確實存在於遷移源中的情況。源和目標的參數為:
來源:
-name mig-test3.compute,debug-threads=on
-machine q35,accel=kvm,dump-guest-core=off
-cpu host
-smp cores=1,maxcpus=64
-m slots=32,maxmem=262144M,size=2048M
-mem-path /dev/hugepages
-monitor none
-pidfile /opt/feynman/qemu/compute/mig-test3/pid
-chardev socket,server,nowait,id=manager-socket,path=/opt/feynman/qemu/compute/mig-test3/manager.sock
-mon manager-socket,id=manager-monitor,mode=control
-chardev socket,id=mertics-socket,path=/opt/feynman/qemu/compute/mig-test3/metrics.sock,server,nowait
-mon mertics-socket,id=metrics-monitor,mode=control
-chardev socket,server,nowait,id=snapshot-socket,path=/opt/feynman/qemu/compute/mig-test3/snapshot.sock
-mon snapshot-socket,id=snapshot-monitor,mode=control
-chardev socket,id=ops-qmp-socket,path=/opt/feynman/qemu/compute/mig-test3/ops-qmp.sock,server,nowait
-mon ops-qmp-socket,id=ops-qmp-monitor,mode=control
-chardev socket,path=/opt/feynman/qemu/compute/mig-test3/ops-rl.sock,server,nowait,id=ops-rl-socket
-mon ops-rl-socket,id=ops-rl-monitor,mode=readline -vnc :234
-chardev socket,id=qemu-guest-agent,path=/opt/feynman/qemu/compute/mig-test3/guest-agent.sock,server,nowait
-device virtio-serial
-device virtserialport,name=org.qemu.guest_agent.0,chardev=qemu-guest-agent
-device pcie-root-port,slot=4,chassis=0,addr=4.0,id=disk-reserved-pcie.0,multifunction=on
-device pcie-root-port,id=disk-reserved-pcie.1,slot=4,chassis=1,addr=4.1
-device pcie-root-port,chassis=2,addr=4.2,id=disk-reserved-pcie.2,slot=4
-device pcie-root-port,slot=4,chassis=3,addr=4.3,id=disk-reserved-pcie.3
-device pcie-root-port,slot=4,chassis=4,addr=4.4,id=disk-reserved-pcie.4
-device pcie-root-port,slot=4,chassis=5,addr=4.5,id=disk-reserved-pcie.5
-device pcie-root-port,slot=4,chassis=6,addr=4.6,id=disk-reserved-pcie.6
-device pcie-root-port,slot=4,chassis=7,addr=4.7,id=disk-reserved-pcie.7
-drive format=qcow2,throttling.iops-read=390,cache=none,stats-intervals.0=30,if=none,throttling.iops-write=160,node-name=ld-R8FGNRBTAP1B1EKRKGBEMV91R0,throttling.bps-read-max=9437185,throttling.iops-write-max-length=30,throttling.bps-write-max-length=30,throttling.iops-write-max=320,throttling.bps-read=4608000,file=/opt/feynman/disks/compute/os-2aa293e149614b849f9b0311c39f3706/initial.qcow2,throttling.iops-read-max=780,throttling.bps-write=4608000,throttling.bps-read-max-length=30,aio=native,throttling.iops-read-max-length=30,throttling.bps-write-max=9437185,index=0,id=virtio0
-device virtio-blk-pci,serial=R8FGNRBTAP1B1EKRKGBE,drive=virtio0
-drive media=cdrom,node-name=cloud-init,index=1,file=/opt/feynman/qemu/compute/mig-test3/cloudinit-429550438.iso,if=ide
-boot order=c
-smbios type=1
-netdev id=ln-0600063325cd,ifname=ln-0600063325cd,script=no,downscript=no,vhost=on,vnet_hdr=on,queues=2,type=tap
-device virtio-net-pci,mac=06:00:06:33:25:cd,mq=on,vectors=6,netdev=ln-0600063325cd
目的地:
-name mig-test3.compute,debug-threads=on
-machine q35,accel=kvm,dump-guest-core=off
-cpu host
-smp cores=1,maxcpus=64
-m maxmem=262144M,size=2048M,slots=32
-mem-path /dev/hugepages
-monitor none
-pidfile /opt/feynman/qemu/compute/mig-test3/pid
-chardev socket,server,id=manager-socket,nowait,path=/opt/feynman/qemu/compute/mig-test3/manager.sock
-mon manager-socket,id=manager-monitor,mode=control
-chardev socket,id=mertics-socket,nowait,path=/opt/feynman/qemu/compute/mig-test3/metrics.sock,server
-mon mertics-socket,id=metrics-monitor,mode=control
-chardev socket,nowait,path=/opt/feynman/qemu/compute/mig-test3/snapshot.sock,server,id=snapshot-socket
-mon snapshot-socket,id=snapshot-monitor,mode=control
-chardev socket,id=ops-qmp-socket,nowait,path=/opt/feynman/qemu/compute/mig-test3/ops-qmp.sock,server
-mon ops-qmp-socket,id=ops-qmp-monitor,mode=control
-chardev socket,nowait,path=/opt/feynman/qemu/compute/mig-test3/ops-rl.sock,server,id=ops-rl-socket
-mon ops-rl-socket,id=ops-rl-monitor,mode=readline
-vnc :623
-chardev socket,id=qemu-guest-agent,nowait,path=/opt/feynman/qemu/compute/mig-test3/guest-agent.sock,server
-device virtio-serial
-device virtserialport,chardev=qemu-guest-agent,name=org.qemu.guest_agent.0
-device pcie-root-port,multifunction=on,slot=4,addr=4.0,chassis=0,id=disk-reserved-pcie.0
-device pcie-root-port,id=disk-reserved-pcie.1,slot=4,addr=4.1,chassis=1
-device pcie-root-port,addr=4.2,chassis=2,id=disk-reserved-pcie.2,slot=4
-device pcie-root-port,addr=4.3,chassis=3,id=disk-reserved-pcie.3,slot=4
-device pcie-root-port,addr=4.4,chassis=4,id=disk-reserved-pcie.4,slot=4
-device pcie-root-port,addr=4.5,chassis=5,id=disk-reserved-pcie.5,slot=4
-device pcie-root-port,addr=4.6,chassis=6,id=disk-reserved-pcie.6,slot=4
-device pcie-root-port,id=disk-reserved-pcie.7,slot=4,addr=4.7,chassis=7
-drive throttling.iops-read=390,file=/opt/feynman/disks/compute/os-2aa293e149614b849f9b0311c39f3706/initial.qcow2,throttling.bps-write-max-length=30,throttling.bps-read-max-length=30,throttling.bps-write=4608000,throttling.bps-write-max=9437185,throttling.iops-write=160,cache=none,node-name=ld-R8FGNRBTAP1B1EKRKGBEMV91R0,if=none,index=0,stats-intervals.0=30,throttling.bps-read=4608000,throttling.iops-read-max-length=30,throttling.iops-write-max-length=30,aio=native,format=qcow2,throttling.iops-read-max=780,throttling.iops-write-max=320,id=virtio0,throttling.bps-read-max=9437185
-device virtio-blk-pci,drive=virtio0,serial=R8FGNRBTAP1B1EKRKGBE
-drive file=/opt/feynman/qemu/compute/mig-test3/cloudinit-429550438.iso,if=ide,index=1,media=cdrom,node-name=cloud-init
-boot order=c
-smbios type=1
-netdev queues=2,script=no,type=tap,vhost=on,vnet_hdr=on,downscript=no,id=ln-0600063325cd,ifname=ln-0600063325cd
-device virtio-net-pci,mq=on,netdev=ln-0600063325cd,vectors=6,mac=06:00:06:33:25:cd
-device host-x86_64-cpu,node-id=0,core-id=0,thread-id=0,id=cpu1,socket-id=1
-object memory-backend-file,mem-path=/dev/hugepages,share=off,discard-data=on,id=mem1,size=2147483648
-device pc-dimm,id=pcdimm1,memdev=mem1
-incoming tcp:172.19.36.133:586a
我熱插拔了 1 個 CPU 和 2 GB 記憶體。它適用於 Qemu 5.0.0 和 Ubuntu 20.04。我在 Ubuntu 18.04 上的 QEMU 2.11.1 上遇到此問題,並且在升級時遇到問題。
答案1
我認為這可能是上游提交 fa0cb34d2210cc749b9a70db99bb41c56ad20831 修復的一個舊錯誤,其中一些內存對像被命名為 /object/name 而不僅僅是“name”