[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libvir] uuid of newly created domain



On Mar 31, 2008, at 11:40, Vadim Zaliva wrote:
I am trying to track down the problem.


OK, I have been able to reproduce the problem, is C, without Ruby. Attached is source code
and XML file. Here is a sample output:

Attempt 0:
define
Domain defined with UUID 714b96db-a6b4-a4ea-ad58-39e4b44575c0
lookup by UUID 714b96db-a6b4-a4ea-ad58-39e4b44575c0
Lookup found domain with UUID 714b96db-a6b4-a4ea-ad58-39e4b44575c0
undefine

Attempt 1:
define
Domain defined with UUID 714b96db-a6b4-a4ea-ad58-39e4b44575c0
lookup by UUID 714b96db-a6b4-a4ea-ad58-39e4b44575c0
libvir: Xen Daemon error : GET operation failed:
Failed to lookup by UUID string domain

As you can see, it works OK first time, but the second time, returns the same UUID, lookup on which fails.
The reason it fails is that the actual UUID is different second time:

virsh # dominfo sample-domain-lord
Id:             -
Name:           sample-domain-lord
UUID:           b6eba85c-0f21-f79e-0607-1211d3fb4e36
OS Type:        linux
State:          shut off
CPU(s):         1
Max memory:     262144 kB
Used memory:    262144 kB

I am not sure if I can fix that myself.

Sincerely,
Vadim

Attachment: domtest.c
Description: Binary data

<domain type='xen'>
  <name>sample-domain-lord</name>
  <bootloader>/usr/bin/pygrub</bootloader>
  <os>
    <type>linux</type>
  </os>
  <memory>262144</memory>
  <vcpu>1</vcpu>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <interface type='bridge'>
      <source bridge='xenbr0'/>
      <script path='vif-bridge'/>
    </interface>
    <disk type='file' device='disk'>
      <driver name='tap' type='aio'/>
      <source file='/srv/xen/centos52.img'/>
      <target dev='xvda'/>
    </disk>
    <console tty='/dev/pts/2'/>
  </devices>
</domain>



--
"La perfection est atteinte non quand il ne reste rien a ajouter, mais
quand il ne reste rien a enlever."  (Antoine de Saint-Exupery)


Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]