[pve-devel] applied: [PATCH qemu-server] Fix: rtcflags: ignore startdate 'now'

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Jul 4 11:35:03 CEST 2019


On 7/4/19 11:00 AM, Alwin Antreich wrote:
> If 'now' is passed to the startdate option, the kvm start fails with
> below failure.
>  kvm: invalid datetime format
>  valid formats: '2006-06-17T16:01:21' or '2006-06-17'
> 
> With this patch, 'now' is ignored and not passed to the rtcflags (-rtc).
> 
> Signed-off-by: Alwin Antreich <a.antreich at proxmox.com>
> ---
>  PVE/QemuServer.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index b4b1580..5ef92a3 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -3854,7 +3854,7 @@ sub config_to_command {
>  	push @$machineFlags, "type=${machine_type}";
>      }
>  
> -    if ($conf->{startdate}) {
> +    if (($conf->{startdate}) && ($conf->{startdate} ne 'now')) {
>  	push @$rtcFlags, "base=$conf->{startdate}";
>      } elsif ($useLocaltime) {
>  	push @$rtcFlags, 'base=localtime';
> 

applied, thanks!




More information about the pve-devel mailing list