1

What's the best way of sharing an existing running VM with another user?

To clarify: I don't mean sharing the screen. I mean packaging the maching up, and sending it to someone else so they can import it in their VirtualBox software.

I'm a little confused about whether I should be using Snapshots (is this possible?) or Exporting an Appliance.

And it needs to be a running VM.

The docs seem to say that to Export an Appliance you need to stop the VM.

and when I try and Export a Virtual Appliance it says:

The following virtual machine is currently in a save state: <name of machine>

If you continue the runtime state of the exported machine will be discarded. Other machines will not be changed.

i.e. this Sharing VirtualBox snapshots mentions Exporting but this means stopping the VM.

I'm specifically wanting to capture the runtime state of someone's VM so I can debug a problem within the VM.

Snowcrash
  • 433

2 Answers2

1

I think when you talk about sharing you talk about allowing remote access or something similar.

Configure your virtual machine to an interface that allows "Port forwarding":

Your virtual machine must be in a network interface that allows "Port forwarding"...

https://www.virtualbox.org/manual/ch06.html, "Table 6.1. Overview"

https://www.virtualbox.org/manual/ch06.html, "Table 6.1. Overview"

To configure a suitable network interface ("Settings..." -> "Network" -> "Attached to:")...

enter image description here

Configure a "Port forwarding":

You can configure a "Port forwarding" ("Settings..." -> "Network" -> "Advanced")...

"Settings..." -> "Network" -> "Advanced"

... in the interface (NAT/NAT Network) that your virtual machine is for a Remote Desktop Protocol (RDP) (port 3389) or a Secure Shell (SSH) port 22, for example.

TIP: Do not forget to open access in your firewall rules (iptables, if your OS is a Linux or similar) if it is enabled.

0

I found out how to do that. First you need to select save the machine state when closing the VM. Then you send your friend the .sav file from the Snapshot folder plus the ova file you get when creating an appliance. Next your friend imports the .ova, runs it and then closes it, saving the machine state as well. Finally he has to replace his .sav file with yours and restart his VM.

edit: Small improvement to prevent problems: After importing the .ova your friend should not start the VM but instead create a Snapshots folder in the folder containing the VM. Next he copies the .sav file into Snapshots and then edits the .vbox file. Near the top of that file there is a line that reads <Machine uuid=... name=... OSType=... snapshotFolder="Snapshots" lastStateChange=...> In that line he needs to add stateFile="Snapshots/[filename].sav" after OSType=... You can send him your .vbox file for comparison.

Tesseract
  • 2,052