can't start the virtual machine through virtual manager on centOS 6.2

I have backuped a virtual machine from one centOS6.3 system. I used the following procedure for backup.

1. First dump the xml file:
/usr/bin/virsh dumpxml AlchemyServer | cat > centaur.conf

2.  backup the vg_os volume
/sbin/vgcfgbackup -f /u1/lvmSnap/centaur-OS.cfg vg_os

3. backup the vg_Data volume
/sbin/vgcfgbackup -f /u1/lvmSnap/$centaur-Data.cfg vg_Data

4. create a snapshot volume
/sbin/lvcreate -s -L 50G -n alchemySnap /dev/vg_Data/alchemy

5. start the vm

/usr/bin/virsh start AlchemyServer

6. backup the snapshot volume
/bin/dd if=/dev/vg_Data/alchemySnap | /bin/gzip | /bin/dd of=alchemy.OS20140920.dd.gz


Now I need recover this vm from the backup achieve file above, I first created a volume on the destination machine after I unzipped the archieve:

/sbin/lvcreate -L 50G -n alchemy /dev/data


Then I tried to enter the GUI by running virt-manager. However, when I am inside this interface, I don't know how to make the virtual machine. I tried to make the new virtual machine exactly the same as the original one, but when I boot it, it got the error.
virtual-machine-error.png
Jason YuAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gheistCommented:
/boot partition is missing from system.
It does not boot LVM directly.
0
Jason YuAuthor Commented:
HI, Gheist:

Thank you very much for  your reply. I have several questions.

did I backup boot partition when I was doing the backup?

