3

How can I export a virtual machine from VMWare Workstation 8 to another physical computer which has VMWare Workstation 8? i.e. how can I move snapshots between different instances of VMWare Workstation 8?

Virtual machine host's are Linux CentOS.

Assume, source and target machines with installed WMWare are both run on Windows.

Thanks.

3
  • Do you mean snapshots or whole VMs/.vmdk's? as just moving snapshots makes zero sense as far as I can see, why would that be of any help at all - can you explain what you're trying to achieve please.
    – Chopper3
    Sep 25, 2012 at 8:29
  • @Chopper3 I have a task: create virtual machine on VMWare Workstation 8, configure it, install some required software and then I must transmit this VM to another people. So I need export my configured VM (or maybe only snapshot) to some files, and then send this files for importing. They must be able to import this files and use this VM.
    – MyTitle
    Sep 25, 2012 at 8:40
  • I need export my configured VM to some files - I mean I need export my VM as some files.
    – MyTitle
    Sep 25, 2012 at 8:51

2 Answers 2

5

Ok, thanks for the clarification, the problem is your understanding of what a snapshot is - it's not what you think it is. Say you have a disk without snapshots, when you create a snapshot all that happens is that new file is created by the hypervisor with JUST the changes to the base disk that have been made since the snapshot, the hypervisor then only sends to the guest operating system the correct data from either the base disk (if that bit of the disk hasn't been changed since the snapshot) or the data from the snapshot file (only if that bit of data has been changed since the snapshot was created). So JUST sending the snaphot file would only include the changed data and be of little or no use on its own - is that ok?

That said what you're actually trying to achieve is very straightforward, just shutdown your VM and select 'Save to OVF' from the File menu, this will then allow you to save the VM in a hypervisor-gnostic format called OVF that you can then transfer to whoever you like. They can then import that OVF file into whatever hypervisor they have (i.e. it doesn't have to be VMWare Workstation). This file will contain the VM saved at the point of shutdown, if needed you could then remove the snapshots as required on your own machine and continue your work.

Here's a (quite poor) diagram I just created;

enter image description here

In this example we have only four data 'blocks'/locations - numbered 1 to 4. As you can see each 'block' contains a bit of data (a single number in this case). We then create snapshot number 1 and change the data in 'blocks' 1 and 3 (to 101 and 75 in this case). At this point if the OS reads 'block' 1 the response from the hypervisor is 101, not 100, and 75 not 50 for 'block' 3, but the response for 'blocks' 2 and 4 remain 200 and 25. If we remove snapshot 1 then everything goes back to the values in yellow. If we create a second snapshot and write the number 102 into 'block 1' then that 'block' and ONLY that block is updated in the second snapshot file, if we read 'block' 3 it refers back to the first snapshot file to get that data and to the base file if we wanted to read 'blocks' 2 and 4. If we save/export the VM at the 'Snap 2' point it will create a single file with the blocks written at that point (i.e. 102, 200, 75, 25).

Now obviously in any situation where the VM snapshots there can be a performance hit for disk IO as there can be multiple reads and writes to disk to achieve this snapshotting mechanism. In fact the more snapshots and the more changes per snapshot the bigger the performance hit can be. That said there comes a point when if a very large amount of the disk has been written to as part of the current snapshot where the performance hit will lessen as almost all IO will be going to the snap file, but that should be avoided really if you can. In fact VM snaps are a bad idea to live with for long as the time taken to remove them (which just really writes changes back to the basefile or an intermediate snap file) gets longer the more change has occurred since the snap. As a rule I don't like snaps existing for longer than 24/48 hours but in a desktop environment that can be stretched a little.

By the way, this mechanism is pretty much how all snapshotting methods work (It can be a bit different in NetApp's WAFL file system and ZFS but it's a good basic understanding at least) in all hypervisors.

Is this clear? If not maybe take a look at the manuals, they're pretty clear.

10
  • yes, big thanks. i.e. snapshots it is some files, that contain only changed information? i.e. if I make a snapshot, then change 1 file, and make snapshot again - thr result of second operation (crating second snapshot) will be new created file, where will be placed information about one changed files between snapshots (and some system configuration changes - new time etc.) It is right?
    – MyTitle
    Sep 25, 2012 at 9:24
  • Yep, that's exactly right :)
    – Chopper3
    Sep 25, 2012 at 9:25
  • And I need second clarify: In snapshot manager tool I can change current VM state choosing snapshots. So does the OVF format contain this data about snapshots? Or it will contain only state of VM at shutdown time? Again, big thanks, you really kind-hearted man :)
    – MyTitle
    Sep 25, 2012 at 9:25
  • No, the OVF only contains the data on the disks at the time when the OVF was created, it does NOT contain ANY snap data at all. I'm going to add a little diagram to my answer above, hope it helps. Имейте большой день.
    – Chopper3
    Sep 25, 2012 at 9:32
  • Имейте большой день. :D Nice, how did you know that I am from Russia?))
    – MyTitle
    Sep 25, 2012 at 9:39
0

Actually you can do that. Just power down your VM and in snapshots menu make a clone of a snapshot you want to export. In a cloning wizard be sure to use the option to make an independent clone - this will allow moving the machine.

What Chopper3 about snapshots is true, but VMware is capable of merging disks and removing changes from other snapshots. This is why it's also possible to manually remove snapshosts you no longer need and eventually free up some disk space.

Keep in mind that merging and removing operations might take up a lot of disk space at first and might take quite a lot of time.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .