Any tips for using virtual machines with automation software

plchris

Member
Join Date
Mar 2016
Location
TN
Posts
48
My work laptop recently failed and I'm about to setup my new one. It will have RSLogix 500, Studio 5000, programs for - automation direct hardware, Keyence, ABB, Mitsubishi, and others. As well as other typical programs we may need like AutoCAD, AutoCAD electrical, etc..

My question is how do I set up factory talk activations where it will work with virtual machines. Do I install it on the host or can it be on the VM?
I have some experience with VMWare but not for work. We have normally just installed everything together but I'm gonna keep things separate and take snapshots this time.

Any tips that you have learned along the way would be greatly appreciated. Thank you
 
Personally, I have my activations stored on a VM, but that's primarily because my host is a mac, so they can't go there. If I need an activation on a different VM, I just have to run them both up together for long enough for the other one to pick up the license, then I can go 7 days on the grace period if need be.

Installing the activations on the host would certainly be easier - but also more of a pain in the event of hardware failure. Me and my colleagues have experienced a couple of hardware failures over the years (did you know that if you fill a MacBook Pro with curry it will refuse to power up again for several days?) and in each case we were able to just copy the VM's onto a new host from a backup and were back up and running in no time.

Other than that, I'd just advise you to make sure that your new host has enough juice to run multiple VM's simultaneously, and then create different VM's for different tasks. I personally have one main "Rockwell" VM, with everything Rockwell installed, as well as a couple of XP VM's for legacy Rockwell equipment. Then I have another one that has my outlook/autocad/etc, another one for Siemens software, and another one that runs all the "other" software packages that don't get used enough to justify their own VM.

I also set up a "clean" copy of each OS exactly how I like it, and then shut that down and never use it, except to clone it for new VM's. That way I don't have to do the setup multiple times. Clone the template VM, run it up, update it, license it, and then install whatever this particular VM needs on it.

Oh, and I have one VM called "virus bait", which I use if I'm doing anything I'm remotely unsure about. Every 6-12 months it catches something and I delete it and clone a new clean version.
 
Personally, I have my activations stored on a VM, but that's primarily because my host is a mac, so they can't go there. If I need an activation on a different VM, I just have to run them both up together for long enough for the other one to pick up the license, then I can go 7 days on the grace period if need be.

Installing the activations on the host would certainly be easier - but also more of a pain in the event of hardware failure. Me and my colleagues have experienced a couple of hardware failures over the years (did you know that if you fill a MacBook Pro with curry it will refuse to power up again for several days?) and in each case we were able to just copy the VM's onto a new host from a backup and were back up and running in no time.

Other than that, I'd just advise you to make sure that your new host has enough juice to run multiple VM's simultaneously, and then create different VM's for different tasks. I personally have one main "Rockwell" VM, with everything Rockwell installed, as well as a couple of XP VM's for legacy Rockwell equipment. Then I have another one that has my outlook/autocad/etc, another one for Siemens software, and another one that runs all the "other" software packages that don't get used enough to justify their own VM.

I also set up a "clean" copy of each OS exactly how I like it, and then shut that down and never use it, except to clone it for new VM's. That way I don't have to do the setup multiple times. Clone the template VM, run it up, update it, license it, and then install whatever this particular VM needs on it.

Oh, and I have one VM called "virus bait", which I use if I'm doing anything I'm remotely unsure about. Every 6-12 months it catches something and I delete it and clone a new clean version.

Exactly the info I'm looking for. If I store my activations on a VM, I am thinking I can use the virtual network editor so the activations can be used. Is that how it works?

I like your setup and want to get something very similar setup.
 
Generally, I set up all of my VM's with two network adaptors. One set to "share with the host", which basically means the host provides NAT to the VM, and just pipes an internet connection to the VM from wherever it can get one. Then a second network adaptor, which is bridged to my hardware ethernet adaptor, for programming.

This way, all of the VM's can "see" each other via the first virtual network adaptor, and the activations just work automatically (well, you have to point the activation manager to your VM with the activations on it, but that's it).

Can't promise it's exactly the same on PC, but the broad idea should be the same.
 
Generally, I set up all of my VM's with two network adaptors. One set to "share with the host", which basically means the host provides NAT to the VM, and just pipes an internet connection to the VM from wherever it can get one. Then a second network adaptor, which is bridged to my hardware ethernet adaptor, for programming.

This way, all of the VM's can "see" each other via the first virtual network adaptor, and the activations just work automatically (well, you have to point the activation manager to your VM with the activations on it, but that's it).

Can't promise it's exactly the same on PC, but the broad idea should be the same.

Awesome, thank you very much.
 
When I do my VMs, I also do it as a standalone version (which means you have to buy a Windows license for each one).
This way I can pass the VM to another person to run, good benefit if you do not want to buy multiple licenses for your PLC/Automation software.
 
When I do my VMs, I also do it as a standalone version (which means you have to buy a Windows license for each one).
This way I can pass the VM to another person to run, good benefit if you do not want to buy multiple licenses for your PLC/Automation software.

Do you know if it's ok to buy them off eBay? The ones that have a product key and not a digital license.
 
Do you know if it's ok to buy them off eBay? The ones that have a product key and not a digital license.

