Vix error code 21004

Naki

    • Share

Yes, this is only for VMware Workstation, maybe Fusion, but not ESXi.


  • Like


    1

Link to comment
Share on other sites

edem2302

    • Share

Just now, Naki said:

Yes, this is only for VMware Workstation, maybe Fusion, but not ESXi.

ok thanks, so for me the last version is 3.0.0?

i don’t know where is my problem…

somebody have mojave on esxi 6.7 U3 works ?

Link to comment
Share on other sites

BDisp

    • Share
Link to comment
Share on other sites

  • 2 weeks later…

Cybernut

    • Share

On 11/1/2019 at 12:58 PM, edem2302 said:

ok thanks, so for me the last version is 3.0.0?

i don’t know where is my problem…

somebody have mojave on esxi 6.7 U3 works ?

I was able to start up and run my Mojave VM under ESXi 6.7 U3 — no issues. I did need to reinstall the Unlocker 3.0 after the ESXi upgrade (from 6.7 U2). Unlocker 3.0 seemed to work fine before for me so I stayed with 3.0…never used 3.01 or 3.02. When installing macOS, make sure you erase the hard drive partition (using Apple’s Disk Utility) and set the new partition to be of type APFS. I believe, I used to be able to use HFS+ in High Sierra, but for Mojave it is absolutely necessary to use APFS as the file system.

1.jpg

2.JPG


Edited November 15, 2019 by Cybernut


  • Like


    1

Link to comment
Share on other sites

edem2302

    • Share

On 11/15/2019 at 9:07 AM, Cybernut said:

I was able to start up and run my Mojave VM under ESXi 6.7 U3 — no issues. I did need to reinstall the Unlocker 3.0 after the ESXi upgrade (from 6.7 U2). Unlocker 3.0 seemed to work fine before for me so I stayed with 3.0…never used 3.01 or 3.02. When installing macOS, make sure you erase the hard drive partition (using Apple’s Disk Utility) and set the new partition to be of type APFS. I believe, I used to be able to use HFS+ in High Sierra, but for Mojave it is absolutely necessary to use APFS as the file system.

1.jpg

2.JPG

Ok thanks for the reply !

i can’t use apple disk utility because i can’t go after the apple logo…

i have try different iso (make with my macbook) the iso seems good but can’t boot…

i have a boot loop.

Link to comment
Share on other sites

Cybernut

    • Share

7 hours ago, edem2302 said:

Ok thanks for the reply !

i can’t use apple disk utility because i can’t go after the apple logo…

i have try different iso (make with my macbook) the iso seems good but can’t boot…

i have a boot loop.

I recommend uninstalling and re-installing Unlocker 3.0 for ESXi. If you still get boot loop after that, then that means the problem is with your Mojave iso.

Link to comment
Share on other sites

MetaMetal

    • Share

Hello!

I have successfully installed Mojave using unlocker. (ESXi6.7U3)

However, even if Tools are installed, all sounds become noise.

Is there a solution for this problem?

Thanks.

Link to comment
Share on other sites

edem2302

    • Share

On 11/20/2019 at 6:27 AM, Cybernut said:

I recommend uninstalling and re-installing Unlocker 3.0 for ESXi. If you still get boot loop after that, then that means the problem is with your Mojave iso.

yes, i have try uninstall and re-installing 4 or 5 times, same result.

maybe it’s my mojave you’re right…

i’ll try…but i don’t see where i made a mistake…

thanks for your help

Link to comment
Share on other sites

aqwinen

    • Share

I have run into a problem using Unlocker and Catalina (10.15.1 19B88). I have tried this from a generated iso, using various tools in the macAdmin community (namely vfuse, AutoDMG, and installinstallmacos.py). 

I am using an Intel Nuc (NUC Kit NUC6i7KYK) with the following details below:

image.thumb.png.ddacd337a93a30563e871f64ba071572.png

As my main goal here is to test our DEP & MDM workflows on a non apple based esxi machine, I need to use a keyboard input. However, this appears to generate a problem. When setting the device to Apple macOS 10.14 as the VMs guest, the machine boots successfully, but keyboard input does not work correctly.

For instance, here:

image.png.3d2369d15fffdee988c2053978243541.png

I am presented with an authentication window, but, every key I press automatically initiates the cancel button, in the example above, I am hitting command which somehow sets «cancel». 

The only thing I can think of here is unlocker and changes in 10.15.. As the behavior doesn’t happen with Mojave and below, and didn’t happen with Catalina betas either. 

Alternatively, is anyone else having isues with running Catalina 10.15 (non-beta software) on ESXi 6.7u3 with Unlocker and having issues with keyboard inputs?

Link to comment
Share on other sites

BWEL

    • Share

Dear Donk,

Thank you so much for the Unlocker releases. They’re always of major help. The issue I see right now is the following:

All recent unlockers modified to work with VMware Workstation 15.5.x:

https://github.com/DrDonk/unlocker

https://github.com/paolo-projects/unlocker

https://github.com/BDisp/unlocker

have the following issue:

You cannot install any macOS in new machines. 

The Installation ISO works fine in VMware Workstation 15.10, but it doesn’t work in VMWare Workstation 15.5.x

Upon installation of macOS 10.11x, 10.12.x, 10.13.x, 10.14.x the error displayed at the state of starting the installation upon formatting the hardddrive with DiskUtilities is: «CORRUPTED INSTALLATION DISK»

macOS Catalina 10.15.x ISOs will install only by turning board-id.reflectHost = «TRUE». If board-id.reflectHost = «FALSE» then the installation will not proceed. it will be just stuck at continue with no error message.

As I mentioned the installation media I used works fine in 15.10 and preinstalled machines with whichever version of macOS will run just fine, however it is impossible to install new ones.

I believe Unlocked is missing something. Can you please check this out?

Thank you so much!

Link to comment
Share on other sites

Cybernut

    • Share

On 12/1/2019 at 2:46 AM, BWEL said:

Dear Donk,

Thank you so much for the Unlocker releases. They’re always of major help. The issue I see right now is the following:

All recent unlockers modified to work with VMware Workstation 15.5.x:

https://github.com/DrDonk/unlocker

https://github.com/paolo-projects/unlocker

https://github.com/BDisp/unlocker

have the following issue:

You cannot install any macOS in new machines. 

The Installation ISO works fine in VMware Workstation 15.10, but it doesn’t work in VMWare Workstation 15.5.x

Upon installation of macOS 10.11x, 10.12.x, 10.13.x, 10.14.x the error displayed at the state of starting the installation upon formatting the hardddrive with DiskUtilities is: «CORRUPTED INSTALLATION DISK»

macOS Catalina 10.15.x ISOs will install only by turning board-id.reflectHost = «TRUE». If board-id.reflectHost = «FALSE» then the installation will not proceed. it will be just stuck at continue with no error message.

As I mentioned the installation media I used works fine in 15.10 and preinstalled machines with whichever version of macOS will run just fine, however it is impossible to install new ones.

I believe Unlocked is missing something. Can you please check this out?

Thank you so much!

