Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Running OrBit in a Win10 VM under Fedora Linux...in case anyone cares
#1
Thumbs Up 
Hi all, new to the forum and to OrBit. Should have my PINs very soon I hope so I can get some of that sweet Pixel active matrix headlight action on my Polestar 2! I have the cable, but I only have one laptop now, and all my machines run some form of Linux or FreeBSD. My only Windows machines are a gaming rig in my home office on the other side of the house from my garage, and one that my grandson uses in the upstairs guest room - maybe someday I'll repurpose that one to be a shop PC.

But I thought I'd try something crazy and fired up my Windows 10 virtual machine on my laptop and sure enough, OrBit was able to control the USB-attached ethernet connection via a virtual network NAT connection (default on QEMU/KVM) and it worked like a charm. Was able to pull codes, get the LV battery voltage, the SoH on the HV battery (93% after 3+ years and 30K+ miles!). Great news for me, no need to build a 150ft network cable.

So if anyone needs to try this, just thought I'd throw it out there.
 - Mick S.
2021 Polestar 2 Launch Edition PP
West Tennessee, US.
Reply
#2
Advice would be not to use any form of virtualisation when using Orbit (or any other program that connects / flashes). It’s simply too risky with a virtual adapter.
Reply
#3
(02-28-2024, 09:59 PM)x119 Wrote: Advice would be not to use any form of virtualisation when using Orbit (or any other program that connects / flashes). It’s simply too risky with a virtual adapter.

I ended up building a long network cable to run to my office after all. The software worked fine reading codes and such, but would time out when resetting to programming mode. So I ended up hooking it to my one Windows machine in my office and it worked perfectly - programmed just fine and now I have the full beauty of the Active Matrix lights on my Polestar 2. I'm very happy now. So it was an interesting experiment and I do know I can read and clear codes, just not program. However to be safe, probably best to follow x119's advice. :-)
 - Mick S.
2021 Polestar 2 Launch Edition PP
West Tennessee, US.
Reply
#4
I am OK with virtual machines, given folks using those, they are pretty technical. The network connection needed, is all handled by Windows...as long as you can present the network adapter connected to the car, to the Windows VM, then all should work well. Also, you need to be running on x86 hardware.

The issues that have been seen, is trying to run on ARM CPU, under parallels on Mac, which currently OrBit won't let you instal anyways. Even on the old Intel Macs, you have Parallels with it's own idea of virtualized networking, not standard virtual machine stuff (virtual box, VMWare, Hyper-V, etc.) which can be a problem.
Reply
#5
Yep, I may play with it a bit more - use a macvlan or a bridge rather than the default virtual connection that NATs. If I figure something out I'll post. :-)
 - Mick S.
2021 Polestar 2 Launch Edition PP
West Tennessee, US.
Reply
#6
I guess what I was trying to get across above, and what Power6 put better, is that this is general advice. I.e don’t expect any support.
 If you’re technically competent then you’ll likely get it to work (I always ran Vida 2014d in VM).
Reply
#7
I have been using virtual servers, workstation since the first virtualization is released. (Hyper-V and Wmare).  The risk is not the network adaptor, it's possible to dedicate the physical adaptor to the guest (virtual) the main risk is the host itself. A regular MAC / linux / windows workstation / laptop is not build for full virtualization. The priority for resources is always for the host and not the guest. It can suspend the guest machine (virtual windows 10) anytime randomly or even crash the virtualization app itself.  

So, I wouldn't risk it flashing a car via virtual host that runs on a regular workstation. If it hangs in the middle of the flashing your car may turn into brick which would cost you a lot more than $100 a spare laptop sitting in your tool box just for fleshing!
Reply
#8
(03-03-2024, 10:14 PM)IMAY2023 Wrote: I have been using virtual servers, workstation since the first virtualization is released. (Hyper-V and Wmare).  The risk is not the network adaptor, it's possible to dedicate the physical adaptor to the guest (virtual) the main risk is the host itself. A regular MAC / linux / windows workstation / laptop is not build for full virtualization. The priority for resources is always for the host and not the guest. It can suspend the guest machine (virtual windows 10) anytime randomly or even crash the virtualization app itself.  

