TwinCAT Realtime Startup of isolated CPU Fails - twincat

I am currently running Twincat 3.1..4022.16 on Hyper V virtual machine.
I am able to correctly build my project but when activating configuration I am getting realtime startup isolated cpu fail.
Attached is my Realtime setting and the error.
Any leads to solution will be highly appreciated.

I got the following errors when trying to activate my configuration using TwinCAT 4024.10.
Severity
Description
Error
'TwinCAT System' (10000): Sending ams command >> Init4\RTime: Start Interrupt: Ticker started >> AdsError: 4132 (0x1024, RTIME: incompatible software detected) << failed!
Error
'TCRTIME' (200): start of real-time avoided by "HyperV"
Solution
The issue was caused by the fact that I had earlier tried to get Docker working on my laptop. In order to get Docker to work I had to enable a bunch of Hypervisor options. After realizing this I reverted these by doing the following:
Press the windows key and start typing "Turn Windows features on or off"
In the following menu, make sure "Virtual Machine Platform" and "Windows Hypervisor Platform" are deselected. In case either option was selected, deselect it and restart your computer for it to take effect.

I found this on the Beckhoff website:
The runtime environment cannot be started inside a Hyper-V
environment. This refers in particular to virtual Hyper-V machines,
which are run in a privileged Hyper-V machine. As soon as a component
of the computer uses Hyper-V, only the engineering environment (XAE)
can be used on this computer, not the runtime environment (XAR). Apart
from software solutions for virtual machines, you can also use
operating system means (Device Guard, Credential Guard,
virtualization-based security, etc.) or other Hyper-V programs.
Link

Read available number of CPUs from the Target, then change number of Isolated Cores from 0 to any higher number (most cases 1) and decrease number of Cores that are dedicated to Windows.
After that click Set on target.
Here's link to detailed article about Twincat and Virtualization
alltwincat.com/2018/06/14/twincat-virtualization/

This is a supplement to Roald's answer.
If you already deactivated Virtual Machine Platform, Windows Hypervisor Platform and Microsoft Defender Platform Guard and still doesn't work, chances are you have virtualization-based security enabled. You can check it by typing msinfo on windows search box.
To deactivate it, type Core Isolation on the windows search box and deactivate Memory Integrity. Restart the machine and run ms info again to make sure that VBS is off.
Go to Twincat, activate your project and witness a miracle!

If none of the above solutions worked, try to uncheck the below settings in Windows 11:
Privacy & security > Windows security > device security > core isolation > memory integrity >> off

Supplement to Felipe's and Roald's answer: latest offender prohibiting TwinCAT from starting is yet another virtualization feature: Windows Sandbox. Can be turned toggled in the Windows Features dialog accessible from Start->Turn Windows features on or off.

Related

I was trying vagrant up and I had this error [duplicate]