Can you please post off-topic items in other threads (or create new threads if needed)? This thread is for Unlocker for ESXi, not Workstation. I do not care about issues with Workstation. And looks like you did post in other relevant threads (https://www.insanelymac.com/forum/topic/340416-unlocker-vmware-workstation-155/?do=findComment&comment=2699256) so please don’t spam.


Edited December 3, 2019 by Cybernut

Link to comment
Share on other sites

  • 2 weeks later…

Cristina89

    • Share

on startup

Error.png.b8e2515eb4a5ca3e19185a471c385c6f.png

Link to comment
Share on other sites

Cybernut

    • Share

1 hour ago, Cristina89 said:

on startup

Error.png.b8e2515eb4a5ca3e19185a471c385c6f.png

I could be wrong but looks like your unlocker was not installed properly.

Did you follow the instruction to verify that the install of unlocker was successful?

If not, uninstall and reinstall unlocker and then verify it was successful.


Edited December 15, 2019 by Cybernut

Link to comment
Share on other sites

Cristina89

    • Share

no error

ESXI.thumb.JPG.d281d456bdb718475f578f3d0fb1e066.JPG

Link to comment
Share on other sites

Cybernut

    • Share

11 hours ago, Cristina89 said:

no error

ESXI.thumb.JPG.d281d456bdb718475f578f3d0fb1e066.JPG

Yes, no error — but to be sure there is a test (to check if install was successful).

Look in the readme.txt file — in section 4, on how to run the test.

If your test results match with readme’s results, then I am sorry, I don’t know what the problem is — but the error looks more unlocker-related than macOS-related.

Link to comment
Share on other sites

Cristina89

    • Share

Test OK

Tets.JPG.fd61b2f60a03214fb19189baa9bc84a8.JPG

Link to comment
Share on other sites

Cybernut

    • Share

23 hours ago, Cristina89 said:

Test OK

Tets.JPG.fd61b2f60a03214fb19189baa9bc84a8.JPG

Then I suspect something is wrong with your macOS installer.

I hope you build your installer iso. I never download installer iso from Internet — always a good chance of malware, etc. hidden.

I had no problems installing High Sierra (10.13.6), Mojave (1014.6) and the latest Catalina (10.15.2) using Unlocker 3.0

Link to comment
Share on other sites

Cybernut

    • Share

Just an fyi. It is possible to install and run the latest Catalina (10.15.2) released on December 10, 2019, on ESXi 7.6 U3 using Unlocker 3.0.

I had some trouble installing the previous version of Catalina (10.15.1) and had given up.

But with the new Catalina I tried again and though I got the same error again (basically I was stopped during the installer loading — it never finishes loading), I tried one more time, but during VM configuration this time instead of changing my CDROM device to an IDE, I left it as a SATA device and installer loaded without problems. I proceeded with the rest of the installation, and everything worked as expected. I have not had the chance to experiment with that setting using the previous Catalina (10.15.1) once more…hopefully that will work with 10.15.1 too.

When creating the VM, I chose VM type of ESXi 7.6 U2 (since U3 type is not available). And chose macOS 10.14 (since 10.15 is not available).

Anyway, here’s the screenshots:

ESXi1.thumb.png.019cf11c684a59abda51b511daeadc35.png

Catalina.thumb.png.26318d10d26f3e4907c77ae11f3bc06e.png


Edited December 17, 2019 by Cybernut

Link to comment
Share on other sites

Cristina89

    • Share
error without operating system, macOS OK

1014.thumb.JPG.4795d4bfa8e1eef00108f09cc541d9ba.JPG

Link to comment
Share on other sites

  • 4 weeks later…

arunkchow

    • Share

We’re a small org. We were on 6.0 and I used Unlocker 2.x to install Mojave. It was successful.

A colleague of mine upgraded to 6.5.

Now Mojave guest throws an error saying the host is not suitable or compatible when I try to power it on.

I ended up here and I wanted to try Unlocker 3.0.

I know the instructions say that I need to uninstall any existing scripts but in the process of upgrade we lost the version of script and we downloaded before. So I used 2.08, ran uninstall rebooted.

Then I downloaded 3.0 and installed it.

Script executes just fine and says it’s successful prompting me to reboot.

However when I try the script to check it returns with smcpresent = false.

We thought we had secure boot enabled but when we ran the python script from VMware, it says that Secure boot is not enabled on the host.

I’m not sure what’s causing this issue while it’s working for many people.

Any insights greatly appreciated.

Thanks.

Link to comment
Share on other sites

  • 2 weeks later…

Kaku

    • Share

What’s the difference between version 3 and version 2.1?

Link to comment
Share on other sites

  • 2 months later…

QuaXell

    • Share

I am trying to install the unlocker 3.0. I downloaded it from: https://github.com/benevo/esxi-unlocker. The installation script referes to an unlocker.tgz which is not present in the release file.

When I rename esxi-unlocker-3.0.0.tar.gz unlocker.tgz and try to use it with the esxi-install.sh script it does seem to go through and I see the unlocker.tgz being copied to /bootbank/ and see the entry being added to /bootbank/boot.cfg but when I reboot nothing happens. If I manually execute the script etc/rc.local.d/unlocker.py then the path is indeed apply and I can run MacOS VM but if I reboot my host machine, the changes are lost and I need to re-execute the unlocker.py script again.

What am I missing, where should I download the unlocker.tgz from?

Thank you!

Link to comment
Share on other sites

  • 2 weeks later…

zennit

    • Share

Long shot I’ve got a pci to pci-e converter attached to a usb controller that passes through to windows fine but when passing to the macOS Vm I don’t get any console. Any ideas what the issue is related to?

Link to comment
Share on other sites

installdemo

    • Share

Anyone else tried ESXi 7.  I did and the patch ran but the system (host) booted but I could not log into it (couldn’t find some file)

I wish to use my existing 6.5 VMs of Mojave and Catalina, which are working find but on a clean USB install of ESXi 7 the machines won’t power on without something.

I don’t need to  create them, I just want/need to start them on ESXi 7

Anybody can think of a short term fix?

Link to comment
Share on other sites

installdemo

    • Share

Is an ‘upgrade’ from ESXi 6.7 (unlocker 3.0 installed) to ESXi 7.0 likely to keep currently working Mojave and Catalina VMs functioning?

Since the machines are already created the question would really be if they will continue to Power On?

I tried a fresh v7 install that did not go too well. So, now I’m exploring an in place upgrade

Any thoughts?

Link to comment
Share on other sites

  • #1

Доброго времени суток! Обновил vsphere 5.5 до версии 6.5. В связи с этим на всех виртуальных машинах повылезали алярмы:

Код:

Vmware tools is outdated on this virtual machine

Когда жамкаю на обновить получаю такое

The required VMware Tools ISO image does not exist or is inaccessible.
vix error code = 21001
Unable to install VMware Tools. An error occurred while trying to access image file «/usr/lib/vmware/isoimages/windows.iso» needed to install VMware Tools: 2 (No such file or directory). Please refer the product documentation or KB article 2129825 for details about how to get VMware Tools package for this guest operating system.

Какой iso образ требуется? ISO с vSphere 6.5 или c vCenter?

— -Подумал и добавил — —

или еще какой то? Можно ли без ISO обновить?

Последнее редактирование модератором: 08.10.2020

  • #2

Код:

isolation.tools.autoInstall.disable = TRUE

поставьте в FALSE

Нажмите на изображение для увеличения.   Название:	Oshibka-vix-error-code-21009-pri-obnovlenii-VMware-Tools-v-vCenter-5.53.jpg  Просмотров:	1  Размер:	18.5 Кб  ID:	6202

Последнее редактирование модератором: 08.11.2018

  • #3

Доброго времени суток! Обновил vsphere 5.5 до версии 6.5. В связи с этим на всех виртуальных машинах повылезали алярмы:

Код:

Vmware tools is outdated on this virtual machine

Когда жамкаю на обновить получаю такое

Какой iso образ требуется? ISO с vSphere 6.5 или c vCenter?

— -Подумал и добавил — —

или еще какой то? Можно ли без ISO обновить?:gowork:

у меня такая же проблема, но я не могу найти где этот ключ добавлять.. А если у меня свыше ста виртуальных машин — мне что в каждой этот ключ добавлять ??

Последнее редактирование модератором: 08.10.2020

  • #4

проблема возникла только с одной виртуальной машиной и на одном ESXi? Если Выполнить миграцию виртуальной машины на другой ESXi, то проблема сохраняется?

  • #5

у меня только на некоторых ESXi в HA-кластере почему-то не работает, а на некоторых работает..

Последнее редактирование модератором: 08.10.2020

  • #6

у меня только на некоторых ESXi в HA-кластере почему-то не работает, а на некоторых работает..:upset:

Попробуйте подключиться к ESXi (где обнаружена проблема) по SSH и выполнить команду

Код:

ls -la /usr/lib/vmware/isoimages/

Далее по статье

  • #7

у меня там совсем плохо. вывод пустой

  • #8

в смысле пусто? С проблемного ESXi дайте вывод с корня

  • #9

Я нашел в логах вот это

2019-04-24T07:04:45.493Z DEBUG lun — naa.200049454505080f
2019-04-24T07:04:45.493Z DEBUG Trying /vmfs/devices/disks/naa.200049454505080f
2019-04-24T07:04:45.525Z cpu27:3428934)Partition: 861: MBR table with partition type ‘0xee’ detected on naa.200049454505080f. However, it does not have a valid GPT table. Is this a valid MBR disk?
2019-04-24T07:04:45.525Z cpu27:3428934)WARNING: Partition: 1270: Partition 9 is active, failure to update partition table for naa.200049454505080f
2019-04-24T07:04:45.558Z cpu27:3428934)Partition: 861: MBR table with partition type ‘0xee’ detected on naa.200049454505080f. However, it does not have a valid GPT table. Is this a valid MBR disk?
2019-04-24T07:04:45.558Z cpu27:3428934)WARNING: Partition: 1270: Partition 9 is active, failure to update partition table for naa.200049454505080f
2019-04-24T07:04:45.929Z ERROR Exception: The primary GPT table is corrupt, but the backup appears OK, so that will be used. Fix primary table ? diskPath (/dev/disks/naa.200049454505080f) diskSize (15261696) AlternateLBA (1) LastUsableLBA (15261662)
2019-04-24T07:04:45.929Z INFO Discovered lun — naa.200049454505080f (console /vmfs/devices/disks/naa.200049454505080f) — JetFlash Mass Storage Dev (7452 MiB, vmkusb)
2019-04-24T07:04:45.930Z DEBUG lun — naa.60060160f1503500f28e04860afee411
2019-04-24T07:04:45.930Z DEBUG Trying /vmfs/devices/disks/naa.60060160f1503500f28e04860afee411
2019-04-24T07:04:46.012Z DEBUG Found overlap in fsTable: ‘vmfs3’ .. overriding ‘<class ‘weasel.fsset.vmfs3FileSystem’>’ with ‘<class ‘weasel.fsset.vmfs3FileSystem’>’.
2019-04-24T07:04:46.013Z DEBUG Executing: partedUtil getptbl /vmfs/devices/disks/naa.60060160f1503500f28e04860afee411

