Drop obsolete boot=on parameter

This commit is contained in:
Eelco Dolstra 2015-06-10 12:02:48 +02:00
parent 38b58bab62
commit 0f35f9bb69

View File

@ -21,7 +21,7 @@ sub new {
my ($class, $args) = @_; my ($class, $args) = @_;
my $startCommand = $args->{startCommand}; my $startCommand = $args->{startCommand};
my $name = $args->{name}; my $name = $args->{name};
if (!$name) { if (!$name) {
$startCommand =~ /run-(.*)-vm$/ if defined $startCommand; $startCommand =~ /run-(.*)-vm$/ if defined $startCommand;
@ -34,7 +34,7 @@ sub new {
"qemu-kvm -m 384 " . "qemu-kvm -m 384 " .
"-net nic,model=virtio \$QEMU_OPTS "; "-net nic,model=virtio \$QEMU_OPTS ";
my $iface = $args->{hdaInterface} || "virtio"; my $iface = $args->{hdaInterface} || "virtio";
$startCommand .= "-drive file=" . Cwd::abs_path($args->{hda}) . ",if=$iface,boot=on,werror=report " $startCommand .= "-drive file=" . Cwd::abs_path($args->{hda}) . ",if=$iface,werror=report "
if defined $args->{hda}; if defined $args->{hda};
$startCommand .= "-cdrom $args->{cdrom} " $startCommand .= "-cdrom $args->{cdrom} "
if defined $args->{cdrom}; if defined $args->{cdrom};
@ -171,7 +171,7 @@ sub start {
eval { eval {
local $SIG{CHLD} = sub { die "QEMU died prematurely\n"; }; local $SIG{CHLD} = sub { die "QEMU died prematurely\n"; };
# Wait until QEMU connects to the monitor. # Wait until QEMU connects to the monitor.
accept($self->{monitor}, $monitorS) or die; accept($self->{monitor}, $monitorS) or die;
@ -182,11 +182,11 @@ sub start {
$self->{socket}->autoflush(1); $self->{socket}->autoflush(1);
}; };
die "$@" if $@; die "$@" if $@;
$self->waitForMonitorPrompt; $self->waitForMonitorPrompt;
$self->log("QEMU running (pid $pid)"); $self->log("QEMU running (pid $pid)");
$self->{pid} = $pid; $self->{pid} = $pid;
$self->{booted} = 1; $self->{booted} = 1;
} }
@ -241,7 +241,7 @@ sub connect {
alarm 300; alarm 300;
readline $self->{socket} or die "the VM quit before connecting\n"; readline $self->{socket} or die "the VM quit before connecting\n";
alarm 0; alarm 0;
$self->log("connected to guest root shell"); $self->log("connected to guest root shell");
$self->{connected} = 1; $self->{connected} = 1;
@ -270,7 +270,7 @@ sub isUp {
sub execute_ { sub execute_ {
my ($self, $command) = @_; my ($self, $command) = @_;
$self->connect; $self->connect;
print { $self->{socket} } ("( $command ); echo '|!=EOF' \$?\n"); print { $self->{socket} } ("( $command ); echo '|!=EOF' \$?\n");
@ -453,7 +453,7 @@ sub shutdown {
sub crash { sub crash {
my ($self) = @_; my ($self) = @_;
return unless $self->{booted}; return unless $self->{booted};
$self->log("forced crash"); $self->log("forced crash");
$self->sendMonitorCommand("quit"); $self->sendMonitorCommand("quit");