ctenar
ctenar

Reputation: 808

Get console output from virtual machine started on command line

When starting a virtual machine from the command line on a remote computer via VBoxManage startvm "vm_name" --type headless, is there a way to collect the output of the guest operating system on start up? The ultimate goal is to handle and manipulate the vm from a bash shell or python script, but some information that is printed out during start up is needed for that.

Upvotes: 0

Views: 1340

Answers (1)

Mike D
Mike D

Reputation: 365

  • Go to "Settings" of your Virtual Machine in VirtualBox.
  • Select "Ports"
  • Enable Serial Port and provide a port/file path that will store the data on your host.

On the virtual machine, edit your boot options and add console=ttyS0 console=tty0 ignore_loglevel

From there, you should be able to tail the file you specified in the Serial Port section.

Source: http://techvolve.blogspot.com/2013/11/how-to-redirect-linux-guest-output-of.html

Upvotes: 1

Related Questions