New Import Wizard Available for Migrating VMware ESXi Based Virtual Machines

my version of esxi does not have those options to set
do you need version >7 plus to dho this?
It can be restarted via the cli if there is no troubleshooting optinos. I think it's the following, but don't have an older version to confirm. Vmware should have a KB article how to restart the management agent with older version.
/etc/init.d/hostd restart
/etc/init.d/vpxa restart
 
I have 2 settings I am testing now. After reboot the hostd file change was not enough. I will post again after another reboot and import test in about 30 minutes.

Added: Here is what I am testing

Code:
[root@localhost:~] grep -wns '<soap>' /etc/vmware/hostd/config.xml -A 4
323:    <soap>
324-      <sessionTimeout>0</sessionTimeout>
325-      <maxSessionCount>0</maxSessionCount>
326-    </soap>
327-    <ssl>
[root@localhost:~] grep -wns '<soap>' /etc/vmware/vpxa/vpxa.cfg -A 4
51:    <soap>
52-      <sessionTimeout>1440</sessionTimeout>
53-      <maxSessionCount>6000</maxSessionCount>
54-    </soap>
55-    <ssl>
[root@localhost:~]

[root@localhost:~] /etc/init.d/hostd restart
watchdog-hostd: Terminating watchdog process with PID 2098535
hostd stopped.
hostd started.
[root@localhost:~] /etc/init.d/vpxa restart
watchdog-vpxa: Terminating watchdog process with PID 2099056
vpxa stopped.
vpxa started.
[root@localhost:~]


Added #2: With both of these files adjusted like above imports are working on ESXi 6.7. More testing continues.

Added #3: /etc/vmware/vpxa/vpxa.cfg with <maxSessionCount>0</maxSessionCount> still fails for me, just at a different percentage. So the above with 0 in hostd config.xml and 6000 in vpxa.cfg is what is working best for me at this time. I turn this over to the community for further testing.
Same here: ESXi 6.7 Update 3. Added the suggested entries above but no luck whatsoever. Session fails after +/- 13 Gig. Would be great if the import would just use ssh to copy the image from ESXi to Proxmox and then analyse what properties would be needed and then do the conversion. But he I'm not a programmer

chmod +w to both files (as suggested) does not help either..

transferred 11.2 GiB of 35.0 GiB (32.14%)
transferred 11.6 GiB of 35.0 GiB (33.15%)
transferred 12.0 GiB of 35.0 GiB (34.15%)
transferred 12.3 GiB of 35.0 GiB (35.16%)
transferred 12.7 GiB of 35.0 GiB (36.16%)
transferred 13.0 GiB of 35.0 GiB (37.17%)
qemu-img: error while reading at byte 14260630528: Input/output error
TASK ERROR: unable to create VM 4201 - cannot import from '(<nip>-disk1.vmdk' - copy failed: command '/usr/bin/qemu-img convert -p -n -t none -f vmdk -O raw /run/pve/import/esxi/<snip>-disk1.vmdk zeroinit:/dev/zvol/VMs/vm-4201-disk-1' failed: exit code 1
 
Last edited:
I have 2 settings I am testing now. After reboot the hostd file change was not enough. I will post again after another reboot and import test in about 30 minutes.

Added: Here is what I am testing

Code:
[root@localhost:~] grep -wns '<soap>' /etc/vmware/hostd/config.xml -A 4
323:    <soap>
324-      <sessionTimeout>0</sessionTimeout>
325-      <maxSessionCount>0</maxSessionCount>
326-    </soap>
327-    <ssl>
[root@localhost:~] grep -wns '<soap>' /etc/vmware/vpxa/vpxa.cfg -A 4
51:    <soap>
52-      <sessionTimeout>1440</sessionTimeout>
53-      <maxSessionCount>6000</maxSessionCount>
54-    </soap>
55-    <ssl>
[root@localhost:~]

[root@localhost:~] /etc/init.d/hostd restart
watchdog-hostd: Terminating watchdog process with PID 2098535
hostd stopped.
hostd started.
[root@localhost:~] /etc/init.d/vpxa restart
watchdog-vpxa: Terminating watchdog process with PID 2099056
vpxa stopped.
vpxa started.
[root@localhost:~]


Added #2: With both of these files adjusted like above imports are working on ESXi 6.7. More testing continues.

