I have set to run pintos on my own ubuntu desktop 14.04. For now it runs perfectly on the desktop, as shown in the image below.

qemu working on ubuntu desktop

Using this ubuntu as a server as well, I wish I could run QEMU via ssh as well. I know that it is possible to run bochs via ssh, but is it possible to do so with QEMU as well?

I assume there must be a way to run qemu as a command line interface (like bochs).

qemu not working on ssh terminal

In fact, here is the script for running qemu in pintos script. I assume that pintos should run with $vga eq 'none' on ssh, but it seems not.

# Runs QEMU.
sub run_qemu {
    print "warning: qemu doesn't support --terminal\n"
      if $vga eq 'terminal';
    print "warning: qemu doesn't support jitter\n"
      if defined $jitter;
    my (@cmd) = ('qemu');
    for my $iface (0...3) {
    my ($option) = ('-hda', '-hdb', '-hdc', '-hdd')[$iface];
    push (@cmd, $option, $disks_by_iface[$iface]{FILE_NAME})
      if defined $disks_by_iface[$iface]{FILE_NAME};
    }
    push (@cmd, '-m', $mem);
    push (@cmd, '-net', 'none');
    push (@cmd, '-nographic') if $vga eq 'none';
    push (@cmd, '-serial', 'stdio') if $serial && $vga ne 'none';
    push (@cmd, '-S') if $debug eq 'monitor';
    push (@cmd, '-s', '-S') if $debug eq 'gdb';
    push (@cmd, '-monitor', 'null') if $vga eq 'none' && $debug eq 'none';
    run_command (@cmd);
}

Any help will be appreciated.

1

There are 1 best solutions below

0
On

I found a solution to my own problem. You just need to give -nographic option no matter what $vga variable is. $vga variable can be one of 'none', 'terminal', 'window'. So you could add push (@cmd, '-nographic') if $vga eq 'window'; to pintos perl script.

I still wonder how they determine if I am running on a terminal, and why they get it wrong. Please let me know if you have any idea.