[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] setting memory at runtime fails?



On August 9, 2010, Cole Robinson wrote:
> On 08/08/2010 02:57 AM, Thomas Fjellstrom wrote:
> > Hi,
> > 
> > I've tried on several occasions to use the virt-manager to set memory
> > in a guest at run time, but all it seems to do is set memory in the
> > guest to a very small amount regardless of what number I actually
> > chose (trying to use a number in KB doesn't work, the gui seems to
> > have issues with it. it'll set the max mem, but trying to set mem to
> > anything that large will just make it go back to the previous
> > allocation).
> > 
> > I just tried it again with virt-manager, memory was set to 256M, I told
> > it to increase to 512MB, and it instantly dropped to 70MB and the
> > guest OOMKilled every process. Then I forced the guest off, then tried
> > to restart it and virt-manager decided to say it was going to set the
> > memory to 1024MB, then crash. Though it did start the guest, but only
> > with the 512MB I increased it to in the last step.
> > 
> > virsh seems to work fine to reduce the memory in a vm. I did notice
> > that virsh takes KB and virt-manager takes MB. Is it possible that
> > virt-manager isn't doing the necessary conversion to KB when calling
> > into libvirt?
> 
> More info is really required here: versions for virt-manager, virtinst,
> libvirt, and qemu or xen depending on what you are using. If you can
> provide the output of virt-manager --debug when reproducing this series
> of events it would help track down the issue.

libvirt-bin 0.8.2-1 
virt-manager 0.8.4-7
virtinst 0.500.3-2

qemu 0.12.5
qemu-kvm 0.12.4+
linux 2.6.34.1

I've attached a log of the --debug output of virt-manager for a session 
where I start it up, it connects to two of my servers (boris, kvm based, the 
one that likes to not set memory properly, and snidely xen based that we'll 
ignore for now)

After I kill the vm in that log you'll see I try to set the memory again, 
and restart the vm, but this time it just didn't start. it said it was 
running, but virt-manager didn't want to connect to the console and the 
stats for it were stuck, all I could do was "force off" again.

Actually I'm confused as to why the xen one isn't reading disk usage 
properly. Maybe it doesn't like that the xen setup is LVM backed rather than 
file backed? But then the kvm instance is lvm backed too and that works fine.

> Thanks,
> Cole

Thanks