So, I wouldn't risk it flashing a car via virtual host that runs on a regular workstation. If it hangs in the middle of the flashing your car may turn into brick which would cost you a lot more than $100 a spare laptop sitting in your tool box just for fleshing!

Yes you need at least xeon scalable gold or Epyc rome rackmounted server to run any VM....lol
All you need is 16GB of ram  for win 10/11 host and assign 8gb for VM and not run any ram heavy apps while flashing, none preferably with paused updates.  CPU supporting hardware virtualisation if you want to pass physical Ethernet card to VM. Meaning any 2008ish or newer laptop will run VM 24/7 without problems.
I'm running windows VM under ubuntu on 2008 run of the mill desktop and only time i had vm crash was when i ran out of ram trying to run blender on host and solidworks in VM on total 14GB of ram Smile;
Reply
#9
(03-01-2024, 05:34 PM)Power6 Wrote: I am OK with virtual machines, given folks using those, they are pretty technical. The network connection needed, is all handled by Windows...as long as you can present the network adapter connected to the car, to the Windows VM, then all should work well. Also, you need to be running on x86 hardware.

The issues that have been seen, is trying to run on ARM CPU, under parallels on Mac, which currently OrBit won't let you instal anyways. Even on the old Intel Macs, you have Parallels with it's own idea of virtualized networking, not standard virtual machine stuff (virtual box, VMWare, Hyper-V, etc.) which can be a problem.

Latest surface 11 uses Arm based cpu. Do you think that there will be a problem to install Orbit ?
Reply
#10
So I tried this, because all my machine run Linux only (Gentoo/arch), I have always a Linux notebook with me and I had no spare notebook in arms reach to install Windows.
Disclaimer: Listen to Power6, x119 and IMAY2023 - if you are not sure about your skills or lack experience: get a spare laptop with Windows.
That out of the way, here's what I tried and discovered…

Running win11 is absolutely no problem for any half decent device nowadays and the hardware support for it is pretty standard.
With proper configuration the risk of sudden suspending or resource exhaustion is fairly minimal.
In this case I ran a virtual win11 on a laptop. I assigned the VM 4 cores and 8GiB RAM with KVM/QEMU via libvirt/virt-manager.
Just keep an eye on power consumption when running VMs on a laptop, and have a power supply or compatible power bank on hand.

Try A: Network via USB redirection
At first, I tried just plugging in a USB Ethernet adapter and just redirect the whole USB device to the VM. Thinking that it will work best when Windows has full control over the USB device and thus the network interface. This worked fine for everything (connecting my normal network/internet etc.), but somehow not for OrBit. It just said it found the car, but then got a timeout (Windows Firewall rules were in place and the firewall even was disabled). I could see the Vehicle Announcements in Wireshark, but no successful connection has been made (no TCP connections or Routing activation requests seen though). I tried that with two different adapters with no success.

Try B: Network via NAT/Bridging
Next I set up the network card on Linux.
Tip for NetworkManager Users: If NetworkManager keeps reconnecting due to no DHCP response, set the IPv4 method to "link-local" in the config to maintain the connection (or use something else like systemd-networkd etc.).

Try B.1: NAT mode
Then I tried the NAT mode (just because it was mentioned here). It did not work for me (and it did not surprise me, because it would set up a segmented network (Linux bridge with DHCP server and iptables rules to masquerade)). I also never checked if link local addresses are NATed and multicast is relayed in NAT mode, but that could be a problem. Also, I'm always a fan of avoiding NAT if it isn't needed anyway. But hey it was worth a try - I haven't looked further into how the connection is established and what exactly could be the issue here.

Try B.2: Bridging
Since host-to-guest communication wasn’t necessary, I opted for macvtap with the USB network interface. This approach worked flawlessly, allowing OrBit to connect without issues instantly.
Although macvtap works I may set up a traditional Linux bridge in the future to compare, I expect it would work similarly well.

I did (so far) do 2 programming runs (including enabled ACC/PA, Adaptive Headlights etc.) with zero problems.
For now, I am super happy with this setup.

EDIT:
Traditional linux bridge, set up with systemd-networkd with bridging in libvirt works flawless as well.
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)