Moving from CentOS 7 (KVM) to ESXi

simon_lefisch

Dabbler
Joined
May 24, 2020
Messages
24
Hey everyone,

Haven't been on here much as of late since my setup (which is pretty simple) has been rock solid.

I am, however, here to ask what is probably something that has already been asked but I have not been able to find an answer, so hopefully someone can help me out...

I am currently running TrueNAS an a VM on my CentOS 7 server (KVM), along with a few other VMs. Since I now have my pfSense hardware firewall (was previously running pfSense as a VM), I am going to be migrating from CentOS/KVM to ESXi. My TrueNAS VM is all setup with pass-thru for my SATA controller card that houses my NAS drives. I have already found guides on how to convert the VM from the KVM format (.raw / .qcow2) to ESXi format (.vmdk), so hopefully it goes smooth (although I hope for the best, I prepare for the worst). Assuming it doesn't work out the way I want and I have to setup a new TrueNAS VM, I know I can restore from a backup I will make prior to migrating.

My question is, will that backup also restore my pool configuration? If not, I will have to move all my data to another drive I have which isn't the ned of the world, just more time consuming. Thanks for any help you guys can provide!
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
Yes, the "configuration backup" should keep your pool configuration intact (in addition to shares, exports, etc) - even if it didn't, the fact that you did a hardware passthrough on KVM means that TrueNAS has had direct access to the disks, so if you set up the same hardware with ESXi it should be fine.

However, do note that VMware ESXi is a little more strict/particular about what SATA controllers it will work with for passthrough, due to the more risk-averse nature of that product.

KVM can do whatever some enthusiast feels like implementing - with varying results from super stable to more or less flaky.
ESXi can do what VMware product management sees as necessary/desirable for their enterprise customers - for whom rock solid operation of large datacenter infrastructure is the most important feature.

You might need to manually add your SATA controller as a permitted passthrough device in ESXi - see this post in the same thread for a link to the details.

 

simon_lefisch

Dabbler
Joined
May 24, 2020
Messages
24
Yes, the "configuration backup" should keep your pool configuration intact (in addition to shares, exports, etc) - even if it didn't, the fact that you did a hardware passthrough on KVM means that TrueNAS has had direct access to the disks, so if you set up the same hardware with ESXi it should be fine.

However, do note that VMware ESXi is a little more strict/particular about what SATA controllers it will work with for passthrough, due to the more risk-averse nature of that product.



You might need to manually add your SATA controller as a permitted passthrough device in ESXi - see this post in the same thread for a link to the details.


Thank for the reply @HoneyBadger. I'm glad to hear that the backup should keep the pool configuration. That'll make it easier to setup. I'll prob still copy all my data to another drive just in case. As always, hope for the best but expect the worst lol.

As far as the pass-thru, I think I came across that thread in my research and I have no prob adding the HBA manually if needed. I believe I had to do it that way when I added it in KVM. If I can add the HBA manually and keep the pool config, then this should be pretty smooth migration.

I believe those were the more pertinent questions I had atm, but if I have anymore I will come back here and ask. Thanks again! :grin:
 

simon_lefisch

Dabbler
Joined
May 24, 2020
Messages
24
Actually I do have another question @HoneyBadger, hopefully you can answer it....have you are anyone else running ESXi installed Open vSwitch? I currently run that on my server and has proven to be really great, especially when dealing with VLANs.
 
Last edited:

Alex_K

Explorer
Joined
Sep 4, 2016
Messages
64
That's rather rare SATA controller, at least google does not know about the one.
Most probably ESXi would not recognize Crucial MX500 250GB SSD (OS / RAID1) as RAID volume, if it would see disks at all.

If you want your boot disk for ESXi mirrored you'll need separate RAID/HBA card for that (and only for that), because with onboard SATA and some HBAs ESXi only going to see just a bunch of disks at best.

On the bright side, even if you somehow lose your TrueNAS config, zpool configuration is stored on zpool disks themselves. You would be able to just fresh install TrueNAS and "import" your pool. Thats provided you do not have your pool encrypted, and TrueNAS really saw your raw disks.

It should be easy to test, and risk of data loss would be minimal.

Install ESXi on an other disk connected to SATA port on the motherboard. Make a fresh TrueNAS install on same disk you installed ESXi onto. Contrary to some other OSes, neither ESXi nor TrueNAS would not touch your other drives unless you explicitely ask them to.

Pass controller to TrueNAS VM, if ESXi will let you. Add a pool, choose import. See if it'll see your old pool. Do not finish importing if you want to restore your old config seemlessly, but checking pools availability this way will be faster then researching.

About VM conversion. vmdk is VMware virtual disk file's extension, format itself is different for VMware Workstation (single file contain both disk config and data) and ESXi (sepearate files for config and data). Make sure tools you use recognize the difference. Then there is .vmx file which would contain VM's config itself. There are more but only vmx and vmdk contain any useful data, if you don't have snapshots.

You would probably be better off converting TrueNAS disk, then creating new VM in ESXi and attaching copy of TrueNAS boot disk there.
 
Top