mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-08 04:14:28 +00:00
fix bug 251: use new command line syntax
This commit is contained in:
parent
1a858769ba
commit
8c55950564
2
Makefile
2
Makefile
@ -2,7 +2,7 @@ RELEASE=2.2
|
|||||||
|
|
||||||
VERSION=2.0
|
VERSION=2.0
|
||||||
PACKAGE=qemu-server
|
PACKAGE=qemu-server
|
||||||
PKGREL=57
|
PKGREL=58
|
||||||
|
|
||||||
DESTDIR=
|
DESTDIR=
|
||||||
PREFIX=/usr
|
PREFIX=/usr
|
||||||
|
@ -309,8 +309,8 @@ EODESC
|
|||||||
tdf => {
|
tdf => {
|
||||||
optional => 1,
|
optional => 1,
|
||||||
type => 'boolean',
|
type => 'boolean',
|
||||||
description => "Enable/disable time drift fix. This is ignored for kvm versions newer that 1.0 (not needed anymore).",
|
description => "Enable/disable time drift fix.",
|
||||||
default => 1,
|
default => 0,
|
||||||
},
|
},
|
||||||
localtime => {
|
localtime => {
|
||||||
optional => 1,
|
optional => 1,
|
||||||
@ -2118,6 +2118,9 @@ sub config_to_command {
|
|||||||
my ($storecfg, $vmid, $conf, $defaults) = @_;
|
my ($storecfg, $vmid, $conf, $defaults) = @_;
|
||||||
|
|
||||||
my $cmd = [];
|
my $cmd = [];
|
||||||
|
my $globalFlags = [];
|
||||||
|
my $machineFlags = [];
|
||||||
|
my $rtcFlags = [];
|
||||||
my $devices = [];
|
my $devices = [];
|
||||||
my $pciaddr = '';
|
my $pciaddr = '';
|
||||||
my $bridges = {};
|
my $bridges = {};
|
||||||
@ -2249,43 +2252,41 @@ sub config_to_command {
|
|||||||
|
|
||||||
# time drift fix
|
# time drift fix
|
||||||
my $tdf = defined($conf->{tdf}) ? $conf->{tdf} : $defaults->{tdf};
|
my $tdf = defined($conf->{tdf}) ? $conf->{tdf} : $defaults->{tdf};
|
||||||
# ignore - no longer supported by newer kvm
|
|
||||||
# push @$cmd, '-tdf' if $tdf;
|
|
||||||
|
|
||||||
my $nokvm = defined($conf->{kvm}) && $conf->{kvm} == 0 ? 1 : 0;
|
my $nokvm = defined($conf->{kvm}) && $conf->{kvm} == 0 ? 1 : 0;
|
||||||
|
my $useLocaltime = $conf->{localtime};
|
||||||
|
|
||||||
if (my $ost = $conf->{ostype}) {
|
if (my $ost = $conf->{ostype}) {
|
||||||
# other, wxp, w2k, w2k3, w2k8, wvista, win7, l24, l26
|
# other, wxp, w2k, w2k3, w2k8, wvista, win7, l24, l26
|
||||||
|
|
||||||
if ($ost =~ m/^w/) { # windows
|
if ($ost =~ m/^w/) { # windows
|
||||||
push @$cmd, '-localtime' if !defined($conf->{localtime});
|
$useLocaltime = 1 if !defined($conf->{localtime});
|
||||||
|
|
||||||
# use rtc-td-hack when acpi is enabled
|
# use time drift fix when acpi is enabled
|
||||||
if (!(defined($conf->{acpi}) && $conf->{acpi} == 0)) {
|
if (!(defined($conf->{acpi}) && $conf->{acpi} == 0)) {
|
||||||
push @$cmd, '-rtc-td-hack';
|
$tdf = 1 if !defined($conf->{tdf});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ost eq 'win7' || $ost eq 'w2k8' || $ost eq 'wvista') {
|
if ($ost eq 'win7' || $ost eq 'w2k8' || $ost eq 'wvista') {
|
||||||
push @$cmd, '-no-kvm-pit-reinjection';
|
push @$globalFlags, 'kvm-pit.lost_tick_policy=discard';
|
||||||
push @$cmd, '-no-hpet';
|
push @$cmd, '-no-hpet';
|
||||||
}
|
}
|
||||||
|
|
||||||
# -tdf ?
|
|
||||||
# -no-acpi
|
|
||||||
# -no-kvm
|
|
||||||
# -win2k-hack ?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
push @$rtcFlags, 'driftfix=slew' if $tdf;
|
||||||
|
|
||||||
if ($nokvm) {
|
if ($nokvm) {
|
||||||
push @$cmd, '-no-kvm';
|
push @$machineFlags, 'accel=tcg';
|
||||||
} else {
|
} else {
|
||||||
die "No accelerator found!\n" if !$cpuinfo->{hvm};
|
die "No accelerator found!\n" if !$cpuinfo->{hvm};
|
||||||
}
|
}
|
||||||
|
|
||||||
push @$cmd, '-localtime' if $conf->{localtime};
|
if ($conf->{startdate}) {
|
||||||
|
push @$rtcFlags, "base=$conf->{startdate}";
|
||||||
push @$cmd, '-startdate', $conf->{startdate} if $conf->{startdate};
|
} elsif ($useLocaltime) {
|
||||||
|
push @$rtcFlags, 'base=localtime';
|
||||||
|
}
|
||||||
|
|
||||||
push @$cmd, '-S' if $conf->{freeze};
|
push @$cmd, '-S' if $conf->{freeze};
|
||||||
|
|
||||||
@ -2411,6 +2412,13 @@ sub config_to_command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
push @$cmd, @$devices;
|
push @$cmd, @$devices;
|
||||||
|
push @$cmd, '-rtc', join(',', @$rtcFlags)
|
||||||
|
if scalar(@$rtcFlags);
|
||||||
|
push @$cmd, '-machine', join(',', @$machineFlags)
|
||||||
|
if scalar(@$machineFlags);
|
||||||
|
push @$cmd, '-global', join(',', @$globalFlags)
|
||||||
|
if scalar(@$globalFlags);
|
||||||
|
|
||||||
return wantarray ? ($cmd, $vollist) : $cmd;
|
return wantarray ? ($cmd, $vollist) : $cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
qemu-server (2.0-58) unstable; urgency=low
|
||||||
|
|
||||||
|
* fix bug 251: use new command line syntax
|
||||||
|
|
||||||
|
-- Proxmox Support Team <support@proxmox.com> Wed, 26 Sep 2012 12:43:17 +0200
|
||||||
|
|
||||||
qemu-server (2.0-57) unstable; urgency=low
|
qemu-server (2.0-57) unstable; urgency=low
|
||||||
|
|
||||||
* fix migrating VMs with snapshots
|
* fix migrating VMs with snapshots
|
||||||
|
Loading…
Reference in New Issue
Block a user