Added #3: /etc/vmware/vpxa/vpxa.cfg with <maxSessionCount>0</maxSessionCount> still fails for me, just at a different percentage. So the above with 0 in hostd config.xml and 6000 in vpxa.cfg is what is working best for me at this time. I turn this over to the community for further testing.
I confim, this works for ESXi 6.7, but you need to add write access to the conf files first. A chmod +w does the trick.
 
i have problems importing vm's too using the vmware importer.

i tried using the CLI like the posts above, only to find that my /etc/vmware/hostd/config.xml doesnt even have a soap section, and i have no clue where i should add it.
Then the GUI only has the Config.HostAgent.vmacore.soap.sessionTimeout option...

So i'm stuck, like others :)
 
The
i have problems importing vm's too using the vmware importer.

i tried using the CLI like the posts above, only to find that my /etc/vmware/hostd/config.xml doesnt even have a soap section, and i have no clue where i should add it.
Then the GUI only has the Config.HostAgent.vmacore.soap.sessionTimeout option...

So i'm stuck, like others :)
It took me a second to figure it out too, then I noticed that mram's changes appear just above the "<ssl>" section in each file.

I made the changes and restarted hostd and vpxa, but importing from the host still fails after about 5 minutes.

Some extra notes:
  • I have 3 hosts, vCSA, and shared iSCSI storage
  • I made the changes only on the host currently hosting the system being imported
  • Once an import has failed I cannot access that host for 5 - 10 minutes -- instead I get a 500 error.
  • Imports work if I point proxmox to vCSA instead of to the host (I suspect users without a vCSA could create one temporarily in order to do imports using the trial license)
  • Data transfer through the vCSA is about 1/3rd of the rate I get when accessing the host directly.
    • My entire network (including the iSCSI connections) uses 1G
    • Transfer rates:
      • about 3GB/min importing from the host (until the import fails)
      • about 1GB/min importing from the vCSA.
  • I tried a "live" import of a Windows 2008 server
    • I made sure the VMware guest was using a VMWare Paravirtual SCSI adapter before starting
    • It was a couple hours before I could login to the server
    • Once the migration was complete, windows insisted on running chkdsk
    • After chdsk was complete, windows was more or less non-functional (windows booted, but much of \windows\system32 was missing)
    • I am repeating this import without "live"
 
  • Like
Reactions: Lincee
This is slow, if you boot live the machine is slow and larger machines will be very slow for a long time. Isn't it better to do like most backup software do?
1. Using API, do snapshot.
2. Get files from ESXi
3. Poweroff machine using API
4. Get last data
5. Poweron

This will make the machine quick while running in Vmware, and quick once booted on proxmox. No slow time that can take a loong time on larger machines.
If this was easy we certainly would have done it, but we had to resort to whatever is actually available for Proxmox VE from the outside (i.e., no terms-of-services-ridden-with-restrictions SDKs or the like).

My way would be faster as the data ends up on correct storage directly. Anyway, it was an idea to explore and make the software better.

Note that our storage-migration with replication exactly works like that, so we're aware of such a design in general, just could not find the necessary way to access it.

After all we're no VMware developer experts, and handling proprietary systems is always a bit like working with some black box, and finally we also wanted to bring something out, improving the underlying system can still be done without affecting how this is integrated into Proxmox VE.
But if you know of some way we missed that Proxmox VE could use here, we'd be happy to hear specific details from how to access that, or even see a proof-of-concept over at our development mailing lists.
 
  • Like
Reactions: Verulam
The

It took me a second to figure it out too, then I noticed that mram's changes appear just above the "<ssl>" section in each file.

I made the changes and restarted hostd and vpxa, but importing from the host still fails after about 5 minutes.

Some extra notes:
  • I have 3 hosts, vCSA, and shared iSCSI storage
  • I made the changes only on the host currently hosting the system being imported
  • Once an import has failed I cannot access that host for 5 - 10 minutes -- instead I get a 500 error.
  • Imports work if I point proxmox to vCSA instead of to the host (I suspect users without a vCSA could create one temporarily in order to do imports using the trial license)
  • Data transfer through the vCSA is about 1/3rd of the rate I get when accessing the host directly.
    • My entire network (including the iSCSI connections) uses 1G
    • Transfer rates:
      • about 3GB/min importing from the host (until the import fails)
      • about 1GB/min importing from the vCSA.
  • I tried a "live" import of a Windows 2008 server
    • I made sure the VMware guest was using a VMWare Paravirtual SCSI adapter before starting
    • It was a couple hours before I could login to the server
    • Once the migration was complete, windows insisted on running chkdsk
    • After chdsk was complete, windows was more or less non-functional (windows booted, but much of \windows\system32 was missing)
    • I am repeating this import without "live"

I'm in the process of downloading VCSA, see if that works somehow :)
So vcsa doesnt seem to work for me :( it hangs at "initialising 0%"
Edit 1:
So i guess i'll just have to do things the old fashioned way :(

Edit 2:
Funny enough i tried a new transfer, before it always stopped at 15.03GB but now its at 28GB.. Its very slow, but i can live with that i suppose. I'll just be praying it completes succesfully!

Edit 3:
I have no clue how or why, but i succeeded in importing my first VM :)

Edit 4:
I have successfully imported two Windows server 2016 VM's!
 
Last edited:
  • Like
Reactions: jlauro
After several tests and obtaining different errors, it has been determined that it is even caused by the number of API queries that ESXi allow.

Therefore, they must find the following key:

Config.HostAgent.vmacore.soap.maxSessionCount

Screenshot 2024-04-01 at 2.20.37 PM.png
Change the value to 0.

With this change, I have made the integration successful.

Screenshot 2024-04-01 at 2.22.35 PM.png
 
  • Like
Reactions: Lincee
If this was easy we certainly would have done it, but we had to resort to whatever is actually available for Proxmox VE from the outside (i.e., no terms-of-services-ridden-with-restrictions SDKs or the like).



Note that our storage-migration with replication exactly works like that, so we're aware of such a design in general, just could not find the necessary way to access it.

After all we're no VMware developer experts, and handling proprietary systems is always a bit like working with some black box, and finally we also wanted to bring something out, improving the underlying system can still be done without affecting how this is integrated into Proxmox VE.
But if you know of some way we missed that Proxmox VE could use here, we'd be happy to hear specific details from how to access that, or even see a proof-of-concept over at our development mailing lists.
xen-orchestra have done a vmware importer too last year, and AFAIK, they are taking a snapshot first, so a first sync, and stop the vm, and sync the delta.

Maybe it could help to have more info about api && feature available in vmware

https://github.com/vatesfr/xen-orchestra/tree/8b7e1b3d7c4af91f3503b1a04dee470b942ca26b/@xen-orchestra/vmware-explorer



Another way could be also to use nfs shared between proxmox && vmware, migrating first vmware vm to nfs with live storage motion, stop the vm, start the vm on proxmox side , then do a live storage migration from nfs/vmdk to final storage.
I have migrated around 500 vms last year with this method, and it's working really fine, with only some seconds of downtime (only a stop/start of the vm)
 
Last edited:
  • Like
Reactions: hanoon
Hi All,

Great to see this now added, though I am having some issues with getting it to work, so I am kind of hoping to get some help or some advice/directions.

My ESXi Server:
1712017851786.png

Licensing:

VMware vSphere 6 Enterprise Plus (Fully licensed)

The Issue:
- I got to the proxmox cluster, click on Data Centre >>> Storage >>> Add ESXi
- Fill in the information pointing to the server with all the right credentials
- After about 90 seconds I get teh following error:
1712017991885.png

Unknown reason and canot see anything in the journal that is obvious on the proxmox side.

Cheers,
David.
 
xen-orchestra have done a vmware importer too last year, and AFAIK, they are taking a snapshot first, so a first sync, and stop the vm, and sync the delta.

Maybe it could help to have more info about api && feature available in vmware

https://github.com/vatesfr/xen-orchestra/tree/8b7e1b3d7c4af91f3503b1a04dee470b942ca26b/@xen-orchestra/vmware-explorer
However, this tool has some limitations.
Maximum 3 vDisks per VM and no vDisk larger than 2TB.
Another way could be also to use nfs shared between proxmox && vmware, migrating first vmware vm to nfs with live storage motion, stop the vm, start the vm on proxmox side , then do a live storage migration from nfs/vmdk to final storage.
I have migrated around 500 vms last year with this method, and it's working really fine, with only some seconds of downtime (only a stop/start of the vm)
This is the stable method used to date for fast migrations. However, it requires a few manual steps that cannot be easily automated.
 
