[libvirt-users] XML-Created domain vanishes after shutdown

Hi, im migrating existing kvm-images into libvirt domains, by creating a domain in virsh from a xml file. The domain starts, is working fine, but after shutdown it is lost, and I have to recreate it. BTW, can I reset the domain count somewhere? Any ideas? thx and kind regards Alexander virsh # version Compiled against library: libvir 0.4.6 Using library: libvir 0.4.6 Using API: QEMU 0.4.6 Running hypervisor: QEMU 0.9.1 This is my xml file: <domain type='qemu' id='2'> <name>munin</name> <uuid>6bb2995a-5443-2ddb-67fe-d69a9814ece4</uuid> <memory>262144</memory> <currentMemory>524288</currentMemory> <vcpu>2</vcpu> <os> <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </features> <clock offset='utc'/> <on_poweroff>preserve</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> <source file='/var/kvm/virsh/munin.img'/> <target dev='hda' bus='ide'/> </disk> <interface type='bridge'> <mac address='00:30:1c:45:40:02'/> <source bridge='br0'/> <target dev='vnet0'/> <model type='virtio'/> </interface> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1' keymap='de'/> </devices> </domain>

On Sat, May 15, 2010 at 09:34:52AM +0200, Alexander Topolanek wrote:
Hi,
im migrating existing kvm-images into libvirt domains, by creating a domain in virsh from a xml file. The domain starts, is working fine, but after shutdown it is lost, and I have to recreate it.
virsh create XML boots up a transient guest that disappears after shutdown. If you want it to stay around, the nuse virsh define XML virsh start GUESTNAME
BTW, can I reset the domain count somewhere?
That's implicitly reset when libvirtd is restarted, to the lowest ID of any running guest, plus one. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
participants (2)
-
Alexander Topolanek
-
Daniel P. Berrange