Downloading a copy of your VM (Virtual Machine) to a separate environment allows you to duplicate your VM with ease, restore your VM to the state you downloaded it, or run separate tests on the current state of your VM. In this tutorial, we will be covering how to download a VM as an OVF from your HPC (Hosted Private Cloud) environment to a Windows machine.
- Admin credentials to an OVHcloud HPC environment
- A My VMware account
- A powered-off VM (Virtual Machine) in an OVHcloud HPC environment
- A target location running a Windows Operating System (Windows 8, Windows 10, Windows Server 2012, Windows Server 2016, Windows Server 2019)
Download the OVF Tool
To start, we need to download the OVF Tool from VMware. Download the tool on your Windows machine where you want to store your VM as an OVF. Once on the VMware page, select the latest release of the tool and click Software Download.
Note: In order to download the tool, you will need a My VMware account. If you do not have an account you can sign up for one here.
Next, we will be setting up an environment variable. This step is optional and is meant for ease of use when utilizing the OVF Tool. If you prefer to skip this step continue to the next section Download a VM as an OVF.
Set up an environment variable (optional)
To start, we need to locate the path where the OVF Tool is installed. In our example, the path of our OVF tool is C:\Program Files\VMware\VMware OVF Tool\. Now that we have the file path we need to edit our environment variables. To do so, click the magnifying glass in the bottom-left corner and type Environment Variables. Next, select Edit the system environment variables.
This will bring up a System Properties window. On this window select Environment Variables... In the new Environment Variables window select Path under the System variables section, now, click Edit...
In the new window, append the list with the path of the OVF Tool by selecting New. In our case, our path is C:\Program Files\VMware\VMware OVF Tool\. Click OK when finished.
Download a VM as an OVF
Open the Windows Command Prompt by selecting the magnifying glass in the bottom-left corner and searching Command Prompt.
In the command prompt type
ovftool you should see the following output if the tool is correctly installed.
C:\Users\OVHcloud>ovftool Error: No source or target specified. Try 'ovftool --help' for more options. Completed with errors
Note: If you skipped setting up the environmental variable, you will need to first navigate to the folder where the OVFTool is deployed.
To utilize our OVFTool, we will need the following information.
- The username used to login to the HPC environment
- The hostname of the HPC environment
- The data center attached to the HPC environment (located within the OVHcloud Manager and vSphere Web Client)
- The name of the VM on the HPC environment
Note: The VM that you are downloading must be powered off.
Once you've gathered the information, input it into the command line of the Command Prompt.
C:\Users\OVHcloud>ovftool vi://admin@pcc-XXX-XXX-XXX-XXX.ovh.us:443/pcc-XXX-XXX-XXX-XXX_datacenterXXX/vm/OVHcloudVM C:\Users\OVHcloud\Desktop\VMname
- replace admin@pcc-XXX-XXX-XXX-XXXwith your login@HPC-hostname
- replace pcc-XXX-XXX-XXX-XXX_datacenterXXXwith your HPC-hostname_datacenter#
- replace OVHcloudVM with the name of your VM
- If your VM is located in a subdirectory or if you moved your VM into a different directory, you will need to use the file path of that directory. Example: ...datacenterXXX/vm/Windows_VMs/WindowsVMExample. However, the /vm directory is the default directory and if you did not make a change this will be the directory you will use.
- replace C:\Users\OVHcloud\Desktop\VMname with the location of where you would like to save your VM on your target machine, ending with the name of your VM.
- You also have the option of saving this as an OVA by appending .ova at the end of the location. Example: C:\Users\OVHcloud\Desktop\VM.ova
If completed correctly, you will be asked for a username and password. After filling in the requested information, the OVF or OVA will begin downloading.
Enter login information for source vi://pcc-147-135-13-14.ovh.us/ Username: OVHcloud Password: ********* Opening VI source: vi://OVHcloud@pcc-XXX-XXX-XXX-XXX.ovh.us:443/pcc-XXX-XXX-XXX-XXX_datacenterXXX/vm/OVHTEST1 Opening VI source: vi://OVHcloud@pcc-XXX-XXX-XXX-XXX.ovh.us:443/pcc-XXX-XXX-XXX-XXX_datacenterXXX/vm/OVHTEST1 Opening OVF target: C:\Users\OVHcloud\Desktop Writing OVF package: C:\Users\OVHcloud\Desktop\OVHTEST1\OVHTEST1.ovf Transfer Completed Completed successfully
Having the ability to quickly download your VMs is essential for backing up any information on them. This information could get destroyed from incompatible upgrades, testing new software, bugs in the system, etc. Having read this article, you should now be able to safely and securely save your VMs as an OVF or OVA on your Windows Machine.