Octoprint in VMware?


#1

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.


#2

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...


#3

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.


#4

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.


#5

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.


#6

A fair amount of work is being done with Docker and OctoPrint, btw.


#7

I've heard of docker before. I'll look into this as a potential solution.


#8

Start here once you get Docker running and you've played with it a bit.


#9

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


#10

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.


#11

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.