LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 12-20-2011, 02:37 AM   #1
ThomasRonshof
Member
 
Registered: Aug 2006
Posts: 133

Rep: Reputation: 0
Guest repair


Hi,

I have a test-guest image which I can't start after a host forced shutdown.

I'm using Cent OS 6.x on both host and guest using KVM

When trying to start in VMM it tries to resume the guest, but gets an error.

Is there a way to skip the resume and just boot the guest from scratch ? Or do a repair ? Using virsh i presume.

I think the problem is, that when the host went down, it tried to save the state of the guest to disk, but then i forced the host down. Testing what would happen.

If there's an issue here, it would be nice to know before production starts...

Regards.

Last edited by ThomasRonshof; 12-21-2011 at 02:30 AM.
 
Old 12-20-2011, 10:40 PM   #2
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora and others
Posts: 757

Rep: Reputation: 145Reputation: 145
You didn't mention what the guest OS is (Windows, Linux, FreeBSD, etc.). I assume the host is Linux, but which Distro? In fact, are you using VirtualBox, KVM or VMWare?

In any case, you may be able to download a Linux rescue CD image such as SystemRescueCD, RIP Linux, Finnix or similar and boot your VM guest with it.

Then you may be able to fsck the disk and mount it and look around for damage.
 
Old 12-21-2011, 02:29 AM   #3
ThomasRonshof
Member
 
Registered: Aug 2006
Posts: 133

Original Poster
Rep: Reputation: 0
Ohh, I'm sorry.

I'm using Cent OS 6.x both as host and guest using KVM.

Can't virsh do the job ?

Last edited by ThomasRonshof; 12-21-2011 at 02:30 AM.
 
Old 12-21-2011, 05:19 AM   #4
brak44
Member
 
Registered: Aug 2010
Location: Brisbane Australia
Distribution: Centos, Fedora
Posts: 87

Rep: Reputation: 24
KVM Guest Recovery

I had a similar problem not so long ago when the ups was configured to wait until 30% of battery capacity before shutdown. Linux was still completing a save of the guest image when it ran out of power. Since then I've configured the ups to initiate shutdown after 30 seconds.
The image was winxp pro & I did the following:
service libvirtd stop
top
kill qemu-kvm processes with -9
cd /var/lib/libvirt
rm -rf qemu
rm -rf network

Remove kvm
Re-install kvm

service libvirtd start

Removing & re-installing kvm may not be necessary but this procedure worked.
 
Old 12-21-2011, 06:42 AM   #5
ThomasRonshof
Member
 
Registered: Aug 2006
Posts: 133

Original Poster
Rep: Reputation: 0
Well, I have other images which works correct, so I don't think removing kvm is a solution...
 
Old 12-21-2011, 06:45 AM   #6
ThomasRonshof
Member
 
Registered: Aug 2006
Posts: 133

Original Poster
Rep: Reputation: 0
By the way, is 30 seconds enough to save the image ?

My image, 120 GB disk size, 10GB ram took alot more, then the power went down on the host in the middle of the saving guest image.

This sounds like a problem ??

If images gets corrupted, when power is gone, because it takes so much time to save the image.... then what to do ??
 
Old 12-21-2011, 06:51 AM   #7
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora and others
Posts: 757

Rep: Reputation: 145Reputation: 145
Quote:
Originally Posted by ThomasRonshof View Post
If images gets corrupted, when power is gone, because it takes so much time to save the image.... then what to do ??
Is the image stored in /var/lib/libvirt/qemu/snapshot/?

If so, I would try renaming it or moving it, if not deleting it, and then trying to boot.
 
Old 12-21-2011, 07:07 AM   #8
ThomasRonshof
Member
 
Registered: Aug 2006
Posts: 133

Original Poster
Rep: Reputation: 0
No, it's located under /home...
 
Old 12-21-2011, 08:57 AM   #9
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora and others
Posts: 757

Rep: Reputation: 145Reputation: 145
I meant the image of RAM, not the disk image.

You said it's trying to resume, which implies their is a RAM image somewhere. I don't know where it would be stored, but if you can find it, then rename or delete it.
 
1 members found this post helpful.
Old 12-21-2011, 12:13 PM   #10
ThomasRonshof
Member
 
Registered: Aug 2006
Posts: 133

Original Poster
Rep: Reputation: 0
Ohh yeah... I will try to find out where it is... :-)
 
Old 12-21-2011, 12:25 PM   #11
ThomasRonshof
Member
 
Registered: Aug 2006
Posts: 133

Original Poster
Rep: Reputation: 0
Found it.

/var/lib/libvirt/qemu/save

Thanks. :-)
 
Old 12-21-2011, 03:08 PM   #12
brak44
Member
 
Registered: Aug 2010
Location: Brisbane Australia
Distribution: Centos, Fedora
Posts: 87

Rep: Reputation: 24
By the way, is 30 seconds enough to save the image ?

Thomas, the 30 seconds refers to the time that the ups will begin its shutdown sequence after a power fail. It does not mean the time required to save an image which obviously takes a lot longer.
 
Old 12-22-2011, 01:50 AM   #13
ThomasRonshof
Member
 
Registered: Aug 2006
Posts: 133

Original Poster
Rep: Reputation: 0
Oh, of-course, I understand.

The bad RAM image I just deleted was 1 Gb in size. The guest has configured 10 GB om ram, so I presume the RAM image to become 10 GB when saved during af host shutdown.

Is it normal it takes minutes to save the RAM image ? We are talking a brand new x3850 with 4 x 8core CPU's...
 
Old 12-22-2011, 04:30 PM   #14
brak44
Member
 
Registered: Aug 2010
Location: Brisbane Australia
Distribution: Centos, Fedora
Posts: 87

Rep: Reputation: 24
Quote:
Originally Posted by ThomasRonshof View Post
Oh, of-course, I understand.

Is it normal it takes minutes to save the RAM image ?
Yes it is.
You could always initiate a shutdown from the guest before the host if you want this to be faster. Means loading up a UPS app on the guest.
Network UPS Tools (NUT) will do this for you.
 
Old 12-23-2011, 01:53 AM   #15
ThomasRonshof
Member
 
Registered: Aug 2006
Posts: 133

Original Poster
Rep: Reputation: 0
Okay... then it's possible to have the UPS software running on both the host AND the guest ? Reading from the same usb-port, to communicate with the UPS ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Host Fedora14, Windows 7 is running as Virtualbox guest- Mic is not working on Guest mwaheed Linux - Virtualization and Cloud 1 10-20-2011 12:51 PM
KVM with Ubuntu guest - guest crashes when some apps are 'full screened' TonyRogers Linux - Virtualization and Cloud 0 05-15-2011 12:18 PM
How to configure guest account (for computer repair) texasone Linux - Security 10 01-26-2011 04:30 PM
Problem installing guest additions on virtualbox Centos 5.5 64bit guest eljay313 Linux - Virtualization and Cloud 1 09-03-2010 08:22 AM
I need a Linux OS other than Ubuntu which has a repair disk or repair software jhmac77 Linux - Newbie 1 03-17-2008 07:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 06:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration