Hello all, I created a Solaris10 Full-virtual gest on my OpenSolaris 2009.06 xVM, (suppose its Domain name is Sola10.) Stupidly enough, I ran "xm delete Sola10" command by accident. Since then the guest does not appear the list of "virsh list" command anymore, not come up to the virt-manager either. That means I am unable to start up the guest. :( Its vmdk file and xml file are still seen in the original directory, so I believe "xm delete" means merely removing its registration from a database or something, not completely erasing its real data from the hard drive for ever. So I am guessing there is still a little hope. I want it back, but no idea how to do. Does anyone have a tip of it? Thanks in advance! Robinky -- This message posted from opensolaris.org
On Thu, Sep 10, 2009 at 7:02 AM, taiyo K<taiyo_k_solarisian@yahoo.co.jp> wrote:> Its vmdk file and xml file are still seen in the original directory,> I want it back, but no idea how to do. Does anyone have a tip of it?"virsh create" using the xml file? -- Fajar
Hello Fajar, I tried the command based on your advice, but this error popps up. hitsugy@cubeville02:~# ls -l /pool01/xVM/Sola10u6_01/Sola10u6_01.img/ total 9144306 -rw------- 1 xvm root 4678287360 8月 20 22:55 vdisk.vmdk -rw-r--r-- 1 xvm root 613 8月 20 22:55 vdisk.xml hitsugy@cubeville02:~# hitsugy@cubeville02:~# virsh define /pool01/xVM/Sola10u6_01/Sola10u6_01.img/vdisk.xml libvir: Xen Daemon error : XML description for domain is not well formed or invalid error: Failed to define domain from /pool01/xVM/Sola10u6_01/Sola10u6_01.img/vdisk.xml Also this is the outcome of "virsh define" command. hitsugy@cubeville02:~# virsh define /pool01/xVM/Sola10u6_01/Sola10u6_01.img/vdisk.xml libvir: Xen Daemon error : XML description for domain is not well formed or invalid error: Failed to define domain from /pool01/xVM/Sola10u6_01/Sola10u6_01.img/vdisk.xml Did I use a wrong xml file? Robinky -- This message posted from opensolaris.org _______________________________________________ xen-discuss mailing list xen-discuss@opensolaris.org
Yep, the file vdisk.xml describes most likely the vmdk structure. You may try to create similar guest, dump its configuration and change disk devices, name, whatever to the original one and it should boot. I did it many times. Petr On 10/09/2009, taiyo K <taiyo_k_solarisian@yahoo.co.jp> wrote:> Hello Fajar, > > I tried the command based on your advice, but this error popps up. > > > hitsugy@cubeville02:~# ls -l /pool01/xVM/Sola10u6_01/Sola10u6_01.img/ > total 9144306 > -rw------- 1 xvm root 4678287360 8月 20 22:55 vdisk.vmdk > -rw-r--r-- 1 xvm root 613 8月 20 22:55 vdisk.xml > hitsugy@cubeville02:~# > hitsugy@cubeville02:~# virsh define > /pool01/xVM/Sola10u6_01/Sola10u6_01.img/vdisk.xml > libvir: Xen Daemon error : XML description for domain is not well formed or > invalid > error: Failed to define domain from > /pool01/xVM/Sola10u6_01/Sola10u6_01.img/vdisk.xml > > > Also this is the outcome of "virsh define" command. > > hitsugy@cubeville02:~# virsh define > /pool01/xVM/Sola10u6_01/Sola10u6_01.img/vdisk.xml > libvir: Xen Daemon error : XML description for domain is not well formed or > invalid > error: Failed to define domain from > /pool01/xVM/Sola10u6_01/Sola10u6_01.img/vdisk.xml > > > Did I use a wrong xml file? > > Robinky > -- > This message posted from opensolaris.org > _______________________________________________ > xen-discuss mailing list > xen-discuss@opensolaris.org_______________________________________________ xen-discuss mailing list xen-discuss@opensolaris.org
Hello petrben and all, After following some guidance and advice provided via this thread, I could finally make it work. Yee-ha! This is the summary on what I did: 1. Created another guest, whoes configurations and structures are as same as the original one. For example, my accidentally deleted Domain is called "Sola10u6_01", and I created another one "Sola10u6_02" with very much similar options as mentioned below. hitsugy@cubeville02:~$ pfexec mkdir /pool01/xVM/Sola10u6_02/ hitsugy@cubeville02:~$ pfexec virt-install -n Solaris10u6_02 --hvm --vcpus=1 -r 2048 --os-type=solaris --os-variant=solaris10 --vnc -f /pool01/xVM/Sola10u6_02/Solaris10u6_02.img -s 15 -c /pool01/myfs/iso/sol-10-u6-ga1-x86-dvd.iso 2. Dumped the newly created guest by using virsh dumpxml command hitsugy@cubeville02:~# virsh dumpxml Solaris10u6_02 > Solaris10u6_01.xml 3. Open the dumped xml file and modified to fit the original guest''s configuration In my case, I changed these four parts. name, uuid, mac address attribute, source file attribute BTW, to generate a new UUID, I used this site. UUID (GUID) Generator on the WEB http://www.famkruithof.net/uuid/uuidgen 4.Recreated the original domain using "virsh created" command with the modified xml file hitsugy@cubeville02:~# virsh create Solaris10u6_01.xml Then the original guest started automatically. Great!! Thank you so much guys, you all saved my day. I love Sun xVM more than ever! Robinky -- This message posted from opensolaris.org