[Solved] Problems with TwinCat3 and 64bit windows 10 quest os

Discussions related to using VirtualBox on Windows hosts.
Locked
sl33p3r
Posts: 1
Joined: 14. Apr 2016, 14:44

[Solved] Problems with TwinCat3 and 64bit windows 10 quest os

Post by sl33p3r »

Hello,

i am running TwinCat 3.1 on Windows 10 64bit guest os. When i try to go run mode in TwinCat i get following error: VT-x is not supported.
I have enabled VT-x from my host systems bios settings. So in my understanding vt-x is not enabled inside my virtualbox guest os?
Is there any way to enable VT-x inside the quest os or is that even the problem?

My host computer is 64bit windows 7. TwinCat works corectly inside the host system.

Error code: AdsWarning4119(0X1017)
Last edited by socratis on 21. Feb 2018, 04:38, edited 1 time in total.
Reason: Marked as [Solved].
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problems with TwinCat3 and 64bit windows 10 quest os

Post by mpack »

Cruxl
Posts: 3
Joined: 24. May 2016, 13:33

Re: Problems with TwinCat3 and 64bit windows 10 quest os

Post by Cruxl »

Hi,
I have a similar problem here, but do not really see an answer to that problem given by the FAQ link as IMHO the mentioned points are dealt with.

Virtualox is 4.3.36 running on a Debian 64-bit (CPU i5-4210m) host with a guest Windows 7 64-bit:
1. In BIOS VT-X is enabled.
2. egrep vmx finds the right flag (vmx)
3. VT-x is enabled in VirtualBox and Win7-64bit guest runs smoothly.
4. I cannot find other VT-x suspect as suggested in the FAQ link. E.g. no antivirus, Hyper-V system level debugger running.

Just TwinCat reports this problem and I do not know how to query the availablity of VT-x in Win7 to further localize the error. Might be TwinCat after all.
Any suggestions? Thanks.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Problems with TwinCat3 and 64bit windows 10 quest os

Post by socratis »

Cruxl wrote:Virtualox is 4.3.36 running on a Debian 64-bit (CPU i5-4210m) host with a guest Windows 7 64-bit
You're trying to run TwinCat inside Win7, inside Debian. Since TwinCat seems to require VT-x, that type of configuration is not supported. The "problem" is that the VT-x flag is not passed through to the guest.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Cruxl
Posts: 3
Joined: 24. May 2016, 13:33

Re: Problems with TwinCat3 and 64bit windows 10 quest os

Post by Cruxl »

Thanks for the quick response! I just found out that the flag is not passed through (had a look at CPU-Z), too. This is surprising to me, since the option "enable VT-x/AMD-V" to me suggests it should do so.

Let me see if I understood correctly:
The above mentioned option exists, enables VT-x for(/in?) the guest which may make use of it (I've read so), but the corresponding flag is NOT passed.
Thus, the problem is that there is no possibility of passing the instruction flag through to the guest system. In case some app such as TwinCat requires the flag there is no workaround?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problems with TwinCat3 and 64bit windows 10 quest os

Post by mpack »

That option tells the VM to use hardware acceleration. It doesn't tell VirtualBox to pass hardware acceleration along for something else to use.

Currently VirtualBox doesn't support nested virtualization at all, and in the case where the nested virtualizer requires hardware acceleration, that nested virtualizer simply can't run in VirtualBox.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Problems with TwinCat3 and 64bit windows 10 quest os

Post by socratis »

This "might" help you. From the TwinCat documentation (http://infosys.beckhoff.com/english.php ... 6117130469) I got this:
TwinCAT 3 XAR (Runtime)
▪ x86-based Windows operating system: Windows XP with SP3, Windows 7, Windows Embedded Standard 2009, Windows Embedded Standard 7
▪ for x64CPUs with Windows 64-bit OS, the VT-x CPU feature is mandatory and needs to be enabled in the BIOS.
So, maybe if you had a Windows 32-bit guest it wouldn't actually require the VT-x in the guest? I don't know. Plus it would most probably run like molasses in the winter, but I'm not gonna try it. But you could. ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Cruxl
Posts: 3
Joined: 24. May 2016, 13:33

Re: Problems with TwinCat3 and 64bit windows 10 quest os

Post by Cruxl »

OK, no nesting, that's a pity. I do not have enough insight into hardware acceleration, but is this possible (I'd think yes) and planned for the future?

Well, idea is to switch production to x64 completely. The Box is just a testing system. And I really "love" Beckhoff's documentation and information seeking and retrieval from this source. But in collaboration with my colleagues we stumbled on a workaround on the (German) site sps-forum dot de (I'm not allowed to post URLs).

