11

I have a remote Ubuntu server without GUI. How can I run a virtual machine with a test.ova file from the command line?

I folloed this tutorial, but how can I attach the .ova file to the VM?

Arronical
  • 19,653
  • 18
  • 73
  • 128
Christos
  • 213
  • 1
  • 2
  • 6

1 Answers1

17

An ova file is a complete archive with all of the information to create a VirtualBox VM included inside it. You would use the command:

vboxmanage import test.ova

This will create the VM in your default VM location, with the same settings as the original VM. You can change settings using the --vsys options to this command as mentioned in the VirtualBox manual. To change the VM name you'd use:

vboxmanage import test.ova --vsys 0 --vmname <name>
Arronical
  • 19,653
  • 18
  • 73
  • 128
  • Thanks, for your answer. I tried and it is working. How can I connect to the new VM? – Christos Oct 31 '16 at 10:12
  • 2
    If you're only using command line, you should start the vm in headless mode with `vboxmanage startvm --type headless`. It depends what machine you're connecting from. I normally connect from Windows via RDP using the VRDE port. You'd need to set this up though. how to connect is really a whole new question. – Arronical Oct 31 '16 at 10:15
  • If you're connecting from another Ubuntu machine, use VNC, If from windows use RDP via VRDE. – Arronical Oct 31 '16 at 10:22