Вывод ls -la

Код:

 ls -la
total 745
drwxr-xr-x    1 root     root           512 Apr 23 13:29 .
drwxr-xr-x    1 root     root           512 Apr 23 13:29 ..
-rw-------    1 root     root            90 Apr 24 08:25 .ash_history
-r--r--r--    1 root     root            20 Apr 18  2018 .mtoolsrc
lrwxrwxrwx    1 root     root            49 Aug  2  2018 altbootbank -> /vmfs/vo                 lumes/918fd6ea-b4565fa8-8059-f94e7437a97c
drwxr-xr-x    1 root     root           512 Aug  2  2018 bin
lrwxrwxrwx    1 root     root            49 Aug  2  2018 bootbank -> /vmfs/volum                 es/51d7dbe1-addd68f1-4fb4-eb6e2e62a538
-r--r--r--    1 root     root        505734 Apr 18  2018 bootpart.gz
drwxr-xr-x   16 root     root           512 Apr 24 08:25 dev
drwxr-xr-x    1 root     root           512 Mar 30 16:40 etc
drwxr-xr-x    1 root     root           512 Aug  2  2018 lib
drwxr-xr-x    1 root     root           512 Aug  2  2018 lib64
-r--r--r--    1 root     root         18571 Aug  2  2018 local.tgz
drwxr-xr-x    1 root     root           512 Apr 23 13:29 locker
drwxr-xr-x    1 root     root           512 Aug  2  2018 mbr
drwxr-xr-x    1 root     root           512 Aug  2  2018 opt
drwxr-xr-x    1 root     root        131072 Apr 24 08:25 proc
lrwxrwxrwx    1 root     root            23 Aug  2  2018 productLocker -> /locke                 r/packages/6.5.0/
lrwxrwxrwx    1 root     root             4 Apr 18  2018 sbin -> /bin
lrwxrwxrwx    1 root     root            12 Aug  2  2018 scratch -> /tmp/scratch
lrwxrwxrwx    1 root     root            49 Aug  2  2018 store -> /vmfs/volumes/                 56433ca7-649f769d-31e8-0027b5a0005f
drwxr-xr-x    1 root     root           512 Aug  2  2018 tardisks
drwxr-xr-x    1 root     root           512 Aug  2  2018 tardisks.noauto
drwxrwxrwt    1 root     root           512 Apr 24 08:01 tmp
drwxr-xr-x    1 root     root           512 Aug  2  2018 usr
drwxr-xr-x    1 root     root           512 Aug  2  2018 var
drwxr-xr-x    1 root     root           512 Aug  2  2018 vmfs
drwxr-xr-x    1 root     root           512 Aug  2  2018 vmimages
lrwxrwxrwx    1 root     root            18 Apr 18  2018 vmupgrade -> /locker/vm                 upgrade/

  • #10

Даже картинка есть

  • photo606.png

    photo606.png

    77,1 КБ

    · Просмотры: 3

  • #11

Похоже flash диски помирают у вас. Попробуйте перейти в

Код:

/usr/lib/vmware/isoimages/

и создать там файл — похеру какой

Surf_rider


  • #12

лучше зайти сразу в

Код:

/vmfs/volumes/56433ca7-649f769d-31e8-0027b5a0005f

и там создать попытаться, но думаю ничего не получится

Последнее редактирование: 08.10.2020

  • #13

Вобщем такие дела

Код:

 cd /vmfs/volumes/56433ca7-649f769d-31e8-0027b5a0005f
-sh: cd: [B]can't cd to /vmfs/volumes/56433ca7-649f769d-31e8-0027b5a0005f[/B]

  • #14

че делать то в итоге?:wtf:

  • #15

ошибка, которая у вас возникает связана с недоступностью USB диска. На данном разделе хранятся ISO образы VMware tools. Из-за этого не получается выполнить обновление VMware tools. Так как в логах были зафиксированы ошибки, которые указывают на повреждение данных, то рекомендуется выполнить проверку USB диска. Возможно потребуется замена USB диска и переустановка ESXi. Как то так. Работки подвалило.

Последнее редактирование модератором: 08.10.2020

 ** UPDATE 12/03/2020**

THIS WORKS WITH BIG SUR TOO!

This now installs natively on ESXi 6.7 Update 3 Patch 02 — 202004002

I followed my same procedure below after downloading Catalina and Big Sur. 

Note: I am running as root using sudo su —

** I increased the image sise to 13GB as Some Catalina versions were greater than 8GB and Big Sur is 12.9GB

hdiutil create -o /tmp/catalina -size 13000m -layout SPUD -fs HFS+J

hdiutil attach /tmp/catalina.dmg -noverify -mountpoint /Volumes/install_build

/Applications/Install macOS Catalina.app/Contents/Resources/createinstallmedia —volume /Volumes/install_build

hdiutil convert /tmp/catalina.dmg -format UDTO -o ~/Downloads/catalina

mv ~/Downloads/catalina.cdr ~/Downloads/catalina.iso

