SLES 12.5 ESXi to HyperV Migraiton Issue (UUID Preservation))

VM image converter (VMDK, VHD, VHDX, IMG, RAW, QCOW and QCOW2), P2V migrator

Moderators: anton (staff), art (staff), Max (staff), Anatoly (staff)

microchipmatt
Posts: 12
Joined: Sat Apr 24, 2021 11:35 pm

Tue Aug 20, 2024 5:44 am

I am Attempting to Migrate a SLES 12.5 Server from ESXi to HyperV. The migration technically completes, BUT the UUID of the drives is NOT preserved during migration. Since SLES uses root Drive UUIDs to boot, the machine is not bootable after migration. Grub does attempt to boot by because the UUIDs don't match the machine does not fully boot. I was wondering if any experts know how I can:
  • Preserve UUIDs during the migration using Starwind V2V convertor
Or if it is possible. I believe this would solve my issue. I also know it is possible, as I used to use software called sep sesem to restore a failed SLES VM, and as long as I built a new VM with New Fresh Virtual drives, and as long as I made sure the drive were the same size, Sep Sesam would happily restore all the partitions, Data and THE SAME UUIDs to each drive in the SLES 12.5 server, and the machine would boot. Any Suggestions on how to do the same with StarWind? I would be greatly appreciative.
yaroslav (staff)
Staff
Posts: 3424
Joined: Mon Nov 18, 2019 11:11 am

Tue Aug 20, 2024 8:16 pm

Greetings,

How many drives do you have?
Did you convert the entire VM or each drive separately?
microchipmatt
Posts: 12
Joined: Sat Apr 24, 2021 11:35 pm

Thu Aug 22, 2024 5:34 pm

2 drives, /dev/sda1, /dev/sdb1

I have tried editing the UUID from /etc/fstab from a live CD, and it Still does not boot. blkid reports /dev/sda1 is the right UUID....but for some reason it still will not boot, grub loads and I can pick the boot record but then I get:

a start job is running for dev-disk-by\xxxxxxxxx
microchipmatt
Posts: 12
Joined: Sat Apr 24, 2021 11:35 pm

Thu Aug 22, 2024 5:34 pm

I converted the entire VM.
yaroslav (staff)
Staff
Posts: 3424
Joined: Mon Nov 18, 2019 11:11 am

Thu Aug 22, 2024 11:44 pm

Hi,

Thanks for your cooperation. I logged the internal request to test these conversions.
Could you please convert these disks separately and mount them later to a VM that is created manually?
You will need to comment on the mount points in FSTAB prior to conversion.
microchipmatt
Posts: 12
Joined: Sat Apr 24, 2021 11:35 pm

Fri Aug 23, 2024 3:24 am

I can do all of these things :) So just to Clarify:
1. Do NOT Convert the whole Machine.
2. Convert ONE disk at a time
3. Take note of original FSTAB, and POST here? (Is that what you mean?)

If so no problem I can so that :) (Just let me know, yes or no and please provide further direction for FSTAB if I am misunderstanding), in the mean time I will post the original FSTAB shortly.
microchipmatt
Posts: 12
Joined: Sat Apr 24, 2021 11:35 pm

Fri Aug 23, 2024 3:32 am

Original /etc/fstab:

UUID=b2142ed6-4e56-4f6b-8fe3-73662ca3bb2c / ext4 acl 1 1
/dev/sdb1 /vastorage ext4 rw 0 0
/swapfile none swap sw 0 0
yaroslav (staff)
Staff
Posts: 3424
Joined: Mon Nov 18, 2019 11:11 am

Fri Aug 23, 2024 7:04 pm

Not quite. What I suggested was
1. Go to FSTAB and comment the lines related to sdb.
2. Convert VM disks one by one.
3. Create a new VM in the destination using only boot volume.
4. Attach the disks to it.
5. Mount sdb.
microchipmatt
Posts: 12
Joined: Sat Apr 24, 2021 11:35 pm

Sat Aug 24, 2024 4:52 am

I'm sorry, I think there is a bit of a language barrier, and I want to make sure I FULLY understand as the Order of operations seem to matter:

"You will need to comment on the mount points in FSTAB prior to conversion."
Do you mean COMMENT OUT? So I comment OUT the lines in FSTAB? For BOTH Drives? Before Conversion? So comment out all mount point for sda1 and sdb1?

Not quite. What I suggested was
1. Go to FSTAB and comment the lines related to sdb.'
So only comment out sdb1? Not sda1 as well? It sounds like in previous statement you want me to comment out both.
2. Convert VM disks one by one.
Once you clarify the above, you want me to convert both disks separately?
I can do that, BUT Starwind MAKES me have a machine to attach it to, so I have attached /dev/sda1 to a NEW Virtual Machine I created with Star Wind.