In case it turns out useful for someone out there, in short one way:
1. In Guest use msconfig.exe -> Start -> Advanced and set number of cores to isolate (in my case) one and reboot guest.
2. In TwinCat Visual Studio Shell tell the system via the explorer -> real time settings to read the new settings which should show up under available cores (2nd number = isolated cores). Uncheck Windows core, check isolated chore and you should be done. No VT-x requirement error!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problems with TwinCat3 and 64bit windows 10 quest os

Post by mpack »

It is very likely possible, since I've seen people claim that VMWare ESX does it. However this is a user forum, and the devs generally don't announce their future development plans. Basically, if lots of paying customers want this feature, it'll probably get done.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Problems with TwinCat3 and 64bit windows 10 quest os

Post by socratis »

Cruxl wrote:1. In Guest use msconfig.exe -> Start -> Advanced and set number of cores to isolate (in my case) one and reboot guest.
Maybe you mean "MSConfig -> Boot -> Advanced options..."? And there is no "isolated (?!?) cores". Do you mean that you configure the Win10 guest to run with 1 CPU? If that's the case, you don't need to do it from within msconfig, you can do it in the VM recipe in VirtualBox. Maybe that saves you from step 2?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
pelanj
Posts: 1
Joined: 20. Feb 2018, 19:30

Re: Problems with TwinCat3 and 64bit windows 10 quest os

Post by pelanj »

I have gone through the registration process just to say a BIG THANK YOU to Cruxl. His answer lead me to a solution on how to run VirtualBox and TwinCAT3 at the same time and also how to run TwinCAT3 inside Virtualbox!

For anyone who may find this page through googling (as I did), I will clarify a bit as it took me a while to figure everything out. The following works both for PC and VirtualPC with at least two core processor.

1. msconfig.exe -> Boot -> Advanced options... -> Number of processors: Check and select number of your cores minus 1 (7 in my case or 1 in the virtual 2-core PC) and reboot
2. Start the TwinCAT studio, open a project you want to run, then in the Solution explorer go to SYSTEM, then doubleclick Real-Time
3. In the Settings tab, push "Read from Target", which will list the cores available
4. Uncheck the one(s) with (Windows) and check the one with (Isolated) - on my PC it was Core 7, Core 1 on the virtual.
5. Activate configuration

Now you can do business as usual - restart in Run mode and load the program. TwinCAT will run in Run mode without error messages.

Both my host and guest OS is W7 64bit, but I would guess it would work with newer windows as well as this is clearly a TwinCAT issue. As a bonus, it seems that on an isolated core, TC3 seems to run better.
Walter Koenig
Posts: 1
Joined: 27. Nov 2018, 16:26

Re: [Solved] Problems with TwinCat3 and 64bit windows 10 quest os

Post by Walter Koenig »

Hi,

sorry to scream but: I LOVE YOU, thank you, thank you and thank you again!

I was about to give up the idea of using a virtual machine and this post lit up my day

Walter
JMRams
Posts: 1
Joined: 25. Nov 2019, 12:45

Re: [Solved] Problems with TwinCat3 and 64bit windows 10 quest os

Post by JMRams »

Dears

I have a cpu with 8 processors and I gave 6 for virtual machine and 6 for Ubuntu.

I follow your instructions blocking 1 processor from 6 and Windows don't start.

I had to give 5 processors for windows and block 1 After that it works!!!!.


Thanks a lot!!!!!!!

Salut!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: [Solved] Problems with TwinCat3 and 64bit windows 10 quest os

Post by mpack »

I'm going to lock this obsolete discussion. The topic is three years old, cruxl was talking about 4.3.36 (the current version is 6.0.14) and in the meantime VirtualBox has introduced preliminary support for nested VT-x on AMD hosts, and is in the process of doing the same for Intel. Also the option to run without VT-x will be removed in 6.1.0.
Locked