-- 
Thomas Fjellstrom
tfjellstrom shaw ca
** Message: pygobject_register_sinkfunc is deprecated (GtkWindow)
** Message: pygobject_register_sinkfunc is deprecated (GtkInvisible)
** Message: pygobject_register_sinkfunc is deprecated (GtkObject)
RuntimeWarning: tp_compare didn't return -1 or -2 for exception
2010-08-09 22:56:31,398 (virt-manager:161): Application startup
2010-08-09 22:56:31,551 (keyring:31): No support for gnome-keyring
2010-08-09 22:56:31,614 (engine:338): About to connect to uris ['xen+tcp://snidely.tomasu.org/', 'qemu+tcp://boris/system']
2010-08-09 22:56:31,878 (engine:628): window counter incremented to 1
2010-08-09 22:56:32,320 (connection:836): Scheduling background open thread for xen+tcp://snidely.tomasu.org/
2010-08-09 22:56:32,320 (connection:981): Background thread is running
2010-08-09 22:56:32,325 (connection:836): Scheduling background open thread for qemu+tcp://boris/system
2010-08-09 22:56:32,359 (connection:981): Background thread is running
2010-08-09 22:56:32,470 (connection:1019): Background open thread complete, scheduling notify
2010-08-09 22:56:34,444 (engine:413): Tick is slow, not running at requested rate.
2010-08-09 22:56:34,543 (connection:1024): Notifying open result
2010-08-09 22:56:35,930 (connection:1032): qemu+tcp://boris/system capabilities:
<capabilities>

  <host>
    <uuid>30303234-3144-3138-4638-4232ffffffff</uuid>
    <cpu>
      <arch>x86_64</arch>
      <model>phenom</model>
      <topology sockets='1' cores='4' threads='1'/>
      <feature name='wdt'/>
      <feature name='skinit'/>
      <feature name='osvw'/>
      <feature name='3dnowprefetch'/>
      <feature name='misalignsse'/>
      <feature name='sse4a'/>
      <feature name='abm'/>
      <feature name='cr8legacy'/>
      <feature name='extapic'/>
      <feature name='cmp_legacy'/>
      <feature name='lahf_lm'/>
      <feature name='rdtscp'/>
      <feature name='pdpe1gb'/>
      <feature name='popcnt'/>
      <feature name='cx16'/>
      <feature name='ht'/>
      <feature name='vme'/>
    </cpu>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>tcp</uri_transport>
      </uri_transports>
    </migration_features>
  </host>

  <guest>
    <os_type>hvm</os_type>
    <arch name='i686'>
      <wordsize>32</wordsize>
      <emulator>/usr/bin/qemu</emulator>
      <machine>pc-0.12</machine>
      <machine canonical='pc-0.12'>pc</machine>
      <machine>pc-0.11</machine>
      <machine>pc-0.10</machine>
      <machine>isapc</machine>
      <domain type='qemu'>
      </domain>
      <domain type='kvm'>
        <emulator>/usr/bin/kvm</emulator>
        <machine>pc-0.12</machine>
        <machine canonical='pc-0.12'>pc</machine>
        <machine>pc-0.11</machine>
        <machine>pc-0.10</machine>
        <machine>isapc</machine>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <pae/>
      <nonpae/>
      <acpi default='on' toggle='yes'/>
      <apic default='on' toggle='no'/>
    </features>
  </guest>

  <guest>
    <os_type>hvm</os_type>
    <arch name='x86_64'>
      <wordsize>64</wordsize>
      <emulator>/usr/bin/qemu-system-x86_64</emulator>
      <machine>pc-0.12</machine>
      <machine canonical='pc-0.12'>pc</machine>
      <machine>pc-0.11</machine>
      <machine>pc-0.10</machine>
      <machine>isapc</machine>
      <domain type='qemu'>
      </domain>
      <domain type='kvm'>
        <emulator>/usr/bin/kvm</emulator>
        <machine>pc-0.12</machine>
        <machine canonical='pc-0.12'>pc</machine>
        <machine>pc-0.11</machine>
        <machine>pc-0.10</machine>
        <machine>isapc</machine>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <acpi default='on' toggle='yes'/>
      <apic default='on' toggle='no'/>
    </features>
  </guest>

  <guest>
    <os_type>hvm</os_type>
    <arch name='arm'>
      <wordsize>32</wordsize>
      <emulator>/usr/bin/qemu-system-arm</emulator>
      <machine>integratorcp</machine>
      <machine>syborg</machine>
      <machine>musicpal</machine>
      <machine>mainstone</machine>
      <machine>n800</machine>
      <machine>n810</machine>
      <machine>cheetah</machine>
      <machine>sx1</machine>
      <machine>sx1-v1</machine>
      <machine>tosa</machine>
      <machine>akita</machine>
      <machine>spitz</machine>
      <machine>borzoi</machine>
      <machine>terrier</machine>
      <machine>connex</machine>
      <machine>verdex</machine>
      <machine>lm3s811evb</machine>
      <machine>lm3s6965evb</machine>
      <machine>realview-eb</machine>
      <machine>realview-eb-mpcore</machine>
      <machine>realview-pb-a8</machine>
      <machine>realview-pbx-a9</machine>
      <machine>versatilepb</machine>
      <machine>versatileab</machine>
      <domain type='qemu'>
      </domain>
    </arch>
  </guest>

  <guest>
    <os_type>hvm</os_type>
    <arch name='mips'>
      <wordsize>32</wordsize>
      <emulator>/usr/bin/qemu-system-mips</emulator>
      <machine>malta</machine>
      <machine>mipssim</machine>
      <machine>magnum</machine>
      <machine>pica61</machine>
      <machine>mips</machine>
      <domain type='qemu'>
      </domain>
    </arch>
  </guest>

  <guest>
    <os_type>hvm</os_type>
    <arch name='mipsel'>
      <wordsize>32</wordsize>
      <emulator>/usr/bin/qemu-system-mipsel</emulator>
      <machine>malta</machine>
      <machine>mipssim</machine>
      <machine>magnum</machine>
      <machine>pica61</machine>
      <machine>mips</machine>
      <domain type='qemu'>
      </domain>
    </arch>
  </guest>

  <guest>
    <os_type>hvm</os_type>
    <arch name='sparc'>
      <wordsize>32</wordsize>
      <emulator>/usr/bin/qemu-system-sparc</emulator>
      <machine>SS-5</machine>
      <machine>SS-10</machine>
      <machine>SS-600MP</machine>
      <machine>SS-20</machine>
      <machine>Voyager</machine>
      <machine>LX</machine>
      <machine>SS-4</machine>
      <machine>SPARCClassic</machine>
      <machine>SPARCbook</machine>
      <machine>SS-1000</machine>
      <machine>SS-2000</machine>
      <machine>SS-2</machine>
      <domain type='qemu'>
      </domain>
    </arch>
  </guest>

  <guest>
    <os_type>hvm</os_type>
    <arch name='ppc'>
      <wordsize>32</wordsize>
      <emulator>/usr/bin/qemu-system-ppc</emulator>
      <machine>g3beige</machine>
      <machine>mpc8544ds</machine>
      <machine>bamboo</machine>
      <machine>ref405ep</machine>
      <machine>taihu</machine>
      <machine>mac99</machine>
      <machine>prep</machine>
      <domain type='qemu'>
      </domain>
    </arch>
  </guest>