I thought the backup archive include the boot partition. How could I recover the boot partition.
0
gheistCommented:
No, you backed up just LVM
Now you need to install basic CentOS and restore LVM volumes one by one (you have lvm config in /etc/ in one of volumes.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Jason YuAuthor Commented:
Gheist:

Thank you for your reply.  After I install a basic CentOS, how could I recover the LVM to the new host? Do I need add these old LVMs to the new host volume manager? And which file I need modify?

thanks a lot.
0
gheistCommented:
You need to edit lvm.conf inside on-disk initrd in /boot
And probably run fsck-s before moment of truth reboots.
0
Jason YuAuthor Commented:
On my source system, I didn't see a file named lvm.conf. Could you explain a bit more about it?

thanks.

[root@centaur vg_Data]# cd /boot
[root@centaur boot]# ls -alt | grep lvm
[root@centaur boot]# ls -alt
total 58905
dr-xr-xr-x. 28 root root     4096 Feb 26  2014 ..
-rw-r--r--.  1 root root   179204 Aug 14  2012 symvers-2.6.32-279.5.1.el6.x86_64.gz
-rw-r--r--.  1 root root   101976 Aug 14  2012 config-2.6.32-279.5.1.el6.x86_64
-rw-r--r--.  1 root root  2341894 Aug 14  2012 System.map-2.6.32-279.5.1.el6.x86_64
-rw-r--r--.  1 root root      170 Aug 14  2012 .vmlinuz-2.6.32-279.5.1.el6.x86_64.hmac
-rwxr-xr-x.  1 root root  3987088 Aug 14  2012 vmlinuz-2.6.32-279.5.1.el6.x86_64
-rw-r--r--.  1 root root   171087 Dec  6  2011 symvers-2.6.32-220.el6.x86_64.gz
-rw-r--r--.  1 root root      166 Dec  6  2011 .vmlinuz-2.6.32-220.el6.x86_64.hmac
-rwxr-xr-x.  1 root root  3938288 Dec  6  2011 vmlinuz-2.6.32-220.el6.x86_64
-rw-r--r--.  1 root root   100943 Dec  6  2011 config-2.6.32-220.el6.x86_64
-rw-r--r--.  1 root root  2312369 Dec  6  2011 System.map-2.6.32-220.el6.x86_64
-rw-r--r--.  1 root root 23806163 May  4  2011 initramfs-2.6.32-279.5.1.el6.x86_64.img
drwxr-xr-x.  2 root root     1024 May  4  2011 grub
dr-xr-xr-x.  5 root root     1024 May  4  2011 .
-rw-r--r--.  1 root root 23335550 May  4  2011 initramfs-2.6.32-220.el6.x86_64.img
drwxr-xr-x.  3 root root     1024 May  4  2011 efi
drwx------.  2 root root    12288 May  4  2011 lost+found
[root@centaur boot]#
0
gheistCommented:
It is inside initramfs files. original is in one of LVM volumes as /etc/lvm/lvm.conf
You need to extract the file from LVM volume.
0
Jason YuAuthor Commented:
HI, Gheist:

You are right, there is a lvm.conf file on my source system, it's under /etc/lvm.

[root@centaur boot]# cd /etc/lvm
[root@centaur lvm]# ls -alt
total 56
drwx------.  2 root root  4096 Sep 22 14:52 backup
drwx------.  2 root root  4096 Sep 22 14:52 archive
drwxr-xr-x. 96 root root  4096 Aug 29 14:52 ..
drwxr-xr-x.  5 root root  4096 Jul 15 09:24 .
drwx------.  2 root root  4096 Jun 22  2012 cache
-rw-r--r--.  1 root root 34655 Jun 22  2012 lvm.conf
[root@centaur lvm]# vi lvm.conf
[root@centaur lvm]# pwd
/etc/lvm
[root@centaur lvm]# hostname
centaur.minkagroup.net
[root@centaur lvm]#

------------------------------------------


So, my action plan is as below:

1. Reinstall the same CentOS on a virtual machine.

2. set up a volume group on the new build virtual machine.

3. use lvcreate command to make a new logical volume.
/sbin/lvcreate -L 80G -n alchemy /dev/data

4. Recover the logic volume from the backup archieve by using the following command:

/bin/dd of=alchemy.OS20140920.dd if=/dev/data/alchemy

5. copy the /etc/lvm/lvm.con from the source vm to the destination vm.

6. reboot the system.


Is the procedure correct for recovery, please help me by modifing it and give your suggestion.

I am new to virt-manager on redhat. Could you send me some links to learn it? I have used vmware for a long time but never used vm on this platform.

Thanks a lot, you are the best!!
0
gheistCommented:
5a. run dracut -f to actualy plant lvm.conf into initrd.
0
Jason YuAuthor Commented:
I got confused now.

My original host is a CentOS 6.3 box, the vm running on it is a windows server 20008 R2 which I have backed up.

Now, I want to verify if I can restore this vm from the backup archive file on another host. This host is a CentOS Release 6.2 box. Which OS should I install on the vm on the destination host? I think I should install a windows server 2008 R2 on the destination host, am I right?

I am sorry for the confusion, I hope I explain it clearly this time.
0
Jason YuAuthor Commented:
Hi, gheist:

Could you advise how to validate this backup? Do I need create a windows server 2008 for the recovery?

thanks.
0
gheistCommented:
I hardly understand what you are saying.
What is not booting? Windows ir Linux? Which is guest and which is host?
0
Jason YuAuthor Commented:
the host is a centos 6.2 machine, the gust is a windows 2008 os. The guest is not booting after allocated the recovered lvm as the primary disk.
0
gheistCommented:
Maybe start by adding some windows areas.... Posting Linux file listings does not get windows anywhere....
0
Jason YuAuthor Commented:
I am sorry I didn't get the solution yet.

I have made a backup of a virtual machine (this vm is a windows 2008 r2 vm). I want to restore it on another Redhat OS host. But I don't know how to do it.

Any help will be great appreciated. thanks.
0
gheistCommented:
There is a simple problem - windows does not boot...
0
Jason YuAuthor Commented:
Hi, Guys:

I really need some help for this issue.

I backed up the virtual machine's first disk yeasterday and tried to recover it again on another CentOS host, it failed again.

It shows the same error message: "No bootable device"

I don't understand: I backed up the OS partition from the original vm, and recover it to a new lvm on the destination host, why it can't start the machine. Is there a trick settings for reboot from "C" partition?

Any help will be great appreciated.

Thank you.
can-t-reboot.png
two-vms-comparison.png
0
Jason YuAuthor Commented:
Here I am uploading the manual I got from the predecessor.

Unfortunately, he didn't talk about too much detail about how to recover the vm on a new LVM.

Please help. thanks.
0
Jason YuAuthor Commented:
I made a word document recording all i have done to recover this vm,  gheist, could you please take a look at the step by step explanation?

Thanks.
0
gheistCommented:
I am of very little help with broken windows.
If your question outlines backup procedure then it is only valid for powered off VM. There is no telling in what state it was when you did volume group snapshots etc.
0
Jason YuAuthor Commented:
I used this procedure to backup the vm, I suppose the vm was powered off when I was doing the dd command.

1. shutdown vm: /usr/bin/virsh shutdown AlchemyServer

2. create a new lvm

/sbin/lvcreate -s -L $vmSnapSize -n $vmSnap $lvmPath/$lvmName

3. use dd command to backup the lvm

/bin/dd if=$lvmPath/$vmSnap | /bin/gzip | /usr/bin/ssh -i $key $bkUser@$bkHost /bin/dd of=$vm/$vmShort.OS$d8t.dd.gz


then I used these commands to recover the vm:

/sbin/lvcreate -s -L 70G -n alchemySnap /dev/data/alchemy


Then write back to the new created lvm from the archive file.

/bin/dd of=alchemy.OS20140920.dd if=/dev/data/alchemy

After this, I used the "virtual manager" to recover the vm.
0
Jason YuAuthor Commented:
i didn't see the attached word file.

Here it is.
0
Jason YuAuthor Commented:
0
gheistCommented:
If your system is unbootable as shut down that backup will not be any better. welcome to wonderful world of windows....
0
Jason YuAuthor Commented:
ok, I will initiate a new post for this problem, thank you for your help anyway, Gheist.

I appreciate your help.
0
gheistCommented:
You can ask to cancel this one.
1) your backup process is corredt
2) you know ways around XEN
Unbootable windows - sorry no idea...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Virtualization

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.