[Fedora-xen] (no subject)

Daniel P. Berrange berrange at redhat.com
Wed Jun 20 20:05:15 UTC 2007


On Wed, Jun 20, 2007 at 04:00:07PM -0400, John Sanabria wrote:
> Thanks Daniel,
> 
> i did the next:
> 
> 1- use dd command to get a copy from a vm:
>     dd if=00_16_3E_32_0F_0F of=copia-00_16_3E_32_0F_0F
> 2- then, ( probably big mistake :-( ) use virsh command:
>     virsh dumpxml 00_16_3E_32_0F_0F > ~/copia-vm.cfg
> 3- i modify the copia-vm.cfg and change the name field and remove the mac
> address field, defined inside of the interface tag:
> --------------------- virsh dumpxml output ---------------------
> <domain type='xen' id='-1'>
>   <name>copia-00_16_3E_32_0F_0F</name>
>   <uuid>dd9fe09e1155f9223779b6c28bf43488</uuid>
>   <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'/>
>     </interface>
>     <disk type='file' device='disk'>
>       <driver name='file'/>
>       <source file='/var/lib/xen/images/copia-00_16_3E_32_0F_0F'/> <target
> dev='xvda'/>
>     </disk>
>   </devices>
> </domain>
> --------------------- virsh dumpxml output ---------------------
> 4- virsh define copia-00_16_3E_32_0F_0F, (am i (re-)define the domain
> 00_16_3E_32_0F_0F ???)
> 
> 5- virsh start copia-00_16_3E_32_0F_0F (boot ok!, can get into the root
> account, ping google.com, works! :-D)
> 
> 6- but i don't need this domain anymore 'virsh undefine
> copia-00_16_3E_32_0F_0F'
> 
> 7- boot again the original vm:
> 
> [root at shutdown ~]# virsh start 00_16_3E_32_0F_0F
> libvir: Xen Daemon error : GET operation failed:
> error: failed to get domain '00_16_3E_32_0F_0F'
> 
> 8- oops! :-(


Did you change the <uuid>  field in the XML when you cloned it ? If not
that's probably where the mistake was.

> 
> 9- i try to "recreate" the xml file,
>  a- [root at shutdown ~]# virsh dumpxml /var/lib/xen/images/00_16_3E_32_0F_0F
> > original-vm.cfg
> libvir: Xen Daemon error : GET operation failed:
> error: failed to get domain '/var/lib/xen/images/00_16_3E_32_0F_0F'
>  b- [root at shutdown ~]# virsh dumpxml 00_16_3E_32_0F_0F > original-vm.cfg
> libvir: Xen Daemon error : GET operation failed:
> error: failed to get domain '00_16_3E_32_0F_0F'
> 
> is possible bring to alive the domain 00_16_3E_32_0F_0F?

Just edit your original dump  ~/copia-vm.cfg  and put back the original
parameters when virsh define   ~/copia-vm.cfg   

Dan
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




More information about the Fedora-xen mailing list