Downloaded Xamarin Android Player and with >>next>> progress installed Virtual Box.
When I tried to start an emulator I got
Failed to initialized device (name Of the emulator)
VboxManager Commendt Failed
and the detail of the error in Oracle Vm Virtualbox is
VT-x is disabled in the BIOS for both all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED)
How can I fix this?
I have found the solution of my problem, put some images to help others, thanks
go here
It is a RAM related issue. The documentation is self explanatory:
You are trying to allocate >3GB of RAM to the VM. This requires: (a) a
64 bit host system; and (b) true hardware pass-through ie VT-x.
Fast solution
Allocate less than 3GB for the virtual machine.
Complete solution
Make sure your system is 64 bit.
Enable virtualisation in your host machine. You can find how to do it here or there are many other resources available on Google.
Turning PAE/NX on/off didn't work for me. I just needed to turn on virtualization on my computer. I was working on a HP Compaq 8200 and followed the steps below to turn on virtualization. If you are working on a different computer, you probably just need to look up how to turn on virtualization on your pc. The steps below for HP Compaq 8200 (or similar) is copied verbatim from the comment posted by the user qqdmax5 on Hp discussion board here.
To run Oracle VM Virtual Box / VMware machines on 64-bit host there is a need to enable Virtualization Technology (VTx) and Virtualization Technology Directed I/O (VTd).
Usually these setting are disabled on the level of BIOS.
To enable VTx and VTd you have to change corresponding settings in the BIOS.
Here is an example how to do it for HP Compaq 8200 or similar PC:
Start the machine.
Press F10 to enter BIOS.
Security-> System Security
Enable Virtualization Technology (VTx) and Virtualization Technology Directed I/O (VTd).
Save and restart the machine.
There is also some discussion on this on askubuntu.
In Virtual Box "Settings" > System Settings > Processor > Enable the PAE/NX option. It resolved my issue.
I had this issue when tried to run a 32-bit OS with more than 3584 MB of RAM allocated for it. Setting the guest OS RAM to 3584 MB and less helped.
But i ended just enabling the flag in BIOS nevertheless.
Follow the steps below in Oracle VM VirtualBox Manager:
Select the Virtual device and choose Settings
Navigate to System and click the Processor tab
Tick the check-box, Enable PAE/NX
Click OK and you are done
To verify, start the Virtual device from Oracle VM VirtualBox. If all has gone well, the device boots up.
Close this device and open it from Genymotion.
For latest Windows 10 (HP & Intel motherboard/processor),
Follow the below steps, starting with :
Settings ->
Update & Security ->
Recovery ->
Advanced startUp -> Restart now
F10 (System Recovery) -> System Configuration tab -> Virtualization Technology
Enable
F10 to save and exit
For Ubuntu on HP (Intel processors),
Press F10 on booting the system, it will enter into system setup mode.
You will find tabs on top like Main, Security, Advanced.
Go into Advanced >> and click on System settings.
Mark the check boxes on Enable Virtualization Technology (VTx) and Virtualization Technology Directed I/O (VTd).
Back to Main, click on save changes and exit.
enable PAE/NX in virtualbox network config
My BIOS VT-X was on, but I had to turn PAE/NX off to get the VM to run.
You need to enable virtualization using BIOS setup.
step 1. Restart your PC and when your PC booting up then press your BIOS setup key (F1 or F2 or google it your BIOS setup key).
step 2. Go to the security menu.
step 3. Select virtualization and enable it.
Note:- BIOS setup depends on PC Manufacturer-brand.
If you're on 32-bit machine don't allow more than 3584 MB of RAM and it will run.
I had to turn PAE/NX off and then back to on...voila !!
Make sure Virtualization is enabled in your bios.
Simply check how many CPUs you are allocating. With one CPU you do not need to play with your bios.
Open your BIOS and enable virtualization.

How to unable AMD-V on Oracle VM VirtualBox Manager

I set up a virtual machine (Linux - Ubuntu) on "Oracle VM VirtualBox Manager" (Application). I can't start it because:
"AMD-V is disabled in the BIOS (or by the host OS) (VERR_SVM_DISABLED)" (Error Msg upon attempt to start)
My desktop use Windows 10 and has Virtualization option supported and enabled, I also disabled Hyper-V as instructed here:
"How to disable Hyper-V in command line?" (link), and closed my desktop after applying the change.
I still have "Oracle_VM_VirtualBox_Manager/Settings/System/Acceleration" (path to option box) grayed out, which stop me from enabling AMD-V.
I'm clearly missing something to access this option and yet I have visualization enabled and Hyper-V disabled. Any leads would be appreciated.
Fixed it, having virtualization enabled and hyper-V disabled isn't enough apparently.
Asus BIOS wasn't something I'm used to, but if you go in the BIOS:
advance setting/CPU
and you enable svm Mode, you should get access to a 64-bytes version of your virtual machine in the settings of the application you are using. From there, my virtual machine managed to start up without issues.
hope this help anyone...
Your Virtualization is disabled so you need to enable it
**go to BIOS**
->Restart your system and click Fn+f2
next
**go to configuration**
click SVM and enable it (if you have AMD processor)
or
Click intel virtual Technology and enable it (if you have intel processor)

v center 6.5 Installation

