xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Adjusting HVM guest time leads to overflow
@ 2015-07-20  4:11 Arvin Wang
  2015-07-20 13:43 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 3+ messages in thread
From: Arvin Wang @ 2015-07-20  4:11 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 4231 bytes --]

hi,all

    I adjusted time back to year 1900 in windows guest vm. And when i
rebooted the vm, it failed.

It seems that the value of adjustment exceed the range. Any suggestions?

The logs:

[2015-06-26 11:13:13 15113] DEBUG (SrvDomain:76) Starting domain
instance-000001bb False
[2015-06-26 11:13:13 15113] DEBUG (XendDomainInfo:2311)
XendDomainInfo.constructDomain
[2015-06-26 11:13:13 15113] DEBUG (balloon:166) Balloon: 13544396 KiB free;
need 4096; done.
[2015-06-26 11:13:13 15113] DEBUG (XendDomain:453) Adding Domain: 30
[2015-06-26 11:13:13 15113] DEBUG (XendDomainInfo:2512)
XendDomainInfo.initDomain: 30 256
[2015-06-26 11:13:13 15113] DEBUG (image:322) No VNC passwd configured for
vfb access
[2015-06-26 11:13:13 15113] DEBUG (image:813) args: boot, val: c
[2015-06-26 11:13:13 15113] DEBUG (image:813) args: fda, val: None
[2015-06-26 11:13:13 15113] DEBUG (image:813) args: fdb, val: None
[2015-06-26 11:13:13 15113] DEBUG (image:813) args: soundhw, val: None
[2015-06-26 11:13:13 15113] DEBUG (image:813) args: localtime, val: 1
[2015-06-26 11:13:13 15113] DEBUG (image:813) args: serial, val: ['pty']
[2015-06-26 11:13:13 15113] DEBUG (image:813) args: std-vga, val: None
[2015-06-26 11:13:13 15113] DEBUG (image:813) args: isa, val: None
[2015-06-26 11:13:13 15113] DEBUG (image:813) args: acpi, val: 1
[2015-06-26 11:13:13 15113] DEBUG (image:813) args: usb, val: 1
[2015-06-26 11:13:13 15113] DEBUG (image:813) args: usbdevice, val: tablet
[2015-06-26 11:13:13 15113] ERROR (XendDomainInfo:476) VM start failed
Traceback (most recent call last):
File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line
456, in start
XendTask.log_progress(31, 60, self._initDomain)
File "/usr/lib64/python2.4/site-packages/xen/xend/XendTask.py", line 209,
in log_progress
retval = func(*args, **kwds)
File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line
2517, in




