I think I reported this using the backport - and I can reproduce under
karmic. I think this might be the bug "virsh kill might kill the wrong
vm" . Look how the following undefines the wrong VM:

y...@mandragor:/etc/libvirt/qemu$ virsh dumpxml karmic
Connecting to uri: qemu:///system
<domain type='kvm'>
  <name>karmic</name>
  <uuid>a4947deb-fed4-197e-4156-b033c65aebda</uuid>
  <memory>1048576</memory>
  <currentMemory>1048576</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>destroy</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='/home/yann/karmic.qcow2'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <disk type='file' device='cdrom'>
      <target dev='hdc' bus='ide'/>
      <readonly/>
    </disk>
    <interface type='network'>
      <mac address='54:52:00:7c:2d:2a'/>
      <source network='default'/>
      <target dev='vnet0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/3'/>
      <target port='0'/>
    </serial>
    <console type='pty' tty='/dev/pts/3'>
      <source path='/dev/pts/3'/>
      <target port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
  </devices>
</domain>

y...@mandragor:/etc/libvirt/qemu$ virsh dumpxml karmic2
Connecting to uri: qemu:///system
<domain type='kvm'>
  <name>karmic</name>
  <uuid>a4947deb-fed4-197e-4156-b033c65aebda</uuid>
  <memory>1048576</memory>
  <currentMemory>1048576</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>destroy</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='/home/yann/karmic.qcow2'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <disk type='file' device='cdrom'>
      <target dev='hdc' bus='ide'/>
      <readonly/>
    </disk>
    <interface type='network'>
      <mac address='54:52:00:7c:2d:2a'/>
      <source network='default'/>
      <target dev='vnet0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/3'/>
      <target port='0'/>
    </serial>
    <console type='pty' tty='/dev/pts/3'>
      <source path='/dev/pts/3'/>
      <target port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
  </devices>
</domain>

y...@mandragor:/etc/libvirt/qemu$ virsh list --all
Connecting to uri: qemu:///system
 Id Name                 State
----------------------------------
  - karmic               shut off
  - karmic2              shut off

y...@mandragor:/etc/libvirt/qemu$ virsh undefine karmic2
Connecting to uri: qemu:///system
Domain karmic2 has been undefined

y...@mandragor:/etc/libvirt/qemu$ virsh list --all
Connecting to uri: qemu:///system
 Id Name                 State
----------------------------------
  - karmic2              shut off

-- 
Libvirt allows definition of several domains with the same UUID
https://bugs.launchpad.net/bugs/394353
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to