</capabilities>

2010-08-09 22:56:35,933 (connection:1211): Connection doesn't seem to support interface APIs. Skipping all interface polling.
2010-08-09 22:56:36,413 (connection:209): Libvirt version does not support physical interface listing
2010-08-09 22:56:36,415 (connection:251): Using libvirt API for mediadev enumeration
2010-08-09 22:56:36,438 (manager:801): VM svn started
2010-08-09 22:56:36,439 (manager:801): VM nginx started
2010-08-09 22:56:36,439 (manager:801): VM awiki started
2010-08-09 22:56:36,439 (manager:801): VM pfsense started
2010-08-09 22:56:36,439 (manager:801): VM pfsense2 started
2010-08-09 22:56:36,440 (manager:801): VM asterisk started
2010-08-09 22:56:36,442 (manager:801): VM svn started
2010-08-09 22:56:36,442 (manager:801): VM nginx started
2010-08-09 22:56:36,442 (manager:801): VM awiki started
2010-08-09 22:56:36,442 (manager:801): VM pfsense started
2010-08-09 22:56:36,442 (manager:801): VM pfsense2 started
2010-08-09 22:56:36,443 (manager:801): VM asterisk started
2010-08-09 22:56:41,483 (connection:1019): Background open thread complete, scheduling notify
2010-08-09 22:56:41,504 (connection:1024): Notifying open result
2010-08-09 22:56:43,508 (connection:1032): xen+tcp://snidely.tomasu.org/ capabilities:
<capabilities>

  <host>
    <cpu>
      <arch>x86_64</arch>
      <features>
        <pae/>
      </features>
    </cpu>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>xenmigr</uri_transport>
      </uri_transports>
    </migration_features>
    <topology>
      <cells num='1'>
        <cell id='0'>
          <cpus num='2'>
            <cpu id='0'/>
            <cpu id='1'/>
          </cpus>
        </cell>
      </cells>
    </topology>
  </host>

  <guest>
    <os_type>xen</os_type>
    <arch name='x86_64'>
      <wordsize>64</wordsize>
      <emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
      <machine>xenpv</machine>
      <domain type='xen'>
      </domain>
    </arch>
  </guest>

  <guest>
    <os_type>xen</os_type>
    <arch name='i686'>
      <wordsize>32</wordsize>
      <emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
      <machine>xenpv</machine>
      <domain type='xen'>
      </domain>
    </arch>
    <features>
      <pae/>
    </features>
  </guest>

</capabilities>