3. Create a new VM in the destination using only boot volume.
I *Think* I understand, You want me to create a new VM on HyperV with just the boot volume? So Like a disk with just the a /boot volume??.....Not sure how I can do that, since most Installs of Linux will require me to create a boot volume, and then do the install to other partitions.....I guess I could Create a SLES 12.5 Install, and then nuke the other partitions when I am done, leaving ONLY boot.

4. Attach the disks to it.
Attach the disks to the machine sales install that now ONLY has the boot volume......(Does that mean I have 3 disks attached now, since I need a boot volume?)

5. Mount sdb
Do you mean mount /dev/sda1 and /deb/sdb1 to the VM?
microchipmatt
Posts: 12
Joined: Sat Apr 24, 2021 11:35 pm

Sat Aug 24, 2024 5:21 am

My Head Hurts.
yaroslav (staff)
Staff
Posts: 3424
Joined: Mon Nov 18, 2019 11:11 am

Sat Aug 24, 2024 11:12 am

Go to fatab and comment out the sdb entry. Only sdb or set its boot option to nofail. If uuid changes, I want sdb to be ignored on boot.
I want you to convert one disk at a time and recreate the VM in the destination.
Convert ONLY boot VMDK.
Create a VM with the boot disk in Hyper-V and boot it.
Does it boot? If so, cinvert sdb and mount it to the VM in Hyper-V Manager.
Does it still boot? Mount the disk inside the VM.
If it does not boot, try bootin grom an iso and edit the fstab with the new UUID.
microchipmatt
Posts: 12
Joined: Sat Apr 24, 2021 11:35 pm

Sat Aug 24, 2024 3:04 pm

I might be banned from the board :( Not sure why. Or I was earlier? I hope I am not, because you are helping me a lot, and I am VERY appreciative.
yaroslav (staff)
Staff
Posts: 3424
Joined: Mon Nov 18, 2019 11:11 am

Sat Aug 24, 2024 3:15 pm

OMG, sure not :) It might be a glitch (refreshing the page helps).
You are having trouble sharing it here. There is no reason to ban one seeking help.
This case is fun. Reach out to us at support@starwind.com use 1204811 and link to this thread as your references.
microchipmatt
Posts: 12
Joined: Sat Apr 24, 2021 11:35 pm

Sat Aug 24, 2024 3:18 pm

Okay I understand now. I did try and edit fstab already with the new UUID, and it did not boot (I do see grub everytime). However, I did not try the previous steps of commenting out /dev/sdb1, to see if /dev/sda1 boots. Last night I converted just /dev/sda1, I am about to connect it to a Clean new VM and see if it boots (with /dev/sdb1 commented out in fstab. If it boot I will attach /dev/sdb1 and see if it still boots.

I did, however try some simular methods, what I tried previously:
- Converted the whole machine (Failed to boot)
- Built a new clean VM and attached the disks to the new clean VM (did not boot, same result see grub menu but no disks boot)
- Tried using different cloning methods for the disks, and then attached them to a new VM (Same boot result, I see grub menu but no disks boot)
- Tried edting fstab, to have the disk boot from the new UUID (Same result, see grub menu but disks will not boot)
- Tried editing /etc/fstab to boot from LABEL ROOT (Same result, /dev/sda1 will not boot, only see grub menu)
- Used the SuperGrub rescue disk, to see if I could detect grub.cfg (I can) and then edited the entried to try and boot from the new UUID (Same situation, /dev/sda1 does not boot)
- Used the Super Grub disk to detect grub.cfg and edited the entries to boot from root=LABEL=ROOT (Same result, the I it tries, but cannot boot from /dev/sda1

It should be noted that the original ESXi VM I am trying to convert is healthy, and happily boots, in fact it is running again right now. So this is all perplexing to me. I am still trying what you suggested as well.
microchipmatt
Posts: 12
Joined: Sat Apr 24, 2021 11:35 pm

Sat Aug 24, 2024 3:36 pm

Okay I tried what you said:
- Converted the disks one at a time (No Machine attached)
- Created a NEW Fresh VM
- Attached /dev/sda1
- I made sure NOT to boot yet
- I then Booted from a LIVE SLES 12.5 iso in RESCUE mode
- I mounted /dev/sda1 from the Live Environment IE:
cd/
cd mnt
mkdir sda1
mount /dev/sda1 /mnt/sda1
chroot /mnt/sda1
I then edited /etc/fstab IE;
vi /etc/fstab
- I then commented OUT the entry line in fstab for /dev/sdb1
- I then boot the new VM for thje first time and......

Same result, I see grub, but /dev/sda1 cannot boot :(
I See Attached Screenshot.
Attachments
Hyper V SLES 5 sda1 boot attempt.png
Hyper V SLES 5 sda1 boot attempt.png (18.4 KiB) Viewed 15654 times
Post Reply