Is anyone else running Octoprint underneath VmWare?
I'm currently running into some serial connection timeout issues within octoprint. Looking at other related posts and the sticky, I'm inclined to believe this is a communication issue being caused by the USB being passed through to a VM potentially being occasionally interrupted.
I've set up OctoPrint on my underutilized ESXI server due to it's close proximity to the printer. I've accomplished this by building up a dedicated Rasbian VM from scratch. I'm not overly attached to running octoprint in this manner but was hoping to avoid the costs of a pi+alloy case and having to find a place to mount and route the cables for the PI.
I'm currently planning on testing the tweak that forces the USB speed down but hesitating as it seems like it would effect the ability to connect a webcam via Octoprint.
I would go trial and error. I had it running on all sorts of hardware . It even runs like a charm on a 12$ Orange PI Zero ( w/o webcam ) ...thus it should be running on ESXI . maybe i would not overload the Server when a big print is running, but all else is trial and error...
So far i've tried different USB cables, routing the cable COMPLETELY around the unit, avoiding running near any motors or heating wires, changing the BAUD rate.
The server is definately not being overloaded but I'm wondering if perhaps the mechanism that passes through the USB device to the VM is occasionally polling the port or doing some other activity that interrupts the connection for a brief moment.
Running DEBIAN STRETCH WITH RASPBERRY PI DESKTOP as the OS.
Getting this error a lot.
Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2581
I'm going to dig through the KB article that references the SerialException error and try more of the posted solutions but I realize my use case is an outlier so I'm wondering if anyone else is running it within a virtual instance without issue.
You might be right. I think there are ways within VMWare to exclusively assign the USB host to a singular VM as we've had to do that for some of our licensing keys that use USB dongles, but unfortunately I didn't make the change so don't know what exactly that is. That may aid in resolving the issue, as well as installing the VMWare tools onto the VM maybe if you haven't already.
There's also an option of running OctoPrint on Windows in a VM, but it may run into the same issue.
Ah yes, I currently have the printer (detects as a rs-232 parallel port) statically bound to the RPI desktop vm. I don't know if this is a hardware or software level binding so I'm currently skeptical of whether the host of (esxi) will occasionally poll the root hub, port or device which temporarily interrupts the communication.
Open vm tools is currently installed, I may try removing them and forcing the proprietary (outdated) ones.
Unless someone happens to come forward saying they have it virtualized and running fine via USB I'm going to tinker a bit more, see if I can find a conflicting process and then just buck up and buy a RPI.
A fair amount of work is being done with Docker and OctoPrint, btw.
I've heard of docker before. I'll look into this as a potential solution.
Start here once you get Docker running and you've played with it a bit.
Thanks, I'm wondering that I may run into the same issue with the USB pass through though. Worth a try as I have more then enough disk, CPU and memory capacity to spin up an ubuntu 18.04 LTS VM
I've found Docker to be much faster at defining and spinning up a container for something like this, even if you're just playing with it. As a long-time I.T. Manager, I've used VMs of all kinds, worked with AWS and even created a private cloud myself with Ubuntu MaaS + OpenStack. Even though I still only understand a small fraction of the Docker landscape, I would bet money that five years from now everyone will have moved in this direction and away from VM-style offerings.
It seems that VMWare is fundamentally incompatible with octoprint and the type of serial interface that serial communication uses. I tried using docker within a Ubuntu VM (yo dawg I herd u liek virtualization) and had the same behavior. Broke down and ordered an RPI 3 B and it's working strong out of the box.
I've been running Octoprint on a Debian VM running in ESXi 6.x (with about 20 other VMs) for years now. I originally had issues with the printer stopping in the middle of a print but I gave the VM a 100 MHz cpu reservation and also set the "latency sensitivity" setting in the VM options to "high" and it's been bombproof ever since.
I suspect the USB-Serial adapters have a buffer that runs out if it's not serviced within a normal polling interval, and if a VM isn't able to run in that interval the buffer runs out.
What hardware is your ESXi sitting on ? I am looking to create a VM on a Mac mini via VMware Fusion. I am going to try creating a Raspbian image and then install Octoprint.
Hi liffg, I'm using an old HP DL380g7 running ESXi 6.7. It's beefy, but definitely overkill for what Octoprint needs. You should be able to run a VM on a Mac Mini and not have performance issues provided the USB latency is acceptable (the latency will depend on the exact virtualization stack, drivers etc.)
I'm not sure if it's better to use Raspbian or not. I used regular off-the-shelf Debian x86-64 and setup wasn't bad at all.
Thanks, I may try the Debian route first.
VMWare is compatible with octoprint! i got it working but using Windows 10 as OS of the vm insted of linux, didnt try with linux tho.
I am in the process of creating an OctoPrint VM in VMware Fusion (Mac)
I started with the ISO from Debian Bullseye with Raspberry Pi Desktop
It took a few tries to get it running, and then make a few customizations, but I now have a Debian 11/Raspios VM that I will now install OctoPrint on using pip.
If folks are interested in details, I will fire up a new thread and provide all the details about how I dood it.
Interested if anybody installed Octoprint in VMWare ESXi. I tried it, I am able to connect to the printer, but my webcam does not pass through any feed. I can see the webcam correctly when issues lsusb
Hello @wlevels !
And can you print flawlessly?
To be honest I didn't try because not being able to connect the webcam is a deal breaker for me anyways. I saw somebody mentioning that if you would make a CPU and memory reservation in VMWare that this would fix any printing issues. I already added that reservation up front but in the end didn't actually test it. I am considering just installing Ubuntu on the NUC itself and using it specifically for OctoPrint if that fixes the webcam issue