Bug 683851 - RFE: openvz: fill in memory/currentMemory for existing VM
Summary: RFE: openvz: fill in memory/currentMemory for existing VM
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-10 13:56 UTC by knawnd
Modified: 2020-11-03 16:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-03 16:31:26 UTC
Embargoed:


Attachments (Terms of Use)

Description knawnd 2011-03-10 13:56:57 UTC
'virsh dominfo <VMID>' as well as 'virsh dumpxml <VMID>' returns 0 for Total (max) and Used (current) memory.

$ cat ovz.xml.4
<domain type='openvz' id='144'>
  <name>144</name>
  <vcpu>1</vcpu>
  <memory>524288</memory>
  <os>
    <type>exe</type>
    <init>/sbin/init</init>
  </os>
  <devices>
    <filesystem type='template'>
      <source name='centos-5-x86'/>
      <target dir='/'/>
    </filesystem>
    <interface type='bridge'>
      <source bridge='br0'/>
    </interface>
  </devices>
</domain>

$ virsh create ovz.xml.4

$ virsh dominfo 144
Id:             144
Name:           144
UUID:           fb213571-5674-f9d9-f3a3-3e13d23f350b
OS Type:        exe
State:          running
CPU(s):         1
CPU time:       44.5s
Max memory:     0 kB
Used memory:    0 kB
Persistent:     yes
Autostart:      enable

$ virsh dumpxml 144
<domain type='qemu' id='144'>              
  <name>144</name>                         
  <uuid>fb213571-5674-f9d9-f3a3-3e13d23f350b</uuid>
  <memory>0</memory>                               
  <currentMemory>0</currentMemory>                 
  <vcpu>1</vcpu>                                   
  <os>                                             
    <type>exe</type>                               
    <init>/sbin/init</init>                        
  </os>                                            
  <clock offset='utc'/>                            
  <on_poweroff>destroy</on_poweroff>               
  <on_reboot>destroy</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <filesystem type='template' accessmode='passthrough'>
      <source name='centos-5-x86'/>
      <target dir='/'/>
    </filesystem>
  </devices>
</domain>

Generated openvz config file:
ONBOOT="yes"

# UBC parameters (in form of barrier:limit)
KMEMSIZE="14372700:14790164"
LOCKEDPAGES="2048:2048"
PRIVVMPAGES="65536:69632"
SHMPAGES="21504:21504"
NUMPROC="240:240"
PHYSPAGES="0:unlimited"
VMGUARPAGES="33792:unlimited"
OOMGUARPAGES="26112:unlimited"
NUMTCPSOCK="360:360"
NUMFLOCK="188:206"
NUMPTY="16:16"
NUMSIGINFO="256:256"
TCPSNDBUF="1720320:2703360"
TCPRCVBUF="1720320:2703360"
OTHERSOCKBUF="1126080:2097152"
DGRAMRCVBUF="262144:262144"
NUMOTHERSOCK="360:360"
DCACHESIZE="3409920:3624960"
NUMFILE="9312:9312"
AVNUMPROC="180:180"
NUMIPTENT="128:128"

# Disk quota parameters (in form of softlimit:hardlimit)
DISKSPACE="1048576:1153024"
DISKINODES="200000:220000"
QUOTATIME="0"

# CPU fair scheduler parameter
CPUUNITS="1000"

#UUID: fb213571-5674-f9d9-f3a3-3e13d23f350b
VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="/vz/private/$VEID"
OSTEMPLATE="centos-5-x86"
ORIGIN_SAMPLE="basic"
NAME="144"
NETIF="ifname=br0,bridge=br0,mac=52:54:00:1B:49:2F,host_ifname=veth144.0,host_mac=52:54:00:66:E2:E8"
CPUS="1"

$ vzcalc -v 144
Resource     Current(%)  Promised(%)  Max(%)
Low Mem          0.29       6.16       6.16
Total RAM        0.44        n/a        n/a
Mem + Swap       0.14       2.02        n/a
Alloc. Mem       0.23       2.52       4.81
Num. Proc        0.04        n/a       0.74
--------------------------------------------
Memory           0.44       6.16       6.16

software used:
ovzkernel release is 2.6.18-194.26.1.el5.028stab081.1,
vzctl-3.0.26-1,
OS is CentOS 5.5,
libvirt/virsh version is 0.8.8.

I set a severity for that bug to 'urgent' since it makes impossible to track host resource utilization by libvirt/virsh means.

Comment 1 tetyys 2014-07-20 15:15:24 UTC
The bug is from 2011, but still not fixed, I'm also experiencing this.

virsh # version
Compiled against library: libvirt 1.2.6
Using library: libvirt 1.2.6
Using API: OpenVZ 1.2.6
Running hypervisor: OpenVZ 4.0.0

root@dom:~# uaname -a
Linux dom 2.6.32-26-pve #1 SMP Mon Oct 14 08:22:20 CEST 2013 x86_64 GNU/Linux

root@dom:~# cat /etc/debian_version
7.4

Comment 2 Cole Robinson 2016-03-23 12:15:43 UTC
Still relevant with latest libvirt. Place to add this info is probably src/openvz/openvz_conf.c:openvzReadMemConf . The more interesting part is probably figuring out what openvz values to report, and what <memory> and <currentMemory> should be mapped to when a user manually sets them.

Comment 3 Daniel Berrangé 2020-11-03 16:31:26 UTC
Thank you for reporting this issue to the libvirt project. Unfortunately we have been unable to resolve this issue due to insufficient maintainer capacity and it will now be closed. This is not a reflection on the possible validity of the issue, merely the lack of resources to investigate and address it, for which we apologise. If you none the less feel the issue is still important, you may choose to report it again at the new project issue tracker https://gitlab.com/libvirt/libvirt/-/issues The project also welcomes contribution from anyone who believes they can provide a solution.


Note You need to log in before you can comment on or make changes to this bug.