rm -f /tmp/catalina.dmg. 

Next, I copy the ISO to a external system (my desktop) an a network drive where I will install from.

In VMware (I am using vCenter) 

Create a new VM

Name it, I use macos-catalina

Pick a folder, Pick a Server/resource Pool and Pick Storage

For Compatibility, click the dropdown and select ESXi 6.7 Update 2 and later

For Select OS, click the Gueast OS Family drop down and select Other

For Guest OS Version, click the dropdown and select Apple macOS 10.14 (64-bit)

I add 4 vCPU and 4GB memory as a base. 

Under the datastore, I choose Disk Provisioning Thin Provision

For Video Cars, I choose Auto-detect settings

Finish and save the VM

To install, I open a remote console on the VM

Start the VM

Select VMRC — > Removable Devices -> CD/DVD Drive1 -> Connect to Disk Image File (ISO)

Navigate to ISO file and attach.

In the OS boot menu, select SATA CD/DVROM, then boot to the installer

From the install menu, select Disk Util

Select the VMware Virtual Disk

Select Erase

Give the disk a name

Once erased, exit the disk util

Start the macOS installer and complete the install steps.  This takes about 45 minutes total.

Once installed, disconnect the ISO from the console client.

Reboot one last time to make sure it still boots OK.

 ** UPDATE 04/15/2020**
Seems you need to start at Mojave to be able to download the full Catalina package from the App Store. I started from Mojave so I never ran into the issues found in the comments. Check the comments for what Adam had to say…

** UPDATE 10/17/2019**
After applying the first update, the VM was rendered un-bootable again. That is the same crash that is originally experienced.  SEE Boot Work Around at the bottom.

This exercise was to get a running MacOS Catalina VM instance running on VMware. I first wrote this for Catalina Beta but afte rthe official release, a couple things changed.  So now it is how to install Catalina on ESXi 6.7.

I am using a 2013 Mac Pro with VMWare 6.7 U2 installed. I have High Sierra and Mojave VMs running on the host. Running VMs on VMware is something I’ve done for a few years. 

A lot has changed in Catalina. Admittedly, I am not a MacOS expert. I’m not particularly good a Mac user either. So, I can’t speak to the changes only that it is not currently (Oct 1, 2019) frienld to install on VMware ESXi. Catalina runs fine once you get a working VM though.

The MacOS Part

As of this writing (10/10/2019), You cannot upgrade and existing VM running High Sierra or Mojave. At least, I could not successfully upgrade and boot to Catalina.  

If at first You Don’t Succeed…

Note: You need to start at Mojave to upgrade to download the fill Catalina package. 

I started with trying to upgrade a Mojave VM to Catalina. I just downloaded Catalina from the Apple Store (Search: macos catalina). 

I followed the prompts and downloaded the Catalina installation image. I ran though the installation process which seemed to go pretty well. That is until it booted from the upgraded image. Then, it crashed. You can’t see the crash, you just has an frozen Apple logo.

To see what is happening, reboot the VM and hold down the Windows Key + v for Verbose mode and see the boot attempt and the kernel panic. Changing VMware setting had no affect. After a couple hours, I gave up.

Try Something Else… And It Worked!

My next tack was to boot from a Catalina ISO. First, I had to create one. I’d done this before on Mojave so it wasn’t all unfamiliar.  The steps are below. I am not sure where they came from.

First, I had to boot back to Mojave. I had found by rebooting the VM to the Boot Manager settings (you can set this in the VM settings or press escape before the OS loads in a VM console) and Selecting the EFI VMware Virtual SATA Hard Drive (0,0) option (not Mac OS X), that boots to my original Mojave image.

To start from scratch on a Mojave instance, download Catalina from the app store (Search: macos catalina). Just don’t run the installer. You need the app image to create the ISO.

Once Mojave loaded, to build the ISO file, I start by making the virtual disk:

hdiutil create -o /tmp/catalina -size 13000m -layout SPUD -fs HFS+J

Then, I mount it to I can copy the installer to it

hdiutil attach /tmp/catalina.dmg -noverify -mountpoint /Volumes/install_build

Now I copy the installer to the mounted image

sudo /Applications/Install macOS Catalina.app/Contents/Resources/createinstallmedia —volume /Volumes/install_build

The image is automatically mounted and is on your desktop. Select it and un-mount the image.

Now convert the image to an ISO file. You can put the file anywhere but I used ~/Downloads for simplicity

hdiutil convert /tmp/catalina.dmg -format UDTO -o ~/Downloads/catalina

Now rename the file from catalina.cdr to catalina.iso

mv ~/Downloads/catalina.cdr ~/Downloads/catalina.iso

You can delete /tmp/catalina.dmg. 

Copy the ISO to your PC or where ever you want to attach it to the VM via a console session.  I use WinSCP to copy to my PC.

The VMware Part

I created a blank VM with the following settings:

These are important. Just follow my lead here.

Guest OS: Other

Guest OS Version: Apple macOS 10.14 64-bit

2 vCPU

4GB Memory

100GB Disk space

VMware settings

Once the VM is saved, edit the settings and change to
Guest OS: Windows

Guest OS Version: Windows 10 64-bit

Changed to Windows 10

Next…
Open a Remote Console (VMRC)

Power on the VM

Click VMRC —> Removeable Devices —> CD/DVD —> Connect to Disk Image File

Navigate to the catalina.iso file you saved where ever, Click Open

Attach ISO

Now ALT+CTRL+Insert in the VM to reboot it. It will boot from the ISO automatically. If not select the SATA CDROM frm the EFI menu.  Note, sometimes it took several reboots for it to successfully boot from the ISO. usually, just one.

Once the installer image loads, use the disk tool to erase the VMware virtual disk (100GB in my case)

Use the default erase options (Note: Your keyboard doesn’t work so just accept «Untitled»)

Quit the disk utility

Next, choose to install MacOS

Follow the install steps and install Catalina

Once the install finishes, it will reboot to the OS.  Make sure you detach the ISO so you don’t boot to the installer again.

Reset the VM

The VM should boot to the image and continue installing Catalina. When it finishes (10 or so minutes) it will reboot.

After the reboot, it will freeze on the blank Apple logo or unsuccessfully load MacOS X. Don’t fret.. We’re OK.

Power off the VM

Edit the VM setting and change the OS values.

Guest OS: Other (Apple Mac OS X)

Guest OS Version: Apple macOS 10.14 64-bit

Power on the VM and it will boot to and load Catalina.

Once you go through the setup steps and Catalina is ready to go.

Good luck on your adventure!

Boot Work Around

Added 10/17/2019

After applying the update, the VM was no longer booting. Same cast at boot with the Apple Logo and no progress.  

the work around is to change the boot order in EFI boot settings to boot to SATA Hard Drive 0.0

You need to enter EFI boot configuration for the VM. You can hit escape a the VMware logo or go to the VM settings and set to boor to EFI next boot. Boot/reboot to get the EFI menu

 Enter Setup

Configure Boot Options

Change Boot Order

Press Enter then change the boot order in the pop up window using + and — keys. Press Escape when done editing.
Move EFI Virtual SATA Hard Drive (0.0) to the Top
You can see I change the overall boot order to:
Hard Drive
CDROM
Mac OS X

Press Enter to Commit changes and exit

Exit boot manager and reset the VM.

Now the VM will always boot to the Hard Drive. 

I am avoiding applying updates.