When trying to install v center 6.5 I received the following error :
1)Task failed on server: Module 'CPUID' power on failed
2)vim.fault.InvalidState
3)Installer log files are located at
C:\Users\ADMINI~1\AppData\Local\Temp\vcsaUiInstaller
Enable VT-X in the Bios.
Sometimes it is also called Hyper-V. (For some obscure reason it often is hidden in the "security" section of the Bios.)
Most computers ship with the setting disabled by default. Some computers (especially laptops) are technically capable of VT-x but the Bios doesn't show it so you can't enable it.
In that case you are sheer out of luck.

Windows 8 emulator not working

Emulator not running
I am using windows phone sdk 8.0 but I am unable to run emulator in visual studio 2012, is there any case to run it,
I checked my machine and its SLAT capable...
I tried using various links provided but IT would be great help if any ne give me a direct solution, I check the Hyper-v also not enabling in the windows turn on and off features.
You probably forgot to enable in the BIOS:
Hardware-assisted virtualization.
Second Level Address Translation (SLAT).
Hardware-based Data Execution Prevention (DEP).
or you don't have:
4 GB or more of RAM.
64-bit version of Windows 8 Pro edition or higher.
Based on the wording of your question I'm guessing you have a problem with enabling Hyper-V. Even if your computer is SLAT capable, you still need to enable it along with DEP and hardware-assisted virtualization in the BIOS like Goran said. This procedure is slightly different for AMD and Intel computers. The full information is here in the "Enabling BIOS settings required by Hyper-V" section.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj863509(v=vs.105).aspx
Also just to be sure you don't actually need 4gb of RAM :). I only have 3.
IF you have gone through this whole procedure, sometimes you will still get an error that you are not part of the local Hyper-V administrators group. Just click retry and enter the admin password and everything should be ok.

Unable to create the virtual machine