*initDomainself.image = image.create(self, self.info
<http://self.info>)File
"/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 66, in
createreturn findImageHandlerClass(vmConfig)(vm, vmConfig)File
"/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 716, in
initImageHandler.*_init__(self, vm, vmConfig)
File "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 96, in
*init*
self.configure(vmConfig)
File "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 945, in
configure
HVMImageHandler.configure(self, vmConfig)
File "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 721, in
configure
ImageHandler.configure(self, vmConfig)
File "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 129, in
configure
xc.domain_set_time_offset(self.vm.getDomid(), rtc_timeoffset)
OverflowError: signed integer is greater than maximum

vm.cfg as follows:
<domain type='xen'>
<name>instance-000001bb</name>
<uuid>80afee54-40b6-4aec-bf19-53bca024c3d8</uuid>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static'>2</vcpu>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='variable' adjustment='-1917066511' basis='localtime'>
<timer name='hpet' present='no'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='block' device='disk'>
<driver name='phy'/>
<source dev='/dev/xenvg1/instance-000001bb_disk'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='bridge'>
<mac address='fa:16:3e:05:63:37'/>
<source bridge='xbr_v26'/>
<script path='vif-bridge'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' listen='10.195.158.117'>
<listen type='address' address='10.195.158.117'/>
</graphics>
</devices>
</domain>

-- 
Services Computing Technology and System Lab && Cluster and Grid Computing
Lab.
School of Computer Science and Technology,
Huazhong University of Science and Technology,
Wuhan,430074,China.

[-- Attachment #1.2: Type: text/html, Size: 5556 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Adjusting HVM guest time leads to overflow
  2015-07-20  4:11 Adjusting HVM guest time leads to overflow Arvin Wang
@ 2015-07-20 13:43 ` Konrad Rzeszutek Wilk
       [not found]   ` <CAC9TLQF6aoUaMuYJZzyakuRomQkcYBVGCouDEzpZxSMafXf+bQ@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-07-20 13:43 UTC (permalink / raw)
  To: Arvin Wang; +Cc: xen-devel

On Mon, Jul 20, 2015 at 12:11:35PM +0800, Arvin Wang wrote:
> hi,all
> 
>     I adjusted time back to year 1900 in windows guest vm. And when i
> rebooted the vm, it failed.
> 
> It seems that the value of adjustment exceed the range. Any suggestions?

You are using Xend which is deprecated and no longer in use. Have you
tried using the latest Xen version and using 'xl' instead?

Thanks.
> 
> The logs:
> 
> [2015-06-26 11:13:13 15113] DEBUG (SrvDomain:76) Starting domain
> instance-000001bb False
> [2015-06-26 11:13:13 15113] DEBUG (XendDomainInfo:2311)
> XendDomainInfo.constructDomain
> [2015-06-26 11:13:13 15113] DEBUG (balloon:166) Balloon: 13544396 KiB free;
> need 4096; done.
> [2015-06-26 11:13:13 15113] DEBUG (XendDomain:453) Adding Domain: 30
> [2015-06-26 11:13:13 15113] DEBUG (XendDomainInfo:2512)
> XendDomainInfo.initDomain: 30 256
> [2015-06-26 11:13:13 15113] DEBUG (image:322) No VNC passwd configured for
> vfb access
> [2015-06-26 11:13:13 15113] DEBUG (image:813) args: boot, val: c
> [2015-06-26 11:13:13 15113] DEBUG (image:813) args: fda, val: None
> [2015-06-26 11:13:13 15113] DEBUG (image:813) args: fdb, val: None
> [2015-06-26 11:13:13 15113] DEBUG (image:813) args: soundhw, val: None
> [2015-06-26 11:13:13 15113] DEBUG (image:813) args: localtime, val: 1
> [2015-06-26 11:13:13 15113] DEBUG (image:813) args: serial, val: ['pty']
> [2015-06-26 11:13:13 15113] DEBUG (image:813) args: std-vga, val: None
> [2015-06-26 11:13:13 15113] DEBUG (image:813) args: isa, val: None
> [2015-06-26 11:13:13 15113] DEBUG (image:813) args: acpi, val: 1
> [2015-06-26 11:13:13 15113] DEBUG (image:813) args: usb, val: 1
> [2015-06-26 11:13:13 15113] DEBUG (image:813) args: usbdevice, val: tablet
> [2015-06-26 11:13:13 15113] ERROR (XendDomainInfo:476) VM start failed
> Traceback (most recent call last):
> File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line
> 456, in start
> XendTask.log_progress(31, 60, self._initDomain)
> File "/usr/lib64/python2.4/site-packages/xen/xend/XendTask.py", line 209,
> in log_progress
> retval = func(*args, **kwds)
> File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line
> 2517, in
> 
> 
> 
> 
> *initDomainself.image = image.create(self, self.info
> <http://self.info>)File
> "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 66, in
> createreturn findImageHandlerClass(vmConfig)(vm, vmConfig)File
> "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 716, in
> initImageHandler.*_init__(self, vm, vmConfig)
> File "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 96, in
> *init*
> self.configure(vmConfig)
> File "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 945, in
> configure
> HVMImageHandler.configure(self, vmConfig)
> File "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 721, in
> configure
> ImageHandler.configure(self, vmConfig)
> File "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 129, in
> configure
> xc.domain_set_time_offset(self.vm.getDomid(), rtc_timeoffset)
> OverflowError: signed integer is greater than maximum
> 
> vm.cfg as follows:
> <domain type='xen'>
> <name>instance-000001bb</name>
> <uuid>80afee54-40b6-4aec-bf19-53bca024c3d8</uuid>
> <memory unit='KiB'>4194304</memory>
> <currentMemory unit='KiB'>4194304</currentMemory>
> <vcpu placement='static'>2</vcpu>
> <os>
> <type>hvm</type>
> <loader>/usr/lib/xen/boot/hvmloader</loader>
> <boot dev='hd'/>
> </os>
> <features>
> <acpi/>
> <apic/>
> <pae/>
> </features>
> <clock offset='variable' adjustment='-1917066511' basis='localtime'>
> <timer name='hpet' present='no'/>
> </clock>
> <on_poweroff>destroy</on_poweroff>
> <on_reboot>restart</on_reboot>
> <on_crash>destroy</on_crash>
> <devices>
> <emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
> <disk type='block' device='disk'>
> <driver name='phy'/>
> <source dev='/dev/xenvg1/instance-000001bb_disk'/>
> <target dev='hda' bus='ide'/>
> </disk>
> <interface type='bridge'>
> <mac address='fa:16:3e:05:63:37'/>
> <source bridge='xbr_v26'/>
> <script path='vif-bridge'/>
> </interface>
> <serial type='pty'>
> <target port='0'/>
> </serial>
> <console type='pty'>
> <target type='serial' port='0'/>
> </console>
> <input type='tablet' bus='usb'/>
> <input type='mouse' bus='ps2'/>
> <graphics type='vnc' port='-1' autoport='yes' listen='10.195.158.117'>
> <listen type='address' address='10.195.158.117'/>
> </graphics>
> </devices>
> </domain>
> 
> -- 
> Services Computing Technology and System Lab && Cluster and Grid Computing
> Lab.
> School of Computer Science and Technology,
> Huazhong University of Science and Technology,
> Wuhan,430074,China.

> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Adjusting HVM guest time leads to overflow
       [not found]   ` <CAC9TLQF6aoUaMuYJZzyakuRomQkcYBVGCouDEzpZxSMafXf+bQ@mail.gmail.com>
@ 2015-07-22 13:32     ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-07-22 13:32 UTC (permalink / raw)
  To: Arvin Wang, xen-devel

On Tue, Jul 21, 2015 at 05:44:41PM +0800, Arvin Wang wrote:
> Hi,Konrad
> 
>     Thanks for your reply. It is true Xend is deprecated. But i think the
> error relates with
> 
> the libxc.   The type of rtc_timeoffset in libxc is signed int. And the
> value of timeoffset
> 
> exceeds the range of int32.

OK, not sure why you dropped xen-devel (added it on).

I presume you had tried a fix a changed it to a different value?

Something like this:

diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
index ce9029c..66bdc5c 100644
--- a/tools/libxc/include/xenctrl.h
+++ b/tools/libxc/include/xenctrl.h
@@ -1317,7 +1317,7 @@ int xc_get_machine_memory_map(xc_interface *xch,
 #endif
 int xc_domain_set_time_offset(xc_interface *xch,
                               uint32_t domid,
-                              int32_t time_offset_seconds);
+                              int64_t time_offset_seconds);
 
 int xc_domain_set_tsc_info(xc_interface *xch,
                            uint32_t domid,
diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
index 6db8d13..62499d6 100644
--- a/tools/libxc/xc_domain.c
+++ b/tools/libxc/xc_domain.c
@@ -732,7 +732,7 @@ int xc_domain_set_memmap_limit(xc_interface *xch,
 
 int xc_domain_set_time_offset(xc_interface *xch,
                               uint32_t domid,
-                              int32_t time_offset_seconds)
+                              int64_t time_offset_seconds)
 {
     DECLARE_DOMCTL;
     domctl.cmd = XEN_DOMCTL_settimeoffset;
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index bc0c4ef..a03eb68 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -400,7 +400,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
     ("target_memkb",    MemKB),
     ("video_memkb",     MemKB),
     ("shadow_memkb",    MemKB),
-    ("rtc_timeoffset",  uint32),
+    ("rtc_timeoffset",  uint64),
     ("exec_ssidref",    uint32),
     ("exec_ssid_label", string),
     ("localtime",       libxl_defbool),
diff --git a/tools/libxl/libxl_x86.c b/tools/libxl/libxl_x86.c
index 8cd15ca..ee451d1 100644
--- a/tools/libxl/libxl_x86.c
+++ b/tools/libxl/libxl_x86.c
@@ -276,7 +276,7 @@ int libxl__arch_domain_create(libxl__gc *gc, libxl_domain_config *d_config,
 {
     int ret = 0;
     int tsc_mode;
-    uint32_t rtc_timeoffset;
+    int64_t rtc_timeoffset;
     libxl_ctx *ctx = libxl__gc_owner(gc);
 
     if (d_config->b_info.type == LIBXL_DOMAIN_TYPE_PV)
> 
> On Mon, Jul 20, 2015 at 9:43 PM, Konrad Rzeszutek Wilk <
> konrad.wilk@oracle.com> wrote:
> 
> > On Mon, Jul 20, 2015 at 12:11:35PM +0800, Arvin Wang wrote:
> > > hi,all
> > >
> > >     I adjusted time back to year 1900 in windows guest vm. And when i
> > > rebooted the vm, it failed.
> > >
> > > It seems that the value of adjustment exceed the range. Any suggestions?
> >
> > You are using Xend which is deprecated and no longer in use. Have you
> > tried using the latest Xen version and using 'xl' instead?
> >
> > Thanks.
> > >
> > > The logs:
> > >
> > > [2015-06-26 11:13:13 15113] DEBUG (SrvDomain:76) Starting domain
> > > instance-000001bb False
> > > [2015-06-26 11:13:13 15113] DEBUG (XendDomainInfo:2311)
> > > XendDomainInfo.constructDomain
> > > [2015-06-26 11:13:13 15113] DEBUG (balloon:166) Balloon: 13544396 KiB
> > free;
> > > need 4096; done.
> > > [2015-06-26 11:13:13 15113] DEBUG (XendDomain:453) Adding Domain: 30
> > > [2015-06-26 11:13:13 15113] DEBUG (XendDomainInfo:2512)
> > > XendDomainInfo.initDomain: 30 256
> > > [2015-06-26 11:13:13 15113] DEBUG (image:322) No VNC passwd configured
> > for
> > > vfb access
> > > [2015-06-26 11:13:13 15113] DEBUG (image:813) args: boot, val: c
> > > [2015-06-26 11:13:13 15113] DEBUG (image:813) args: fda, val: None
> > > [2015-06-26 11:13:13 15113] DEBUG (image:813) args: fdb, val: None
> > > [2015-06-26 11:13:13 15113] DEBUG (image:813) args: soundhw, val: None
> > > [2015-06-26 11:13:13 15113] DEBUG (image:813) args: localtime, val: 1
> > > [2015-06-26 11:13:13 15113] DEBUG (image:813) args: serial, val: ['pty']
> > > [2015-06-26 11:13:13 15113] DEBUG (image:813) args: std-vga, val: None
> > > [2015-06-26 11:13:13 15113] DEBUG (image:813) args: isa, val: None
> > > [2015-06-26 11:13:13 15113] DEBUG (image:813) args: acpi, val: 1
> > > [2015-06-26 11:13:13 15113] DEBUG (image:813) args: usb, val: 1
> > > [2015-06-26 11:13:13 15113] DEBUG (image:813) args: usbdevice, val:
> > tablet
> > > [2015-06-26 11:13:13 15113] ERROR (XendDomainInfo:476) VM start failed
> > > Traceback (most recent call last):
> > > File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py",
> > line
> > > 456, in start
> > > XendTask.log_progress(31, 60, self._initDomain)
> > > File "/usr/lib64/python2.4/site-packages/xen/xend/XendTask.py", line 209,
> > > in log_progress
> > > retval = func(*args, **kwds)
> > > File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py",
> > line
> > > 2517, in
> > >
> > >
> > >
> > >
> > > *initDomainself.image = image.create(self, self.info
> > > <http://self.info>)File
> > > "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 66, in
> > > createreturn findImageHandlerClass(vmConfig)(vm, vmConfig)File
> > > "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 716, in
> > > initImageHandler.*_init__(self, vm, vmConfig)
> > > File "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 96, in
> > > *init*
> > > self.configure(vmConfig)
> > > File "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 945, in
> > > configure
> > > HVMImageHandler.configure(self, vmConfig)
> > > File "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 721, in
> > > configure
> > > ImageHandler.configure(self, vmConfig)
> > > File "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 129, in
> > > configure
> > > xc.domain_set_time_offset(self.vm.getDomid(), rtc_timeoffset)
> > > OverflowError: signed integer is greater than maximum
> > >
> > > vm.cfg as follows:
> > > <domain type='xen'>
> > > <name>instance-000001bb</name>
> > > <uuid>80afee54-40b6-4aec-bf19-53bca024c3d8</uuid>
> > > <memory unit='KiB'>4194304</memory>
> > > <currentMemory unit='KiB'>4194304</currentMemory>
> > > <vcpu placement='static'>2</vcpu>
> > > <os>
> > > <type>hvm</type>
> > > <loader>/usr/lib/xen/boot/hvmloader</loader>
> > > <boot dev='hd'/>
> > > </os>
> > > <features>
> > > <acpi/>
> > > <apic/>
> > > <pae/>
> > > </features>
> > > <clock offset='variable' adjustment='-1917066511' basis='localtime'>
> > > <timer name='hpet' present='no'/>
> > > </clock>
> > > <on_poweroff>destroy</on_poweroff>
> > > <on_reboot>restart</on_reboot>
> > > <on_crash>destroy</on_crash>
> > > <devices>
> > > <emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
> > > <disk type='block' device='disk'>
> > > <driver name='phy'/>
> > > <source dev='/dev/xenvg1/instance-000001bb_disk'/>
> > > <target dev='hda' bus='ide'/>
> > > </disk>
> > > <interface type='bridge'>
> > > <mac address='fa:16:3e:05:63:37'/>
> > > <source bridge='xbr_v26'/>
> > > <script path='vif-bridge'/>
> > > </interface>
> > > <serial type='pty'>
> > > <target port='0'/>
> > > </serial>
> > > <console type='pty'>
> > > <target type='serial' port='0'/>
> > > </console>
> > > <input type='tablet' bus='usb'/>
> > > <input type='mouse' bus='ps2'/>
> > > <graphics type='vnc' port='-1' autoport='yes' listen='10.195.158.117'>
> > > <listen type='address' address='10.195.158.117'/>
> > > </graphics>
> > > </devices>
> > > </domain>
> > >
> > > --
> > > Services Computing Technology and System Lab && Cluster and Grid
> > Computing
> > > Lab.
> > > School of Computer Science and Technology,
> > > Huazhong University of Science and Technology,
> > > Wuhan,430074,China.
> >
> > > _______________________________________________
> > > Xen-devel mailing list
> > > Xen-devel@lists.xen.org
> > > http://lists.xen.org/xen-devel
> >
> >
> 
> 
> -- 
> Services Computing Technology and System Lab && Cluster and Grid Computing
> Lab.
> School of Computer Science and Technology,
> Huazhong University of Science and Technology,
> Wuhan,430074,China.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-22 13:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-20  4:11 Adjusting HVM guest time leads to overflow Arvin Wang
2015-07-20 13:43 ` Konrad Rzeszutek Wilk
     [not found]   ` <CAC9TLQF6aoUaMuYJZzyakuRomQkcYBVGCouDEzpZxSMafXf+bQ@mail.gmail.com>
2015-07-22 13:32     ` Konrad Rzeszutek Wilk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).