[solved]After Migration CentOS 7 dosn't start

General support questions
Post Reply
Hanisch
Posts: 76
Joined: 2015/08/10 13:26:03

[solved]After Migration CentOS 7 dosn't start

Post by Hanisch » 2018/03/23 10:14:51

Hello,

I have my ~/.VirtualBox/HardDisks/CentOS.vmdk migrated to an other external USB-Disk.
Now I can't start the VM in VMware Player on this external USB-Disk.
Show attachement_1 and attachement_2:
CentOS-1.png
CentOS-1.png (34.39 KiB) Viewed 2075 times
CentOS-2.png
CentOS-2.png (37.65 KiB) Viewed 2075 times
I have also initramfs regenerated with:
sudo dracut -f /boot/initramfs-4.15.12-1.el7.elrepo.x86_64.img 4.15.12-1.el7.elrepo.x86_64

But without any effect.
Why can't found the /-partition?
$ sudo blkid
/dev/sda1: LABEL="CentOS" UUID="8ed9dfe4-0039-48be-9d9d-2a28aa584222" TYPE="xfs"
/dev/sda2: LABEL="CentOSHome" UUID="1d365ead-485d-401a-b00a-880dc2761396" TYPE="xfs"
/dev/sda3: LABEL="SWAP" UUID="fa526083-f9a9-4d0d-a7e1-a7659d4ed397" TYPE="swap"

What can I do?

with regards
Ch. Hanisch
Last edited by Hanisch on 2018/03/23 13:33:19, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: After Migration CentOS 7 dosn't start

Post by TrevorH » 2018/03/23 10:16:45

How did you "migrate" the disk image to the external disk?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Hanisch
Posts: 76
Joined: 2015/08/10 13:26:03

Re: After Migration CentOS 7 dosn't start

Post by Hanisch » 2018/03/23 10:45:06

TrevorH wrote:How did you "migrate" the disk image to the external disk?
I have connected the old USB-Disk to an USB-Port.
Then
1)
sudo blkid
sudo mount /dev/sdc12 /media/x

2) with 'krusader' in left Panel: /media/x/opa/.VirtualBox/HardDisks/CentOS.vmdk
and in the right Panel: /home/opa/.VirtualBox/HardDisks/
and than copied with F5 from the left Panel to the right Panel.

Is it Ok.?
In VirtualBox the VM works fine.

with regards
Ch. Hanisch

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: After Migration CentOS 7 dosn't start

Post by TrevorH » 2018/03/23 11:01:49

Oh, wait, I didn't spot that you created the VM in VirtualBox and are now trying to run it in VMWare. They'll emulate different hardware so you cannot just flip between virtualization platforms like that. If you can boot the rescue kernel then you should be able to use that to regenerate the initramfs on the "new" machine and it should make the initramfs with the drivers for the current "hardware".
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Hanisch
Posts: 76
Joined: 2015/08/10 13:26:03

Re: After Migration CentOS 7 dosn't start

Post by Hanisch » 2018/03/23 11:49:01

TrevorH wrote:Oh, wait, I didn't spot that you created the VM in VirtualBox and are now trying to run it in VMWare.
I have the VM created in VMware player and than this VM also run in VirtualBox on both USB-Disks.
They'll emulate different hardware so you cannot just flip between virtualization platforms like that. If you can boot the rescue kernel then you should be able to use that to regenerate the initramfs on the "new" machine and it should make the initramfs with the drivers for the current "hardware".
On the old USB-Disk the VM works fine in VMware player and VirtualBox.
On the new USB-Disk VM works only in VirtualBox.
In VMware player can't find the /-partition.

What is the "rescue kernel" ?
With the Kernel "... with debugging" the same result as above.

Can I regenerate the initramfs with:

Code: Select all

dracut -f
on the VM in VirtualBox?

with regards
Ch. Hanisch

Hanisch
Posts: 76
Joined: 2015/08/10 13:26:03

Re: After Migration CentOS 7 dosn't start

Post by Hanisch » 2018/03/23 13:32:55

Hello,
the solution is found.
1) booting the VM with a systemrescueCD (for example: ~/Downloads/systemrescuecd-x86-5.1.2.iso )

2) In a Terminal on the systemrescueCD:

Code: Select all

# mkdir /media/x
# mount /dev/sda1  /media/x

# mount -o bind /dev /media/x/dev
# mount -o bind /sys /media/x/sys
# mount -t proc /proc /media/x/proc
# cp /proc/mounts /media/x/etc/mtab
# cp /etc/resolv.conf /media/x/etc/resolv.conf

# chroot /media/x /bin/bash -i
In the chrooting system:

Code: Select all

# dracut --regenerate-all --force
# exit
3) Next booting without the systemrescueCD and is works well.

with regards
Ch. Hanisch

Hanisch
Posts: 76
Joined: 2015/08/10 13:26:03

Re: After Migration CentOS 7 dosn't start

Post by Hanisch » 2018/03/24 12:08:52

Hello,
the last solution was not stable.

Therefore I have on the old USB-Disk in the VM in Vmware Player the newest VMware-Tools (VMwareTools-10.1.6-5214329.tar.gz) installed

Code: Select all

sudo    ./vmware-tools-distrib/vmware-install.pl  --clobber-kernel-modules=vmxnet3
and than the CentOS.vmdk once again copied to the new USB-Disk.
The VM start now both in VirtualBox as VMware Player.

with regards
Ch. Hanisch
.

Post Reply