We had a UPS error and lost power on a physical server hosting about 10+ virtual machines using Oracle VM platform. We got it back up and running, but I am wondering what is the best way to recover from this. Specifically, I am wondering if we need to run fsck on every individual VM, and/or should we run fsck at the platform level? Our sysadmin recently quit, and I am much more of a programmer than a sysadmin, so this is a bit beyond my me. I've been looking at the OVM documentation (OVM Manager 3.2.1) but can't seem to find anything specifically about dealing with this type of situation. I'm grateful to anyone who can point me in the right direction.
1 Answers
Ideally you should fsck
each VM's filesystems. You should run the VM in single-user mode or boot from the network or a CD image to do this. If you want to boot the VM in single-user mode, perform the following:
- Log on to the VM Server as root.
Locate the VM's configuration file. I usually grep for the VM name:
grep -r vm_name /OVS/Repositories/*
Launch the VM manually using the Xen tools, rather than starting from OVM Manager, connecting to the console:
xm create -c <path_from_above>
When the
GRUB
menu appears, edit the boot options. You haven't said what distribution your VMs are running, but assuming something RHEL-like (RHEL, CentOS, OEL) I would remove the optionsrhgb
andquiet
and addsingle console=xvc0
. Thesingle
option tells init to start single-user,console=xvc0
tells the kernel to usexvc0
as the console device. This is the Xen console, which you access through Oracle VM Manager.
Once you have booted to single-user you can fsck
filesystems. However you should not attempt to fsck the root filesystem or any other mounted filesystems. User/data filesystems can safely be checked as long as they are umounted. You can run fsck -n
to check the root filesystem for errors, though. If this does report errors, you should either network-boot or CD-boot the VM and run fsck
from there so that the filesystem is not mounted.
![](../../users/profiles/90132.webp)
- 5,249
- 2
- 23
- 28
-
Thanks so much, yes, most of them are RHEL 6.4. Thank you! – fronzee Aug 05 '13 at 21:35