Another way could be also to use nfs shared between proxmox && vmware, migrating first vmware vm to nfs with live storage motion, stop the vm, start the vm on proxmox side , then do a live storage migration from nfs/vmdk to final storage.
I have migrated around 500 vms last year with this method, and it's working really fine, with only some seconds of downtime (only a stop/start of the vm)
How did you create the new VM on Proxmox? Just create a VM with similar specs and then add the vmdk-storage? Or is there a convert-script where i can convert the vmx-definitions directly into a Proxomx-VM?
I find the import-way Proxmox implemented very handy since it copies all the hardware-specs automatically.
 
How did you create the new VM on Proxmox? Just create a VM with similar specs and then add the vmdk-storage? Or is there a convert-script where i can convert the vmx-definitions directly into a Proxomx-VM?
I find the import-way Proxmox implemented very handy since it copies all the hardware-specs automatically.
You must create a new VM with similiar Settings like your ESXi VM and look at the Wiki.
https://pve.proxmox.com/wiki/Migrate_to_Proxmox_VE#Attach_Disk_.26_Move_Disk_.28minimal_downtime.29
 
Or a good programmer finds a way to make sure that the vSphere VMs are on an NFS and the PVE also has access. Then you could also automate this part.
 
However, this tool has some limitations.
Maximum 3 vDisks per VM and no vDisk larger than 2TB.

This is the stable method used to date for fast migrations. However, it requires a few manual steps that cannot be easily automated.
the 2TB is the limit of xen vhd format (yes, the format from 2010 ..) ^_^.
The interesting part are the api calls example (I think about vmdk snapshot delta parsing for example), as vmware is almost a blackbox.
 
The

It took me a second to figure it out too, then I noticed that mram's changes appear just above the "<ssl>" section in each file.

I made the changes and restarted hostd and vpxa, but importing from the host still fails after about 5 minutes.

Some extra notes:
  • I have 3 hosts, vCSA, and shared iSCSI storage
  • I made the changes only on the host currently hosting the system being imported
  • Once an import has failed I cannot access that host for 5 - 10 minutes -- instead I get a 500 error.
  • Imports work if I point proxmox to vCSA instead of to the host (I suspect users without a vCSA could create one temporarily in order to do imports using the trial license)
  • Data transfer through the vCSA is about 1/3rd of the rate I get when accessing the host directly.
    • My entire network (including the iSCSI connections) uses 1G
    • Transfer rates:
      • about 3GB/min importing from the host (until the import fails)
      • about 1GB/min importing from the vCSA.
  • I tried a "live" import of a Windows 2008 server
    • I made sure the VMware guest was using a VMWare Paravirtual SCSI adapter before starting
    • It was a couple hours before I could login to the server
    • Once the migration was complete, windows insisted on running chkdsk
    • After chdsk was complete, windows was more or less non-functional (windows booted, but much of \windows\system32 was missing)
    • I am repeating this import without "live"
Thanks for your post, I noticed that you mention the change just above "<ssl>" section, so I just try to relocate the location of <soap>, and I succeed! Here is what my config is:

% vi /etc/vmware/hostd/config.xml

<soap>
<sessionTimeout>0</sessionTimeout>
<maxSessionCount>0</maxSessionCount>
</soap>

<ssl>
<doVersionCheck> false </doVersionCheck>
<!-- allowed SSL/TLS protocol versions -->
<!-- <protocols>tls1.0,tls1.1,tls1.2</protocols> -->
<libraryPath>/lib/</libraryPath>
</ssl>

% /etc/init.d/hostd stop ; /etc/init.d/hostd start
 
the 2TB is the limit of xen vhd format (yes, the format from 2010 ..) ^_^.
The interesting part are the api calls example (I think about vmdk snapshot delta parsing for example), as vmware is almost a blackbox.
For reasons of stability, I don't believe in using third-party snapshot technologies and manipulating the system.

Then I would find it better to link the VM Config Importer with the NFS Share Migration.
I have been using the migration via NFS shares successfully for years and there has never been a problem with the storage for any of the many hundreds of VMs. The only problems are with old operating systems that should no longer exist.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!