Virtual box question

Sam Hartman hartmans at mit.edu
Fri Jan 18 20:25:21 UTC 2013


>>>>> "Tom" == Tom Masterson <kd7cyu at yahoo.com> writes:

    Tom> I have three virtual machines that either need or have lost ssh
    Tom> access. They are all server setups so no desktop.  Is there a
    Tom> way for me to access them through the virtualbox gui or a
    Tom> console without sighted help?


OK.

So, if the machines can be convinced to talk, then you can use VBoxSDL
(on linux) or similar to get to the console with audio enabled and have
the machine talk.

If the machines can use a serial console, then you can use Virtualbox's
uart mechanism to attach a serial port.  The easiest is probably to
attach a real host serial port to the virtual machine and to then attach
some other computer to that port.
Virtualbox's options for virtual serial ports don't really work that
great.

But since like me you probably don't actually have a host serial port
much less a handy computer sitting along side to use as a terminal that
also has a real serial port, I'll discuss what you've got for virtual
serial ports.
You can ask virtualbox to open up a pipe and let you connect to it.
For example from VBoxManage showvminfo from one of my machines:
UART 1:          I/O base: 0x03f8, IRQ: 4, attached to pipe (server)
'/tmp/moons
hot-test'


The trick is that there aren't many good programs on linux to actually
connect to that pipe.
I use a program called unixterm out of the vde package.
It's horrible; it's line at a time instead of character at a time. So
you have to hit enter before any of your input goes to the virtual
machine.
You also can't send the virtual machine a ctrl-c.

What I tend to do when I get myself into this situation is extract the
raw contents of the disk and use qemu rather than virtualbox.
I'll do something like

qemu -curses -hda disk_image_name

And that's fairly good.
Then I fix the machine, then convert the image back to virtualbox.

Another option is to find a live CD that will talk or can easily be made
to talk and to boot the image with that using the virtualbox console
with audio enabled.

All of these options are a bit tricky, but after a couple of months of
practice I've gotten to a point where I basically don't need anyone
else's help recovering a virtual machine with Linux.  If only RDP
connections to Windows terminal server were that easy:-(




More information about the Blinux-list mailing list