2010-08-09 22:56:48,092 (connection:1211): Connection doesn't seem to support interface APIs. Skipping all interface polling.
2010-08-09 22:56:58,095 (domain:957): Error reading disk stats for 'samuel1' dev 'xvda2': internal error read_bd_stats: Failed to read any block statistics
2010-08-09 22:56:58,095 (domain:958): Adding xvda2 to skip list.
2010-08-09 22:56:58,151 (domain:957): Error reading disk stats for 'samuel1' dev 'xvda1': internal error read_bd_stats: Failed to read any block statistics
2010-08-09 22:56:58,151 (domain:958): Adding xvda1 to skip list.
2010-08-09 22:56:58,505 (domain:957): Error reading disk stats for 'shared-mail' dev 'xvda2': internal error read_bd_stats: Failed to read any block statistics
2010-08-09 22:56:58,505 (domain:958): Adding xvda2 to skip list.
2010-08-09 22:56:58,560 (domain:957): Error reading disk stats for 'shared-mail' dev 'xvda1': internal error read_bd_stats: Failed to read any block statistics
2010-08-09 22:56:58,560 (domain:958): Adding xvda1 to skip list.
2010-08-09 22:56:58,913 (domain:957): Error reading disk stats for 'bamccaig1' dev 'xvda': internal error read_bd_stats: Failed to read any block statistics
2010-08-09 22:56:58,914 (domain:958): Adding xvda to skip list.
2010-08-09 22:56:58,970 (domain:957): Error reading disk stats for 'bamccaig1' dev 'xvdb': internal error read_bd_stats: Failed to read any block statistics
2010-08-09 22:56:58,971 (domain:958): Adding xvdb to skip list.
2010-08-09 22:56:59,342 (domain:957): Error reading disk stats for 'firewall' dev 'xvda2': internal error read_bd_stats: Failed to read any block statistics
2010-08-09 22:56:59,343 (domain:958): Adding xvda2 to skip list.
2010-08-09 22:56:59,399 (domain:957): Error reading disk stats for 'firewall' dev 'xvda1': internal error read_bd_stats: Failed to read any block statistics
2010-08-09 22:56:59,400 (domain:958): Adding xvda1 to skip list.
2010-08-09 22:56:59,866 (domain:957): Error reading disk stats for 'shared-web' dev 'xvda2': internal error read_bd_stats: Failed to read any block statistics
2010-08-09 22:56:59,867 (domain:958): Adding xvda2 to skip list.
2010-08-09 22:56:59,922 (domain:957): Error reading disk stats for 'shared-web' dev 'xvda1': internal error read_bd_stats: Failed to read any block statistics
2010-08-09 22:56:59,922 (domain:958): Adding xvda1 to skip list.
2010-08-09 22:57:00,444 (domain:957): Error reading disk stats for 'elias1' dev 'xvda': internal error read_bd_stats: Failed to read any block statistics
2010-08-09 22:57:00,445 (domain:958): Adding xvda to skip list.
2010-08-09 22:57:00,501 (domain:957): Error reading disk stats for 'elias1' dev 'xvdb': internal error read_bd_stats: Failed to read any block statistics
2010-08-09 22:57:00,501 (domain:958): Adding xvdb to skip list.
2010-08-09 22:57:00,852 (domain:957): Error reading disk stats for 'shared-mysql' dev 'xvda2': internal error read_bd_stats: Failed to read any block statistics
2010-08-09 22:57:00,853 (domain:958): Adding xvda2 to skip list.
2010-08-09 22:57:00,907 (domain:957): Error reading disk stats for 'shared-mysql' dev 'xvda1': internal error read_bd_stats: Failed to read any block statistics
2010-08-09 22:57:00,907 (domain:958): Adding xvda1 to skip list.
2010-08-09 22:57:01,121 (connection:209): Libvirt version does not support physical interface listing
2010-08-09 22:57:01,122 (connection:251): Using libvirt API for mediadev enumeration
2010-08-09 22:57:01,141 (manager:801): VM Domain-0 started
2010-08-09 22:57:01,141 (manager:801): VM samuel1 started
2010-08-09 22:57:01,142 (manager:801): VM shared-mysql started
2010-08-09 22:57:01,142 (manager:801): VM shared-web started
2010-08-09 22:57:01,142 (manager:801): VM elias1 started
2010-08-09 22:57:01,142 (manager:801): VM firewall started
2010-08-09 22:57:01,142 (manager:801): VM shared-mail started
2010-08-09 22:57:01,143 (manager:801): VM bamccaig1 started
2010-08-09 22:57:26,425 (engine:628): window counter incremented to 2
2010-08-09 22:57:40,166 (virt-manager:173): Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/util.py", line 340, in _safe_wrapper
    return func(*args)
  File "/usr/share/virt-manager/virtManager/mediadev.py", line 151, in _poll_for_media
    if not self.nodedev_obj:
  File "/usr/lib/pymodules/python2.6/gtk-2.0/gi/__init__.py", line 27, in <module>
    from gi.repository import GObject