Anywhere that you can get a Windows License that uses a product key that can be validated is okay.
You will need an internet connection on your VM to validate the license, but that can be done after install of Windows.
 
Last edited:
Anywhere that you can get a Windows License that uses a product key that can be validated is okay.
You will need an internet connection on your VM to validate the license, but that can be done after install of Windows.

Thank you very much.
 
I used to put the Rockwell activations on the VM. But Rockwell (or CodeMeter) has been changed last year, so if you have to backup your VM and move it to another machine, the activations will be gone. So now I use the host machine for all of the activations. Then I just borrow the ones that VM needs. One VM does FTView, another does Logix5000, and yet another does Historian and Transaction Manager and SQL.
 
Any tips that you have learned along the way would be greatly appreciated. Thank you

Sometimes the virtual NAT is not good enough for network connections, and the guest VM needs a connection of its own to the LAN.

When setting up the guest VM, you can give it direct control of a network (RJ45; wifi may work also) device in a USB port and have it use that device directly; the host will no longer see that USB device. That way, the guest VM is a full (direct?) peer of the LAN.

I found this out when my guest VM (Windows 10; host was a Linux laptop) could not complete communication with a new S7-1200 PLC. I was able to sniff the ethernet packets Level 2 (? MAC address) packets going from the guest VM to the PLC on the LAN, and the reply packets from the PLC, but host-NAT-TIA Portal setup never completed the connection. Once the new PLC had been initialized and would get an IP address (DHCP or static; I forget now), the connection via NAT from guest VM to the LAN worked fine.
 
I used to put the Rockwell activations on the VM. But Rockwell (or CodeMeter) has been changed last year, so if you have to backup your VM and move it to another machine, the activations will be gone. So now I use the host machine for all of the activations. Then I just borrow the ones that VM needs. One VM does FTView, another does Logix5000, and yet another does Historian and Transaction Manager and SQL.

It looks like it was changed so virtual environments couldn't be used to get around the number of licenses. CodeMeter®
in Virtual Environments pdf
Now I'm also thinking about the dongle method for the licenses.


Sometimes the virtual NAT is not good enough for network connections, and the guest VM needs a connection of its own to the LAN.

When setting up the guest VM, you can give it direct control of a network (RJ45; wifi may work also) device in a USB port and have it use that device directly; the host will no longer see that USB device. That way, the guest VM is a full (direct?) peer of the LAN.

By using a usb to RJ45 adapter?

--------------------------------------------------------------------------
Great info from everyone that's responded. I honestly had not fully understood how deep this may get. Thanks again to everyone.
 
By using a usb to RJ45 adapter?

Yes, e.g. probably any of the ones in the image below; I used a USB-C to RJ45, and it worked. Also I was using VirtualBox as my VM environment, but for the life of me I cannot remember how I did it i.e. make it available to the guest VM only.


xxx.png
 
I just re-did it on a new Windows 10 VM guest using VirtualBox running under a Linux host.

  1. Mount VirtualBox Guest Additions ISO and install them in the Windows 10 VM
  2. Install [Oracle VM VirtualBox Extension Pack] under [File] => [Preferences] of VirtualBox
  3. Add the username of my Linux account, which account is using VirtualBox, to the vboxusers group in Linux
    1. sudo usermod -aG vboxusers $USER
    2. $USER is an environment variable that will be globbed by the shell to be my Linux username, and passed as the last argument to the usermod command, which command will be executed by the root Linux user because of the [sudo] command before that.
  4. Restart (reboot) the Linux host
Once I did all that, I was able to tell the guest VM to "capture" the USB-NIC (network device) whenever it started and that device was available; see image below.
yyy.png
 
I just re-did it on a new Windows 10 VM guest using VirtualBox running under a Linux host.

  1. Mount VirtualBox Guest Additions ISO and install them in the Windows 10 VM
  2. Install [Oracle VM VirtualBox Extension Pack] under [File] => [Preferences] of VirtualBox
  3. Add the username of my Linux account, which account is using VirtualBox, to the vboxusers group in Linux
    1. sudo usermod -aG vboxusers $USER
    2. $USER is an environment variable that will be globbed by the shell to be my Linux username, and passed as the last argument to the usermod command, which command will be executed by the root Linux user because of the [sudo] command before that.
  4. Restart (reboot) the Linux host
Once I did all that, I was able to tell the guest VM to "capture" the USB-NIC (network device) whenever it started and that device was available; see image below.
View attachment 58969

Awesome. Thank you for taking the time to do that and posting the info. (y)
 

Similar Topics

I am using version 9.11 talking to a CQM1H CPU21. It is in turn communicating with a UniOP Hmi via serial. I do not have the original source so...
Replies
6
Views
1,929
I’m currently starting a brand new design with a compactLogix controller and a panel view 700. I’ve completed similar projects from start to...
Replies
7
Views
1,214
As I'm getting up to speed on some of the latest versions of TIA Portal, I noticed there is lots of security features. I'm wondering if anyone...
Replies
2
Views
1,051
and go! I'll start. Always comment the Boolean instruction for their TRUE state. For example. It is much easier to read a normally closed contact...
Replies
65
Views
21,402
I have been programming plcs and hmi's since the 90's. I would like to think that I have mastered my field/trade, but I know that I have not even...
Replies
0
Views
841
Back
Top Bottom