I was so happy today that I have been finally able to install Windows Phone 8 SDK and try it a bit. I installed fresh new installation of Windows 8 Pro into my virtual machine (I am running if from Parallels) and then installed Windows Phone 8 SDK.
Everything went smooth, Visual Studio Express is installed and running, but when I created new project and tried to deploy it, VS fails with really weird message.
First of all, message box informing that "The Windows Phone Emulator wasn't able to create the virtual machine: Generic failure" appears. Really informing, really professional - generic error, that's really good. Then the information that deployment failed appears (thanks a lot for keeping me informed about that, I didn't noticed that it crashed completely). And then in the Error List, there is an information about "Invalid pointer" - even better. No clue at all about what failed or what's wrong.
Can anybody help me with that? There is nothing on the internet about this topic so far and I don't know where the problem is. I scanned the Windows events and logs, but there is nothing (probably I haven't been searching properly, so please guide me through that if you can).
Anybody can help?
The Windows Phone 8 emulator requires hardware Hyper-V support. In particular, it requires second-level address translation, hardware assisted virtualization, and hardware DEP support enabled and to not be ran in a hypervisor(no nesting). If you bought your machine within the past 4 years you should have no problem with these requirements. You can check out this article to see more information about that and how to find if your PC supports it.
Because of these hardware requirements, this means you can't run the phone emulator inside of most virtualization technologies... With one exception: I've been using VMWare 9 which appears to include an "unsupported" feature to allow Hyper-V to work though.. So your only choice for running the phone emulator is to either buy VMWare 9 (or 8 with more configuration) or upgrade a physical machine to Windows 8
The unsupported way VMWare allows you to run Hyper-V inside of a VM is that there is a manual option (hypervisor.cpuid.v0 = “FALSE”) which basically tells VMWare not to report to the virtual machine that it's running in a VM. Hyper-V checks if it's running in a VM and won't work if it is, so this gets Hyper-V to work past that check. I personally have tested this whole nested-VM thing with the Phone emulator(including before public release), and other than being quite slow, it does work pretty well with no immediate crashes or anything.
There is a workaround for VMWare Workstation 8 as well in an answer below. However, 9 is much easier to configure, so if you have it use this method.
I ran into the same issue and I fixed it by enabling Hypervisor applications in this virtual machine and adding the following line to the .vmx file:
hypervisor.cpuid.v0 = "FALSE"
This got the emulator working just fine. I found this answer here.
Hope this helps.
Actually, it works quite nicely with VMware Fusion 5.0.1
All I had to do is to add to the .vmx file of the virtual machine the following lines:
hypervisor.cpuid.v0 = “FALSE”
vhv.enable = "true"
Save and restart VMWARE (obviously the VM must be stopped before the changes are made)
I'm right now debugging a test app from VS2012 using the emaulator inside a VM in my Macbook
I'm a happy camper
:-)
I posted the same question on Parallels forum.
Reply:
The emulator is actually a virtual machine, so we are talking about a vm inside a vm, this requires support for nested Hyper-V, which afaik is planned but not implemented yet, also VMWare Fusion already supports this, if you are so desperate.
————-
See Parallels forum post: http://forum.parallels.com/showthread.php?p=646448#post646448
This works for me
Set RAM to 4g
Set at least 2 cores
add to vmx file.
vhv.enable = "TRUE"
hypervisor.cpuid.v0="FALSE"
Goot article
http://social.msdn.microsoft.com/Forums/en-US/wptools/thread/ed72010c-321c-4667-97b2-3ff1540e7f87/
You need SLAT compatible hardware to run Hyper-V, which is a requirement for using the emulator.
Can you clarify what kind of hardware you're attempting to run this on, and if you have enabled Virtualization in your BIOS settings?
The "Invalid pointer" error just means it cannot connect to the emulator (and/or device).
Just as an addition to https://stackoverflow.com/a/13163762/1964969 (top answer at the moment):
manually appending "hypervisor.cpuid.v0" key works for VmWare Player 5 as well (the main reason - this software is free for non-commercial use so it's perfect product if you test the waters, just download from VmWare website and install, it's fully-functional).
Slightly unexpected, any of the following amends solve the problem with WP8 emulator:
hypervisor.cpuid.v0="FALSE"
hypervisor.cpuid.v0="TRUE"
hypervisor.cpuid.v0=""
Yeah, you can apply empty value for that key - but why? Have no idea but it works. I did some notes in my blog as well:
http://windowsasusual.blogspot.ru/2013/01/how-to-launch-windows-phone-8-emulator.html
Under Parallels Desktop 8 follow this guide: http://kb.parallels.com/en/115211
Edit:
Oh, I didn't noticed that you are trying to run emulator on VM. My answer is for non-VM environment.
First of all, you need to check hardware requirement at here
Be careful, successful installation of SDK does not guarantee "your hardware is compatible"
If your hardware is compatible and Hyper-V is running(described in the link above), please check your BIOS and be sure to enable hardware virtualization in CPU Configuration
(for me, I could find it at Booting > BIOS > Advanced > Advanced > CPU Configuration)
Brief summary:
64bit CPU and OS
4GB RAM
Hardware-assisted virtualization supported CPU
Second Level Address Translation (SLAT) supported hardware
Hardware-based Data Execution Prevention (DEP) supported hardware
Proper BIOS settings
For me the solution adding line:
hypervisor.cpuid.v0 = "FALSE"
I use VMware Player and added the line (hypervisor.cpuid.v0 = "FALSE")in the .vmx file.
My virtual machine with Windows 8 Pro runs the emulator for Windows Phone 8 perfectly.
Solved the problem by uninstalling an older VPN client from the machine. It turns out some VPN clients might have compatibility issues with Windows 8. After uninstalling VPN client I was able to run the emulator without issues (of course after making sure Hyper-V was installed and enabled on the machine)
Not enough rep. to comment on the accepted answer, but Microsoft provide instructions specifically for Fusion here. It worked for me, after a couple of reboots of both Mac and VM. I installed W8.1 without Hyper-V support initially and had to install it after the fact ("Turn Windows Features On or Off" in Control Panel), but apart from that no problems. Quite speedy on a 16Gb 2013 MBP.

Resources