Problem while cloning CentOS 7 VM

General support questions
sefsupport
Posts: 5
Joined: 2015/04/17 09:56:23

Problem while cloning CentOS 7 VM

Post by sefsupport » 2015/04/17 10:15:16

Hi,

Need help urgently.

Cloned a CentOS 7.0.1406 VM that running on VMware Player 7.1.0 using Clonezilla Live 2.3.2-22 and restore the image to a VM running on Hyper-V for Windows 8.1.

When attempting to boot the restored VM, got the following error messages:-

[ OK ] Reached target Paths.
[ OK ] Reached target Basic System.
dracut-initqueue[372]: Warning: Could not boot.
[ OK ] Started Show Plymouth Boot Screen.
[ OK ] Reached target Paths.
[ OK ] Reached target Basic System.
dracut-initqueue[372]: Warning: Could not boot.
dracut-initqueue[372]: Warning: /dev/centos/root does not exist.
dracut-initqueue[372]: Warning: /dev/centos/swap does not exist.
dracut-initqueue[372]: Warning: /dev/mapper/centos-root does not exist.
Starting Dracut Emergency Shell...
Warning: /dev/centos/root does not exist
Warning: /dev/centos/swap does not exist
Warning: /dev/mapper/centos-root does not exist

Generating "/run/initramfs/rdsosreport.txt"

Entering emergency mode. Exit the shell to continue.
Type "journalctl" to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.

Just wonder what should I do?

Thank you very much.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Problem while cloning CentOS 7 VM

Post by aks » 2015/04/20 04:23:31

Your system can not find the partitions listed (by name). Can you boot off (say) CD to rescue mode and look for those partitions?

sefsupport
Posts: 5
Joined: 2015/04/17 09:56:23

Re: Problem while cloning CentOS 7 VM

Post by sefsupport » 2015/05/13 06:17:36

Thanks for responding to my post. Booted off CentOS 7 installation CD to rescue mode and ran the followings:

sh-4.2# chroot /mnt/sysimage

bash-4.2# cat /etc/fstab
/dev/mapper/centos-root / xfs defaults 1 1
UUID=93b6bb30-82e6-4435-a640-d33f3d5a576a /boot xfs defaults 1 2
/dev/mapper/centos-swap swap swap defaults 0 0

bash-4.2# blkid
/dev/sr0: UUID="2014-07-06-17-32-07-00" LABEL="CentOS 7 x86_64" TYPE="iso9660" PTTYPE="dos"
/dev/sda1: UUID="93b6bb30-82e6-4435-a640-d33f3d5a576a" TYPE="xfs"
/dev/sda2: UUID="1qDAbD-L34V-NIMF-aDCy-MSdo-62sN-fVTap3" TYPE="LVM2_member"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="Anaconda" UUID="a6108b67-239e-42bf-9229-85d163e216a3" TYPE="ext4"
/dev/mapper/live-rw: LABEL="Anaconda" UUID="a6108b67-239e-42bf-9229-85d163e216a3" TYPE="ext4"
/dev/mapper/live-base: LABEL="Anaconda" UUID="a6108b67-239e-42bf-9229-85d163e216a3" TYPE="ext4"
/dev/mapper/centos-root: UUID="eb73a562-79c8-4636-997c-db40f51b0420" TYPE="xfs"
/dev/mapper/centos-swap: UUID="ff2f19fe-8cc6-441b-b41a-92e1911d96e7" TYPE="swap"

bash-4.2# ls -l /dev/mapper
lrwxrwxrwx. 1 root root 7 May 13 15:40 centos-root -> ../dm-2
lrwxrwxrwx. 1 root root 7 May 13 15:40 centos-swap -> ../dm-3
crw-------. 1 root root 10, 236 May 13 15:39 control
lrwxrwxrwx. 1 root root 7 May 13 15:39 live-base -> ../dm-1
lrwxrwxrwx. 1 root root 7 May 13 15:39 live-rw -> ../dm-0

bash-4.2# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name centos
PV Size 19.51 GiB / not usable 3.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 4994
Free PE 0
Allocated PE 4994
PV UUID 1qDAbD-L34V-NIMF-aDCy-MSdo-62sN-fVTap3

bash-4.2# vgdisplay
--- Volume group ---
VG Name centos
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 19.51 GiB
PE Size 4.00 MiB
Total PE 4994
Alloc PE / Size 4994 / 19.51 GiB
Free PE / Size 0 / 0
VG UUID 1CJXIy-TdRQ-9rZ9-szVk-n9ik-r3rm-eKFsZN

bash-4.2# lvdisplay
--- Logical volume ---
LV Path /dev/centos/swap
LV Name swap
VG Name centos
LV UUID jPf8d7-9Lte-ib3w-FngN-08Vi-EUfo-bJwpTm
LV Write Access read/write
LV Creation host, time localhost, 2014-10-15 21:47:22 +0800
LV Status available
# open 2
LV Size 2.00 GiB
Current LE 512
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:3