using System; using System.Runtime.InteropServices; namespace VDDK{ public enum VixError:ulong{ VIX_OK = 0, // General errors VIX_E_FAIL = 1, VIX_E_OUT_OF_MEMORY = 2, VIX_E_INVALID_ARG = 3, VIX_E_FILE_NOT_FOUND = 4, VIX_E_OBJECT_IS_BUSY = 5, VIX_E_NOT_SUPPORTED = 6, VIX_E_FILE_ERROR = 7, VIX_E_DISK_FULL = 8, VIX_E_INCORRECT_FILE_TYPE = 9, VIX_E_CANCELLED = 10, VIX_E_FILE_READ_ONLY = 11, VIX_E_FILE_ALREADY_EXISTS = 12, VIX_E_FILE_ACCESS_ERROR = 13, VIX_E_REQUIRES_LARGE_FILES = 14, VIX_E_FILE_ALREADY_LOCKED = 15, VIX_E_NOT_SUPPORTED_ON_REMOTE_OBJECT = 20, VIX_E_FILE_TOO_BIG = 21, VIX_E_FILE_NAME_INVALID = 22, VIX_E_ALREADY_EXISTS = 23, VIX_E_BUFFER_TOOSMALL = 24, VIX_E_OBJECT_NOT_FOUND = 25, VIX_E_HOST_NOT_CONNECTED = 26, VIX_E_INVALID_UTF8_STRING = 27, VIX_E_OPERATION_ALREADY_IN_PROGRESS = 31, // Handle Errors VIX_E_INVALID_HANDLE = 1000, VIX_E_NOT_SUPPORTED_ON_HANDLE_TYPE = 1001, VIX_E_TOO_MANY_HANDLES = 1002, // XML errors VIX_E_NOT_FOUND = 2000, VIX_E_TYPE_MISMATCH = 2001, VIX_E_INVALID_XML = 2002, // VM Control Errors VIX_E_TIMEOUT_WAITING_FOR_TOOLS = 3000, VIX_E_UNRECOGNIZED_COMMAND = 3001, VIX_E_OP_NOT_SUPPORTED_ON_GUEST = 3003, VIX_E_PROGRAM_NOT_STARTED = 3004, VIX_E_CANNOT_START_READ_ONLY_VM = 3005, VIX_E_VM_NOT_RUNNING = 3006, VIX_E_VM_IS_RUNNING = 3007, VIX_E_CANNOT_CONNECT_TO_VM = 3008, VIX_E_POWEROP_SCRIPTS_NOT_AVAILABLE = 3009, VIX_E_NO_GUEST_OS_INSTALLED = 3010, VIX_E_VM_INSUFFICIENT_HOST_MEMORY = 3011, VIX_E_SUSPEND_ERROR = 3012, VIX_E_VM_NOT_ENOUGH_CPUS = 3013, VIX_E_HOST_USER_PERMISSIONS = 3014, VIX_E_GUEST_USER_PERMISSIONS = 3015, VIX_E_TOOLS_NOT_RUNNING = 3016, VIX_E_GUEST_OPERATIONS_PROHIBITED = 3017, VIX_E_ANON_GUEST_OPERATIONS_PROHIBITED = 3018, VIX_E_ROOT_GUEST_OPERATIONS_PROHIBITED = 3019, VIX_E_MISSING_ANON_GUEST_ACCOUNT = 3023, VIX_E_CANNOT_AUTHENTICATE_WITH_GUEST = 3024, VIX_E_UNRECOGNIZED_COMMAND_IN_GUEST = 3025, VIX_E_CONSOLE_GUEST_OPERATIONS_PROHIBITED = 3026, VIX_E_MUST_BE_CONSOLE_USER = 3027, VIX_E_NOT_ALLOWED_DURING_VM_RECORDING = 3028, VIX_E_NOT_ALLOWED_DURING_VM_REPLAY = 3029, // VM Errors VIX_E_VM_NOT_FOUND = 4000, VIX_E_NOT_SUPPORTED_FOR_VM_VERSION = 4001, VIX_E_CANNOT_READ_VM_CONFIG = 4002, VIX_E_TEMPLATE_VM = 4003, VIX_E_VM_ALREADY_LOADED = 4004, VIX_E_VM_ALREADY_UP_TO_DATE = 4006, // Property Errors VIX_E_UNRECOGNIZED_PROPERTY = 6000, VIX_E_INVALID_PROPERTY_VALUE = 6001, VIX_E_READ_ONLY_PROPERTY = 6002, VIX_E_MISSING_REQUIRED_PROPERTY = 6003, // Completion Errors VIX_E_BAD_VM_INDEX = 8000, // Snapshot errors VIX_E_SNAPSHOT_INVAL = 13000, VIX_E_SNAPSHOT_DUMPER = 13001, VIX_E_SNAPSHOT_DISKLIB = 13002, VIX_E_SNAPSHOT_NOTFOUND = 13003, VIX_E_SNAPSHOT_EXISTS = 13004, VIX_E_SNAPSHOT_VERSION = 13005, VIX_E_SNAPSHOT_NOPERM = 13006, VIX_E_SNAPSHOT_CONFIG = 13007, VIX_E_SNAPSHOT_NOCHANGE = 13008, VIX_E_SNAPSHOT_CHECKPOINT = 13009, VIX_E_SNAPSHOT_LOCKED = 13010, VIX_E_SNAPSHOT_INCONSISTENT = 13011, VIX_E_SNAPSHOT_NAMETOOLONG = 13012, VIX_E_SNAPSHOT_VIXFILE = 13013, VIX_E_SNAPSHOT_DISKLOCKED = 13014, VIX_E_SNAPSHOT_DUPLICATEDDISK = 13015, VIX_E_SNAPSHOT_INDEPENDENTDISK = 13016, VIX_E_SNAPSHOT_NONUNIQUE_NAME = 13017, // Host Errors VIX_E_HOST_DISK_INVALID_VALUE = 14003, VIX_E_HOST_DISK_SECTORSIZE = 14004, VIX_E_HOST_FILE_ERROR_EOF = 14005, VIX_E_HOST_NETBLKDEV_HANDSHAKE = 14006, VIX_E_HOST_SOCKET_CREATION_ERROR = 14007, VIX_E_HOST_SERVER_NOT_FOUND = 14008, VIX_E_HOST_NETWORK_CONN_REFUSED = 14009, VIX_E_HOST_TCP_SOCKET_ERROR = 14010, VIX_E_HOST_TCP_CONN_LOST = 14011, VIX_E_HOST_NBD_HASHFILE_VOLUME = 14012, VIX_E_HOST_NBD_HASHFILE_INIT = 14013, // Disklib errors VIX_E_DISK_INVAL = 16000, VIX_E_DISK_NOINIT = 16001, VIX_E_DISK_NOIO = 16002, VIX_E_DISK_PARTIALCHAIN = 16003, VIX_E_DISK_NEEDSREPAIR = 16006, VIX_E_DISK_OUTOFRANGE = 16007, VIX_E_DISK_CID_MISMATCH = 16008, VIX_E_DISK_CANTSHRINK = 16009, VIX_E_DISK_PARTMISMATCH = 16010, VIX_E_DISK_UNSUPPORTEDDISKVERSION = 16011, VIX_E_DISK_OPENPARENT = 16012, VIX_E_DISK_NOTSUPPORTED = 16013, VIX_E_DISK_NEEDKEY = 16014, VIX_E_DISK_NOKEYOVERRIDE = 16015, VIX_E_DISK_NOTENCRYPTED = 16016, VIX_E_DISK_NOKEY = 16017, VIX_E_DISK_INVALIDPARTITIONTABLE = 16018, VIX_E_DISK_NOTNORMAL = 16019, VIX_E_DISK_NOTENCDESC = 16020, VIX_E_DISK_NEEDVMFS = 16022, VIX_E_DISK_RAWTOOBIG = 16024, VIX_E_DISK_TOOMANYOPENFILES = 16027, VIX_E_DISK_TOOMANYREDO = 16028, VIX_E_DISK_RAWTOOSMALL = 16029, VIX_E_DISK_INVALIDCHAIN = 16030, VIX_E_DISK_KEY_NOTFOUND = 16052, VIX_E_DISK_SUBSYSTEM_INIT_FAIL = 16053, VIX_E_DISK_INVALID_CONNECTION = 16054, VIX_E_DISK_NOLICENSE = 16064, // Remoting Errors. VIX_E_CANNOT_CONNECT_TO_HOST = 18000, VIX_E_NOT_FOR_REMOTE_HOST = 18001, // Guest Errors VIX_E_NOT_A_FILE = 20001, VIX_E_NOT_A_DIRECTORY = 20002, VIX_E_NO_SUCH_PROCESS = 20003, VIX_E_FILE_NAME_TOO_LONG = 20004, // Guest VMWare tools errors VIX_E_TOOLS_INSTALL_NO_IMAGE = 21000, VIX_E_TOOLS_INSTALL_IMAGE_INACCESIBLE = 21001, VIX_E_TOOLS_INSTALL_NO_DEVICE = 21002, VIX_E_TOOLS_INSTALL_DEVICE_NOT_CONNECTED = 21003, VIX_E_TOOLS_INSTALL_CANCELLED = 21004, VIX_E_TOOLS_INSTALL_INIT_FAILED = 21005, VIX_E_TOOLS_INSTALL_AUTO_NOT_SUPPORTED = 21006, VIX_E_TOOLS_INSTALL_GUEST_NOT_READY = 21007, VIX_E_TOOLS_INSTALL_SIG_CHECK_FAILED = 21008, VIX_E_TOOLS_INSTALL_ERROR = 21009, VIX_E_TOOLS_INSTALL_ALREADY_UP_TO_DATE = 21010, VIX_E_TOOLS_INSTALL_IN_PROGRESS = 21011, VIX_E_WRAPPER_WORKSTATION_NOT_INSTALLED = 22001, VIX_E_WRAPPER_VERSION_NOT_FOUND = 22002, VIX_E_WRAPPER_SERVICEPROVIDER_NOT_FOUND = 22003, VIX_E_WRAPPER_PLAYER_NOT_INSTALLED = 22004, VIX_E_WRAPPER_RUNTIME_NOT_INSTALLED = 22005, VIX_E_WRAPPER_MULTIPLE_SERVICEPROVIDERS = 22006, // MntApi Specific codes VIX_E_MNTAPI_MOUNTPT_NOT_FOUND = 24000, VIX_E_MNTAPI_MOUNTPT_IN_USE = 24001, VIX_E_MNTAPI_DISK_NOT_FOUND = 24002, VIX_E_MNTAPI_DISK_NOT_MOUNTED = 24003, VIX_E_MNTAPI_DISK_IS_MOUNTED = 24004, VIX_E_MNTAPI_DISK_NOT_SAFE = 24005, VIX_E_MNTAPI_DISK_CANT_OPEN = 24006, VIX_E_MNTAPI_CANT_READ_PARTS = 24007, VIX_E_MNTAPI_UMOUNT_APP_NOT_FOUND = 24008, VIX_E_MNTAPI_UMOUNT = 24009, VIX_E_MNTAPI_NO_MOUNTABLE_PARTITONS = 24010, VIX_E_MNTAPI_PARTITION_RANGE = 24011, VIX_E_MNTAPI_PERM = 24012, VIX_E_MNTAPI_DICT = 24013, VIX_E_MNTAPI_DICT_LOCKED = 24014, VIX_E_MNTAPI_OPEN_HANDLES = 24015, VIX_E_MNTAPI_CANT_MAKE_VAR_DIR = 24016, VIX_E_MNTAPI_NO_ROOT = 24017, VIX_E_MNTAPI_LOOP_FAILED = 24018, VIX_E_MNTAPI_DAEMON = 24019, VIX_E_MNTAPI_INTERNAL = 24020, VIX_E_MNTAPI_SYSTEM = 24021, VIX_E_MNTAPI_NO_CONNECTION_DETAILS = 24022, VIX_E_MNTAPI_INCOMPATIBLE_VERSION = 24300, VIX_E_MNTAPI_OS_ERROR = 24301, VIX_E_MNTAPI_DRIVE_LETTER_IN_USE = 24302, VIX_E_MNTAPI_DRIVE_LETTER_ALREADY_ASSIGNED = 24303, VIX_E_MNTAPI_VOLUME_NOT_MOUNTED = 24304, VIX_E_MNTAPI_VOLUME_ALREADY_MOUNTED = 24305, VIX_E_MNTAPI_FORMAT_FAILURE = 24306, VIX_E_MNTAPI_NO_DRIVER = 24307, VIX_E_MNTAPI_ALREADY_OPENED = 24308, VIX_E_MNTAPI_ITEM_NOT_FOUND = 24309, VIX_E_MNTAPI_UNSUPPROTED_BOOT_LOADER = 24310, VIX_E_MNTAPI_UNSUPPROTED_OS = 24311, VIX_E_MNTAPI_CODECONVERSION = 24312, VIX_E_MNTAPI_REGWRITE_ERROR = 24313, VIX_E_MNTAPI_UNSUPPORTED_FT_VOLUME = 24314, VIX_E_MNTAPI_PARTITION_NOT_FOUND = 24315, VIX_E_MNTAPI_PUTFILE_ERROR = 24316, VIX_E_MNTAPI_GETFILE_ERROR = 24317, VIX_E_MNTAPI_REG_NOT_OPENED = 24318, VIX_E_MNTAPI_REGDELKEY_ERROR = 24319, VIX_E_MNTAPI_CREATE_PARTITIONTABLE_ERROR = 24320, VIX_E_MNTAPI_OPEN_FAILURE = 24321, VIX_E_MNTAPI_VOLUME_NOT_WRITABLE = 24322, VIX_E_NET_HTTP_UNSUPPORTED_PROTOCOL = 30001, VIX_E_NET_HTTP_URL_MALFORMAT = 30003, VIX_E_NET_HTTP_COULDNT_RESOLVE_PROXY = 30005, VIX_E_NET_HTTP_COULDNT_RESOLVE_HOST = 30006, VIX_E_NET_HTTP_COULDNT_CONNECT = 30007, VIX_E_NET_HTTP_HTTP_RETURNED_ERROR = 30022, VIX_E_NET_HTTP_OPERATION_TIMEDOUT = 30028, VIX_E_NET_HTTP_SSL_CONNECT_ERROR = 30035, VIX_E_NET_HTTP_TOO_MANY_REDIRECTS = 30047, VIX_E_NET_HTTP_TRANSFER = 30200, VIX_E_NET_HTTP_SSL_SECURITY = 30201, VIX_E_NET_HTTP_GENERIC = 30202 } public enum VixDiskLibCredType:uint{ [MarshalAsAttribute(UnmanagedType.U4)] VIXDISKLIB_CRED_UID = 1 , // use user/password style authentication [MarshalAsAttribute(UnmanagedType.U4)] VIXDISKLIB_CRED_SESSIONID = 2, // http session id [MarshalAsAttribute(UnmanagedType.U4)] VIXDISKLIB_CRED_TICKETID = 3 , // vim ticket id [MarshalAsAttribute(UnmanagedType.U4)] VIXDISKLIB_CRED_UNKNOWN = 256 } [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]//, CharSet=CharSet.Auto)] public struct VixDiskLibConnectParams{ [MarshalAs(UnmanagedType.LPStr)] public string VmxSpec;//‘»MyVm/MyVm.vmx?dcPath=Path/to/MyDatacenter&dsName=storage1″ //[MarshalAsAttribute(UnmanagedType.LPStr)] public string ServerName; [MarshalAsAttribute(UnmanagedType.U4)] public uint CredType; //As VixDiskLibCredType ‘todo’ public VixDiskLibCreds VixCredentials;// = new VixDiskLibCreds(); public uint Port; } public struct VixDiskLibConnectParams51{ [MarshalAs(UnmanagedType.LPStr)] public string VmxSpec;//‘»MyVm/MyVm.vmx?dcPath=Path/to/MyDatacenter&dsName=storage1″ //[MarshalAsAttribute(UnmanagedType.LPStr)] public string ServerName; [MarshalAsAttribute(UnmanagedType.U4)] public uint CredType; //As VixDiskLibCredType ‘todo’ public VixDiskLibCreds VixCredentials;// = new VixDiskLibCreds(); public uint Port; } [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)] public struct VixDiskLibCreds{ public VixDiskLibUidPasswdCreds Uid; public IntPtr ticketId; } [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)] public struct VixDiskLibCreds51{ public VixDiskLibUidPasswdCreds Uid; public IntPtr ticketId; } [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)] public struct VixDiskLibUidPasswdCreds{ [MarshalAsAttribute(UnmanagedType.LPStr)] public string UserName; [MarshalAsAttribute(UnmanagedType.LPStr)] public string Password; } [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)] public struct VixDiskLibSessionIdCreds{ [MarshalAsAttribute(UnmanagedType.LPStr)] public string cookie ; [MarshalAsAttribute(UnmanagedType.LPStr)] public string username; [MarshalAsAttribute(UnmanagedType.LPStr)] public string key ; } //Disk info [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)] public class VixDiskLibInfo{ public VixDiskLibGeometry BiosGeo; // BIOS geometry for booting and partitioning public VixDiskLibGeometry PhysGeo; // physical geometry public UInt64 Capacity; // total capacity in sectors public VixDiskLibAdapterType AdapterType; // adapter type public Int16 NumLinks; // number of links (i.e. base disk + redo logs) IntPtr ParentFileNameHint; // parent file for a redo log ‘<<<todo: string or ptr? } //Disk types public enum VixDiskLibDiskType{ VIXDISKLIB_DISK_MONOLITHIC_SPARSE = 1, // monolithic file, sparse VIXDISKLIB_DISK_MONOLITHIC_FLAT = 2, // monolithic file, all space pre-allocated VIXDISKLIB_DISK_SPLIT_SPARSE = 3, // disk split into 2GB extents, sparse VIXDISKLIB_DISK_SPLIT_FLAT = 4, // disk split into 2GB extents, pre-allocated VIXDISKLIB_DISK_VMFS_FLAT = 5, // ESX 3.0 and above flat disks VIXDISKLIB_DISK_STREAM_OPTIMIZED = 6, // compressed monolithic sparse VIXDISKLIB_DISK_UNKNOWN = 256 // unknown type } //Disk adapter types public enum VixDiskLibAdapterType{ VIXDISKLIB_ADAPTER_IDE = 1, VIXDISKLIB_ADAPTER_SCSI_BUSLOGIC = 2, VIXDISKLIB_ADAPTER_SCSI_LSILOGIC = 3, VIXDISKLIB_ADAPTER_UNKNOWN = 256 } //Geometry [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)] public struct VixDiskLibGeometry{ public uint Cylinders; public uint Heads; public uint Sectors; } //Disk Create [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)] public struct VixDiskLibCreateParams{ public VixDiskLibDiskType DiskType; public VixDiskLibAdapterType AdapterType ; public UInt16 HwVersion ; public UInt32 Capacity ; } /*[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)] public struct LogArgs{ public uint count; public IntPtr items; }*/ [UnmanagedFunctionPointer(CallingConvention.Cdecl, SetLastError = true)] public delegate void VixDiskLibGenericLogFunc( //[MarshalAs(UnmanagedType.LPStr)] //string Message, IntPtr Message, IntPtr args // C++ style va_args ); public class VixDiskLib { public int VIXDISKLIB_VERSION_MAJOR = 1; public int VIXDISKLIB_VERSION_MINOR = 0; public int VIXDISKLIB_SECTOR_SIZE = 512; //Disk Open Flags //VIXDISKLIB_FLAG_OPEN_UNBUFFERED -> (1 << 0) public static int VIXDISKLIB_FLAG_OPEN_UNBUFFERED = (1) << (0); //‘VIXDISKLIB_FLAG_OPEN_SINGLE_LINK -> (1 << 1) public static int VIXDISKLIB_FLAG_OPEN_SINGLE_LINK = (1) << (1); public static int VIXDISKLIB_FLAG_OPEN_READ_ONLY = (1) << (2); //*****Virtual hardware version public static int VIXDISKLIB_HWVERSION_WORKSTATION_4 = 3; // VMware Workstation 4.x and GSX Server 3.x public static int VIXDISKLIB_HWVERSION_WORKSTATION_5 = 4; // VMware Workstation 5.x and Server 1.x public static int VIXDISKLIB_HWVERSION_ESX30 = VIXDISKLIB_HWVERSION_WORKSTATION_5; // VMware ESX Server 3.0 public static int VIXDISKLIB_HWVERSION_WORKSTATION_6 = 6; // VMware Workstation 6.x public static int VIXDISKLIB_HWVERSION_CURRENT = VIXDISKLIB_HWVERSION_WORKSTATION_6; //Defines the state of the art hardware version. Be careful using this as it will change from time to time. //*****Delegates public delegate bool VixDiskLibProgressFunc(IntPtr progressData, int percentCompleted); //*****Clone Progress Callback Func public int CloneProgressFunc(IntPtr param0, int percentCompleted){ return percentCompleted; } //*****Log struct //[StructLayout(LayoutKind., CharSet=CharSet.Ansi)] /*public struct LogEntry{ [MarshalAs(UnmanagedType.LPStr)] public string Message; [MarshalAs(UnmanagedType.LPStr)] public string Va_list; }*/ //*****Function Definitions [DllImport(«vixDiskLib«, SetLastError=true)] public static extern VixError VixDiskLib_Attach(); //n/a [DllImport(«vixDiskLib«, SetLastError=true)] public static extern VixError VixDiskLib_Clone(IntPtr dstConnection, string dstPath, IntPtr srcConnection, string srcPath, ref VixDiskLibCreateParams vixCreateParams, VixDiskLibProgressFunc progressFunc, IntPtr progressCallbackData, bool overWrite); [DllImport(«vixDiskLib«, EntryPoint=«VixDiskLib_Close«, SetLastError=true)] public static extern VixError Close(IntPtr diskHandle); [DllImport(«vixDiskLib.dll«, SetLastError=true, ExactSpelling = true, EntryPoint = «VixDiskLib_Connect«)] public static extern VixError Connect(ref VixDiskLibConnectParams connectParams, out IntPtr connection); [DllImport(«vixDiskLib.dll«, ExactSpelling=true, EntryPoint=«VixDiskLib_Cleanup«)] public static extern VixError Cleanup(ref VixDiskLibConnectParams connectParams, ref uint numCleanedUp, ref uint numRemaining); /// <summary> /// «Connects» to an existing snapshot /// </summary> /// <returns> /// The error code. /// </returns> /// <param name=connectParams> /// connection parameters structure /// </param> /// <param name=readOnly> /// Requires the disk to be opened read only. /// </param> /// <param name=snapshotMoRef> /// Snapshot ManagedObject reference. /// </param> /// <param name=transportModes> /// Transport modes to use, by preference order. eg «file:san:hotadd:nbd» /// </param> /// <param name=connection> /// The snapshot connection pointer, ready to be used if the return code is VIX_OK /// </param> [DllImport(«vixDiskLib.dll«,CharSet=CharSet.Ansi, SetLastError=true, ExactSpelling = true, EntryPoint = «VixDiskLib_ConnectEx«)] public static extern VixError ConnectEx( ref VixDiskLibConnectParams connectParams, [MarshalAsAttribute(UnmanagedType.I1)] bool readOnly, string snapshotMoRef, string transportModes, out IntPtr connection); [DllImport(«vixDiskLib«, EntryPoint=«VixDiskLib_PrepareForAccess«/*, CharSet=CharSet.Ansi charset-ansi doesn’t work!!!*/, SetLastError=true)] public static extern VixError PrepareForAccess( ref VixDiskLibConnectParams connectParams, //[MarshalAs(UnmanagedType.LPStr)] [In] string identity); // doesn’t work on win64 //IntPtr identity); [DllImport(«vixDiskLib«, EntryPoint=«VixDiskLib_EndAccess«, SetLastError=true)] public static extern VixError EndAccess(ref VixDiskLibConnectParams connectParams, string identity); [DllImport(«vixDiskLib.dll«, EntryPoint=«VixDiskLib_Create«, SetLastError=true)] public static extern VixError Create(IntPtr connection, [InAttribute(), MarshalAsAttribute(UnmanagedType.LPStr)] string path, ref VixDiskLibCreateParams createParams, VixDiskLibProgressFunc progressFunc, IntPtr progressCallbackData); [DllImport(«vixDiskLib«, EntryPoint=«VixDiskLib_CreateChild«, SetLastError=true)] public static extern VixError CreateChild(IntPtr diskHandle, [InAttribute(), MarshalAsAttribute(UnmanagedType.LPStr)] string childPath, VixDiskLibDiskType diskType, VixDiskLibProgressFunc progressFunc, IntPtr progressCallbackData); [DllImport(«vixDiskLib«, EntryPoint=«VixDiskLib_Defragment«, SetLastError=true)] public static extern VixError Defragment(IntPtr diskHandle, VixDiskLibProgressFunc progressFunc, IntPtr progressCallbackData); [DllImport(«vixDiskLib«, EntryPoint=«VixDiskLib_Disconnect«, SetLastError=true)] public static extern VixError Disconnect(IntPtr connection); [DllImport(«vixDiskLib«, EntryPoint=«VixDiskLib_Exit«, SetLastError=true)] public static extern void Exit(); [DllImport(«vixDiskLib«, EntryPoint=«VixDiskLib_FreeErrorText«, SetLastError=true)] public static extern void FreeErrorText(IntPtr vixErrorMsgPtr); [DllImport(«vixDiskLib«, EntryPoint=«VixDiskLib_FreeInfo«, SetLastError=true)] public static extern void FreeInfo(IntPtr info); /// <summary> /// Gets the error message for the provided error code. /// </summary> /// <returns> /// Error message /// </returns> /// <param name=vixErrorCode> /// (ulong)Vix error code. /// </param> /// <param name=locale> /// Not supported, must be null. /// </param> [DllImport(«vixDiskLib«, EntryPoint=«VixDiskLib_GetErrorText«, CharSet=CharSet.Auto, SetLastError=true)] [return : MarshalAs(UnmanagedType.LPStr)] public static extern string GetErrorText(UInt64 vixErrorCode, string locale); [DllImport(«vixDiskLib«, EntryPoint=«VixDiskLib_GetInfo«, SetLastError=true)] public static extern VixError GetInfo(IntPtr diskHandle, ref IntPtr diskInfo); [DllImport(«vixDiskLib«, EntryPoint=«VixDiskLib_GetMetadataKeys«, SetLastError=true)] public static extern VixError GetMetadataKeys(IntPtr diskHandle, /*[MarshalAsAttribute(UnmanagedType.LPArray)]*/ ref IntPtr keysBuffer, uint bufLen, ref uint requiredLen); [DllImport(«vixDiskLib«, EntryPoint=«VixDiskLib_GetTransportMode«, /*CharSet = CharSet.Ansi,*/ ExactSpelling = true, SetLastError=true)] public static extern IntPtr GetTransportMode(IntPtr diskHandle); [DllImport(«vixDiskLib.dll«, EntryPoint=«VixDiskLib_Grow«, SetLastError=true)] public static extern VixError Grow(); [DllImport(«vixDiskLib«, EntryPoint=«VixDiskLib_InitEx«, CallingConvention=CallingConvention.StdCall, SetLastError=true)] public static extern VixError InitEx(uint majorVersion, uint minorVersion, VixDiskLibGenericLogFunc logInfo, VixDiskLibGenericLogFunc logWarn, VixDiskLibGenericLogFunc logPanic, string libDir, string configFile); //‘Logs: C:Documents and SettingsuserLocal SettingsTempvmware-user, /tmp/vmware-user /* [DllImport(«libvixDiskLib», ExactSpelling = true, EntryPoint = «VixDiskLib_Open», SetLastError=true)] public static extern VixError VixDiskLib_Open(IntPtr connection, */ /*[InAttribute(), MarshalAsAttribute(UnmanagedType.LPStr)] */ [DllImport(«vixDiskLib.dll«, CharSet=CharSet.Ansi, ExactSpelling=true, EntryPoint=«VixDiskLib_Open«, SetLastError=true)] public static extern VixError Open([In][Out]IntPtr connection, [InAttribute(), MarshalAs(UnmanagedType.LPStr)] System.String path, uint flags, out IntPtr diskHandle); [DllImport(«vixDiskLib«, EntryPoint=«VixDiskLib_Read«, SetLastError=true)] public static extern VixError Read(IntPtr diskHandle, UInt64 startSector, UInt64 numSectors , byte[] readBuffer); [DllImport(«vixDiskLib«, EntryPoint=«VixDiskLib_ReadMetadata«, CharSet=CharSet.Ansi, ExactSpelling=true, SetLastError=true)] public static extern VixError ReadMetadata(IntPtr diskHandle, string key, IntPtr buf, uint bufLen, ref uint requiredLen); [DllImport(«vixDiskLib«, SetLastError=true)] public static extern VixError VixDiskLib_Rename(); [DllImport(«vixDiskLib«, SetLastError=true)] public static extern VixError VixDiskLib_Shrink(); [DllImport(«libvixDiskLib«, SetLastError=true)] public static extern VixError VixDiskLib_SpaceNeededForClone(); [DllImport(«libvixDiskLib«, SetLastError=true)] public static extern VixError VixDiskLib_Unlink(); [DllImport(«libvixDiskLib«, SetLastError=true)] public static extern VixError VixDiskLib_Write(IntPtr diskHandler, UInt64 startSector, UInt64 numSectors, byte[] writeBuffer); [DllImport(«libvixDiskLib«, SetLastError=true)] public static extern VixError VixDiskLib_WriteMetadata(); [DllImport(«libvixDiskLib«, SetLastError=true)] public static extern VixError VixDiskLib_Rename([InAttribute(), MarshalAsAttribute(UnmanagedType.LPStr)] string srcFileName, [InAttribute(), MarshalAsAttribute(UnmanagedType.LPStr)] string dstFileName) ; [DllImport(«libvixDiskLib«, SetLastError=true)] public static extern VixError VixDiskLib_SpaceNeededForClone(IntPtr diskHandle, VixDiskLibDiskType diskType, ref UInt64 spaceNeeded); [DllImport(«libvixDiskLib«, SetLastError=true)] public static extern VixError VixDiskLib_Unlink(IntPtr connection, [InAttribute(), MarshalAsAttribute(UnmanagedType.LPStr)] string path) ; private VixDiskLib (){ } } }

Понравилась статья? Поделить с друзьями:
  • Visual studio ошибка не удается найти указанный файл
  • Visual studio не подчеркивает ошибки
  • Visual studio как посмотреть ошибки
  • Visual studio как изменить тип проекта
  • Visual studio как изменить папку проекта