Multiple VMs on one Mac

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Multiple VMs on one Mac

Postby pwa » 30. December 2018 10:14

Hi team,

for one reason or another, I would like to run multiple instances of XAMPP-VM on a mac simultaneously (am running the latest VM version [7.3.0-0] on mojave)
It is obvious that this is not what the maker intended - and I can find very little documentation, but it may just be possible to make it happen.
I have burned a couple of days trying to figure out how to do it - learned a lot about the structure of the virtual machine implementation (and this version of linux).
Still a solution has eluded me thus far. Any viable solutions would be much appreciated.
Ideally I want two XAMPP-VM apps in Applications, and when I run each I get a separate XMAPP controller.

What I tried:
a) I tried copying the XAMPP-VM app in the applications directory and because they both point to ~/.bitnami..., I believe they ran the same stack
b) I managed to rename the 2nd VM to xampp2 and had it located on ~/.bitnami/stackman/machines/xampp2. This might have worked, but the two implementations had the same MAC address and hence (I assume) received the same IP address from OSX's bootdp.plist DHCP server and would not run simultaneously. I tried many ways to change the VMs MAC address and I believe that when I succeeded, I could not restart the VM. The terminal lost contact and although I could shut down the VM, I could not start it again. I changed the MAC address by adding the file 00-default.link to the /etc/systemd/network folder containing:
[match]
MACAddress=b6:16:31:ed:2c:68

[Link]
MACAddress=b6:16:31:ed:2c:69
c) I deleted ~/.bitnami and the XAMPP-VM app, and reinstalled XAMPP-VM. I noted that every time I did this, the IP address incremented. I guess, but have not proved yet, that
means that every time I delete ~/.bitnami and then run XAMPP-VM. this action recreates the ~/.bitnami folder and also creates a unique MAC address. Maybe this is why I
can't change the MAC address - because it does not match a calculated MAC address somewhere else???
d) Perhaps a viable strategy to try next might be to
i) move the current ./bitnami structure to a safe place
ii) make a copy of the XAMPP-VM app. Run it and make a new bitnami structure, with a (hopefully) new mac address and a new IP address.
iii) in the new version rename ~/.bitnami/stackman/machines/xampp to ~/.bitnami/stackman/machines/xampp2
iv) change the app's Contents/Resources/metadata.json to
"stacks": [
{
"description": "XAMPP",
"id": "xampp2",
"name": "XAMPP",
"version": "7.3.0-0",
"requiredMemory": 1024,
"resourcesDir": "machines/xampp2",
etc.

(note the rest of this file seems to be ignored)

Also - another thing that has me a little confused: Mounting other filesystems. This might be necessary to understand because if I get two+ VMs running and try to mount two similarly names /opt/lampp volumes - I am sure that will cause a problem. What I did...
1) Via the terminal (VM) I copied /opt/lampp to lampp2. Set symbolic link lampp2/lampp -> /opt/lampp2/xampp.
2) I then created a directory ~/.bitnami/stackman/machines/xampp/volumes/root2
3) added
{
"id": "root2",
"kind": "",
"remoteDir": "/opt/lampp2"
}
to ~/.bitnami/stackman/machines/xampp/metadata.json
4) The VM starts OK. The XAMPP-VM has both mounts shown in the control panel (Volumes tab).
I can still mount /opt/lampp on ~/.bitnami/stackman/machines/xampp/volumes/root
Unfortunately I can't mount /opt/lampp2 on ~/.bitnami/stackman/machines/xampp/volumes/root2 because Error ... I lack the permission to do so.
This is despite both root and root2 having the same permissions and /opt/lampp and /opt/lampp2 having the same permissions.

Arrgghh.
pwa
 
Posts: 4
Joined: 31. August 2017 05:38
XAMPP version: 7.1.8-0
Operating System: 10.12.6 - MacBookPro Lte 2011

Re: Multiple VMs on one Mac

Postby pwa » 02. January 2019 23:23

This is intriguing and a little disappointing - 36 people viewed this post - and not one comment.
pwa
 
Posts: 4
Joined: 31. August 2017 05:38
XAMPP version: 7.1.8-0
Operating System: 10.12.6 - MacBookPro Lte 2011

Re: Multiple VMs on one Mac

Postby Altrea » 02. January 2019 23:29

Is it less disappointing for you if I answer your topic but cannot provide any helpful information at all?
Well, okay. I don't have a Mac... Sorry.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 9741
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Multiple VMs on one Mac

Postby pwa » 06. January 2019 06:37

No worries - your response made me smile.
Thanks,
Cheers,
Peter
pwa
 
Posts: 4
Joined: 31. August 2017 05:38
XAMPP version: 7.1.8-0
Operating System: 10.12.6 - MacBookPro Lte 2011

Re: Multiple VMs on one Mac

Postby Altrea » 06. January 2019 08:59

You are welcome :D
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 9741
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 1 guest