ImportError: cannot import name GObject
None
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/util.py", line 340, in _safe_wrapper
    return func(*args)
  File "/usr/share/virt-manager/virtManager/mediadev.py", line 151, in _poll_for_media
    if not self.nodedev_obj:
  File "/usr/lib/pymodules/python2.6/gtk-2.0/gi/__init__.py", line 27, in <module>
    from gi.repository import GObject
ImportError: cannot import name GObject
2010-08-09 22:57:40,205 (engine:806): Starting vm 'test1'.
2010-08-09 22:57:41,328 (manager:801): VM test1 started
2010-08-09 22:57:41,377 (console:640): Starting connect process for vnc://boris:5906: boris 5906
2010-08-09 22:57:41,464 (console:474): VNC initialized
2010-08-09 22:58:12,862 (domain:1594): Hotplugging curmem=524288 maxmem=524288 for VM 'test1'
2010-08-09 22:58:12,869 (libvirtobject:150): Redefining 'test1' with XML diff:
--- Original XML 
+++ New XML 
@@ -3,7 +3,7 @@
   <name>test1</name>
   <uuid>96f4546f-4f75-deb2-5d1d-977d4ab79ce7</uuid>
   <memory>524288</memory>
-  <currentMemory>261120</currentMemory>
+  <currentMemory>524288</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch="x86_64" machine="pc-0.12">hvm</type>

/usr/lib/python2.6/threading.py:810: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
  return _active[_get_ident()]
2010-08-09 22:58:20,732 (virt-manager:173): Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/engine.py", line 418, in tick
    target=self._tick, args=())
  File "/usr/lib/python2.6/threading.py", line 436, in __init__
    self.__daemonic = self._set_daemon()
  File "/usr/lib/python2.6/threading.py", line 448, in _set_daemon
    return current_thread().daemon
  File "/usr/lib/python2.6/threading.py", line 810, in currentThread
    return _active[_get_ident()]
  File "/usr/lib/pymodules/python2.6/gtk-2.0/gi/__init__.py", line 27, in <module>
    from gi.repository import GObject
ImportError: cannot import name GObject
None
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/engine.py", line 418, in tick
    target=self._tick, args=())
  File "/usr/lib/python2.6/threading.py", line 436, in __init__
    self.__daemonic = self._set_daemon()
  File "/usr/lib/python2.6/threading.py", line 448, in _set_daemon
    return current_thread().daemon
  File "/usr/lib/python2.6/threading.py", line 810, in currentThread
    return _active[_get_ident()]
  File "/usr/lib/pymodules/python2.6/gtk-2.0/gi/__init__.py", line 27, in <module>
    from gi.repository import GObject
ImportError: cannot import name GObject
2010-08-09 22:58:37,184 (engine:760): Destroying vm 'test1'.
2010-08-09 22:58:37,223 (console:456): VNC disconnected
2010-08-09 22:58:48,277 (libvirtobject:150): Redefining 'test1' with XML diff:
--- Original XML 
+++ New XML 
@@ -3,7 +3,7 @@
   <name>test1</name>
   <uuid>96f4546f-4f75-deb2-5d1d-977d4ab79ce7</uuid>
   <memory>524288</memory>
-  <currentMemory>524288</currentMemory>
+  <currentMemory>262144</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch="x86_64" machine="pc-0.12">hvm</type>

2010-08-09 22:59:01,702 (engine:806): Starting vm 'test1'.
2010-08-09 22:59:29,529 (engine:760): Destroying vm 'test1'.
2010-08-09 22:59:32,479 (engine:632): window counter decremented to 1
2010-08-09 22:59:38,879 (engine:628): window counter incremented to 2
2010-08-09 22:59:52,414 (engine:632): window counter decremented to 1
2010-08-09 23:00:16,999 (engine:632): window counter decremented to 0
2010-08-09 23:00:51,623 (engine:641): Exiting app normally.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]