libvirt - definice kvm stroje
Jan Kasprzak
kas na fi.muni.cz
Úterý Prosinec 2 22:32:49 CET 2008
Dobry den,
pouzivate nekdo libvirt/virsh pro spravu virtualnich stroju nad KVM?
Pokud ano, prosim o priklad konfigurace. Z prikazove radky normalne muzu
pustit
# qemu-kvm -net tap,script=/export/vm/vm-tap.up,tapname=tap0 -net nic,model=virtio -drive file=/export/vm/test.qcow2,if=virtio,boot=on -m 512M -monitor tcp:127.0.0.1:1234,server,nowait -daemonize -cdrom /tmp/Fedora-10-x86_64-netinst.iso -boot d -vnc :1
a pusti se stroj s instalatorem Fedory 10, ale nejsem schopen to prevest
do XML reci libvirtu. Zkousel jsem napriklad nize uvedeny soubor, ale
po "virsh create test.xml" se vzdycky dozvim akorat
libvir: Remote error : socket closed unexpectedly
error: Failed to create domain from test.xml
a nevim kde je chyba.
Muzete mi nekdo ukazat, jak se napriklad vyse uvedene parametry
pro qemu-kvm prepisou do libvirt XML? Muj pokus byl tento:
<domain type="kvm">
<name>test</name>
<memory>524288</memory>
<os>
<type>hvm</type>
<boot dev="hd" />
</os>
<vcpu>1</vcpu>
<disk type='file'>
<source file='/export/vm/test.qcow2'/>
<target dev='virtio'/>
</disk>
<interface type='network'>
<source network='default'/>
<target dev='vnet1'/>
<model type='virtio'/>
</interface>
</domain>
Diky,
-Y.
--
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/ Journal: http://www.fi.muni.cz/~kas/blog/ |
>> If you find yourself arguing with Alan Cox, you’re _probably_ wrong. <<
>> --James Morris in "How and Why You Should Become a Kernel Hacker" <<
Další informace o konferenci Linux