Я пробую что-то похожее на http://wiki.libvirt.org/page/QEMUSwitchToLibvirt#-s . Это мой xml-файл:
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>rubis_ws</name>
<uuid>1a474ca9-604f-aceb-2fed-792fe1e9f900</uuid>
<memory>1048576</memory>
<currentMemory>1048576</currentMemory>
<vcpu>2</vcpu>
<os>
<type arch='x86_64' machine='rhel5.4.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'>
<timer name='pit' tickpolicy='delay'/>
</clock>
<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='qcow2' cache='none'/>
<source file='/root/incremental.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<controller type='ide' index='0'/>
<interface type='bridge'>
<mac address='00:16:3e:98:78:04'/>
<source bridge='br0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
<video>
<model type='cirrus' vram='9216' heads='1'/>
</video>
</devices>
<qemu:commandline>
<qemu:arg value='-s'/>
</qemu:commandline>
</domain>
Я запускаю виртуальную машину из этого xml файла. Теперь, когда я выполняю «ps aux | grep rubis», я получаю:
корень 13496 59.1 3.5 1266168 292112? Sl 16:50 0:23 / usr / libexec / qemu-kvm -S -M rhel5.4.0 -m 1024 -smp 2, sockets = 2, cores = 1, thread = 1 -name rubis_ws -uuid 1a474ca9-604f-aceb -2fed-792fe1e9f900 -monitor unix: /var/lib/libvirt/qemu/rubis_ws.monitor,server,nowait -no-kvm-pit-reinjection -boot c -drive file = / root / incremental.img, if = ide, bus = 0, unit = 0, boot = on, format = qcow2, cache = none -net nic, macaddr = 00: 16: 3e: 98: 78: 04, vlan = 0 -net tap, fd = 18, vlan = 0 -serial pty -parallel none -usb -vnc 127.0.0.1:0 -k en-us -vga cirrus -balloon virtio
корень 13531 0,0 0,0 61192 760 точек / 5 S + 16:51 0:00 grep rubis
Я не могу найти -s в этой команде. Не могли бы вы сообщить мне, делаю ли я какую-нибудь ошибку? Я застрял в этом долгое время, не зная, как его решить. Моя конечная цель - заставить этот аргумент команды работать и использовать его для тега -incoming, используя аргумент командной строки qemu с libvirt.
Спасибо за вашу помощь.
на каком дистрибутиве вы это делаете? Возможно, ваша сборка libvirt слишком старая, чтобы поддерживать эту опцию