--- Logical volume ---
LV Path /dev/centos/root
LV Name root
VG Name centos
LV UUID ekbsNv-Nnn9-U531-nNEz-Doef-I59J-5Lh5Gs
LV Write Access read/write
LV Creation host, time localhost, 2014-10-15 21:47:22 +0800
LV Status available
# open 1
LV Size 17.51 GiB
Current LE 4482
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2

Seems like the partitions could be found. Need advice on how to fix this. Anybody could help me out?

Thank you very much.

User avatar
jyoung
Posts: 102
Joined: 2014/09/22 13:40:31
Location: Nashville, TN, USA

Re: Problem while cloning CentOS 7 VM

Post by jyoung » 2015/05/13 13:02:15

One thought is that LVM metadata is corrupted. You can modify the boot parameters of your existing installation with a Ctrl-X at the bootloader screen, removing the "rhgb" and "quiet" portions of the linux line, and get more information about the failed bootup.

On the live disc (if this is indeed your problem), try using vgcfgrestore to fix your problem:

Code: Select all

vgcfgrestore --help
  vgcfgrestore: Restore volume group configuration

vgcfgrestore
	[--commandprofile ProfileName]
	[-d|--debug]
	[-f|--file filename]
	[--force]
	[-l[l]|--list [--list]]
	[-M|--metadatatype 1|2]
	[-h|--help]
	[-t|--test]
	[-v|--verbose]
	[--version]
	VolumeGroupName

Code: Select all

# vgcfgrestore -f /etc/lvm/backup/"some volume group" "some volume group"
-- Jeremy --

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Problem while cloning CentOS 7 VM

Post by aks » 2015/05/13 18:12:33

Also please post the grub2 load line (the thing that Jeremy justs you remove quiet and rhgb from).

sefsupport
Posts: 5
Joined: 2015/04/17 09:56:23

Re: Problem while cloning CentOS 7 VM

Post by sefsupport » 2015/05/14 02:08:37

Hi Jeremy,

Just boot up the affected host after modifying the boot parameters, nemoving the "rhgb" and "quiet" portion. Returned error messages remain similar to those I have posted initially. No additional error messages were found.

Booted from the CentOS 7 Live CD. Mounted /dev/mapper/centos-root to /mnt. Ran "vgcfgrestore -f /mnt/etc/lvm/backup/centos centos", given that "centos" is my volume group and "/mnt/etc/lvm/backup/centos" is where the LVM volume group configuration backup file resides. Volume group restoration successfully completed.

Rebooted from local HD and system still returned the same error messages.

Thanks.

Hi aks, followings show the grub2 load line:

setparams 'CentOS Linux (3.10.0-229.1.2.el7.x86_64) 7 (Core)'

load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 93b6bb30-82e6-4435-a640-d33f3d5a576a
else
search --no-floppy --fs-uuid --set=root 93b6bb30-82e6-4435-a640-d33f3d5a576a
fi
linux16 /vmlinuz-3.10.0-229.1.2.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos/root crashkernel=auto vconsole.keymap=us rhgb quiet LANG=en_US.UTF-8
initrd16 /initramfs-3.10.0-229.1.2.el7.x86_64.img

Thanks.

Really appreciate help from both of you, aks and Jeremy. May I know how I should proceed from here?

sefsupport
Posts: 5
Joined: 2015/04/17 09:56:23

Re: Problem while cloning CentOS 7 VM

Post by sefsupport » 2015/05/20 08:40:23

Anybody can help me out with this issue?

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Problem while cloning CentOS 7 VM

Post by aks » 2015/05/21 16:36:40

Maybe the initrd image doesn't "have" LVM?
To "activate" LVM manually you'd do vgchange -a y my_volume_group (source: http://tldp.org/HOWTO/LVM-HOWTO/activatevgs.html) and I suspect the initrd is not doing that.
A lot more LVM information is available at: https://access.redhat.com/documentation ... index.html
The tool that builds the initrd is something called dracut. Here's a link to verifying the image: https://access.redhat.com/documentation ... Disk_Image

waishingleung
Posts: 20
Joined: 2015/05/11 01:06:42
Location: Hong Kong

Re: Problem while cloning CentOS 7 VM

Post by waishingleung » 2015/05/22 08:52:50

install a new vm in hyperv with min install
get package list from the original server then install them in new vm
copy /etc to new vm
copy back your data

sefsupport
Posts: 5
Joined: 2015/04/17 09:56:23

Re: Problem while cloning CentOS 7 VM

Post by sefsupport » 2015/05/29 05:20:02

Appreciate all the advise from both of aks, Jeremy and waishingleung.

I have given up trying to resolve the problems and re-install everything from scratch on the Hyper-V vm instead. This could post a really bad problem when we try to recover the systems from a HD replacement for a physical server. Somebody need to derive a good solution to this.

Post Reply