This really needs to be changed to pass through gettext, eg
error(dom-conn, VIR_ERR_INTERNAL_ERROR,
_(Could not exec %s), VZCTL);
NB, we have to use a %s format string when going via gettext rather than
just allowing the preprocessor to do string concatenation for us.
Ok, it need.
I realize you are just following the existing pattern used in OpenVZ
driver, but this piece of code is horrible.
sprintf'ing into a string, then parsing that string and turning it back
into a list of argv[] strings, with no escaping of special characters,
or quoting. eg if the vm name had a
function error() was renamed to openvzError() to don't conflict with
other functions with the same name.
other
- openvzError() is added to msg_gen_function
- fixed to pass make syntax-check
Thanks to Jim Meyering for review.
Index: src/openvz_conf.c
for (i = 0; i virNetworkDriverTabCount; i++) {
if ((virDriverTab[i]-probe != NULL)
((latest = virDriverTab[i]-probe()) != NULL)) {
probes++;
.
}
}
We use array virDriverTab, but cicle is to
There were 3 places with the same code.
I moved it to separate function.
other:
use O_RDONLY to read config file
Index: src/openvz_conf.c
===
RCS file: /data/cvs/libvirt/src/openvz_conf.c,v
retrieving revision 1.28
diff -u -a -r1.28
I specified default URI in probe().
To use libvirt with OpenVZ:
# ./configure --with-openvz
# make
# ./src/virsh list
Id Name State
--
33 33 running
105 105 running
108 108 running
Index:
Patch improve code which execute external OpenVZ tools.
? src/test.xml
Index: src/openvz_driver.c
===
RCS file: /data/cvs/libvirt/src/openvz_driver.c,v
retrieving revision 1.28
diff -u -p -r1.28 openvz_driver.c
---
Patch improve code which execute external OpenVZ tools.
+/* generate arguments to create OpenVZ container
+ return -1 - error
+ 0 - OK
+*/
+static int openvzDomainDefineCmd(const char *args[], int maxarg, struct
openvz_vm_def *vmdef)
Rather than passing in the pre-allocated
There was error every time when I undefine stoped container
no domain with matching id.
Bug arrise due to stoped container has ID = -1.
In such case container will be searched by name.
other:
use VIR_ERR_NO_DOMAIN when domain is not found
Index: src/openvz_driver.c
Daniel Veillard пишет:
On Wed, Jul 16, 2008 at 08:10:21PM +0100, Daniel P. Berrange wrote:
Yes, the documentation is wrong - all inactive VMs have an ID
of -1, and thus lookup-by-ID is nonsensical for inactive VMs.
If any application did make use of this change which falls back to
OpenVZ calculate statistics and allow to get them .
Added function for getting cpu usage of container.
Index: src/openvz_driver.c
===
RCS file: /data/cvs/libvirt/src/openvz_driver.c,v
retrieving revision 1.31
diff -u -p -r1.31
On Thu, Jul 17, 2008 at 03:04:46PM +0400, Evgeniy Sokolov wrote:
OpenVZ calculate statistics and allow to get them .
Added function for getting cpu usage of container.
Modular some minor comments, ACK for this patch.
+if (!openvzIsActiveVM(vm)) {
+info-cpuTime = 0;
+} else
There were several places with parsing container id from code.
Separate function is used now.
Index: src/openvz_conf.c
===
RCS file: /data/cvs/libvirt/src/openvz_conf.c,v
retrieving revision 1.29
diff -u -p -r1.29 openvz_conf.c
---
I am often catching error related with that stoped VM has ID = -1.
1. If I create/define VM with existing ID of stoped VM. Creation failed,
but error message is wrong. Detection is fixed.
2. Dominfo command may show info about some another VM. And report error
that can't get autostart state.
On Fri, Jul 18, 2008 at 07:16:25PM +0100, Daniel P. Berrange wrote:
On Fri, Jul 18, 2008 at 06:02:00PM +0400, Evgeniy Sokolov wrote:
There were several places with parsing container id from code.
Separate function is used now.
Index: src/openvz_conf.c
On Mon, Jul 21, 2008 at 01:41:27PM +0400, Evgeniy Sokolov wrote:
On Fri, Jul 18, 2008 at 07:16:25PM +0100, Daniel P. Berrange wrote:
Right, let's reuse it, but I notice we are using strtol() in a lot of
places ...openvz driver is not the worse here especially since it has
already
Hello!
I made review of domain XML format for driver in libvirt.
And I have several questions and additions.
For tag domain:
need to add vmid or id - currenly tag name is used for ID.
OpenVZ has mandatory parameter ID, but it also support optional
parameter name, which is not implemented for
On Tue, Jul 22, 2008 at 05:21:41PM +0400, Evgeniy Sokolov wrote:
Hello!
Hi Evgeniy
I made review of domain XML format for driver in libvirt.
And I have several questions and additions.
For tag domain:
need to add vmid or id - currenly tag name is used for ID.
OpenVZ has mandatory
On Tue, Jul 22, 2008 at 08:41:36PM +0400, Evgeniy Sokolov wrote:
For tag domain/os:
need to add ostemplate
desirable config
Can you explain exactly what the semantics of the two desired attributes
are used for ?
config is name of sample config for container. It contains many
parameters
Patch switch OpenVZ XML format to generic.
main changes:
- I used generic virDomainNetDef to define network in container.
And wrote function to apply virDomainNetDef for container.
Method virDomainNetDefParseXML is public now.
- tag container is changed to devices
- changed format of tag
On Fri, Jul 25, 2008 at 04:44:09PM +0400, Evgeniy Sokolov wrote:
Patch switch OpenVZ XML format to generic.
main changes:
- I used generic virDomainNetDef to define network in container.
And wrote function to apply virDomainNetDef for container.
Method virDomainNetDefParseXML is public now
Daniel P. Berrange пишет:
eg to use a template called 'fedora9web' as the root filesystem for
a container
filesystem type='template'
source name='fedora9web'/
target dir='/'/
/filesystem
Daniel,
OpenVZ also require quota tags
quota type=size
Hi,
There was bug.
UUID defined in XML or generated during define/create was not saved to
config. Then it was regenerated in virDrvStateInitialize.
Attached patch fix bug.
Index: src/openvz_conf.c
===
RCS file:
On Tue, Aug 05, 2008 at 09:04:34PM +0400, Evgeniy V. Sokolov wrote:
This is a long overdue followup to my previous set of patches to make the
LXC driver use the new domain XML apis. Getting this merged is a blocker
for the new libvirt release, now we've turned on LXC by default. Likewise
we
OpenVZ has several parameters for memory management. All of them can be
configured independetly.
Patch allow to get configuration of memory from container config and
then calculate total usage of memory.
It is open question how to manage memory?
Index: src/openvz_conf.c
OpenVZ containers use all CPUs available in system by default.
Limitations may be caused only by Linux kernel limitation.
There is way to artificially limit number of CPUs.
patch add cpu management functionality to OpenVZ driver.
Index: openvz_conf.c
On Thu, Aug 14, 2008 at 06:08:31PM +0400, Evgeniy Sokolov wrote:
On Wed, Aug 13, 2008 at 12:50:33PM +0400, Evgeniy Sokolov wrote:
OpenVZ has several parameters for memory management. All of them can be
configured independetly.
Summing all the different memory limits together is wrong
On Fri, Sep 05, 2008 at 05:40:16PM +0200, Jim Meyering wrote:
Daniel P. Berrange [EMAIL PROTECTED] wrote:
Jim pointed out some places where the openvz driver could deference some
NULs, so this patch fixes them
...
Index: src/openvz_driver.c
On Mon, Sep 08, 2008 at 03:59:55PM +0400, Evgeniy Sokolov wrote:
This patch add possibility to load network configuration for container
in OpenVZ driver.
It support routing network and bridge devices. This types is currently
supported in create/define command.
Also, patch contain fix
On Thu, Sep 11, 2008 at 04:50:53PM +0400, Evgeniy Sokolov wrote:
There was segmentation failt in openvz driver during 'create' command
if domain with same id exist.
Segfault was because of using structure (print warning with name of
container) which is free.
Hi Evgeniy, I notice
On Mon, Sep 08, 2008 at 03:59:55PM +0400, Evgeniy Sokolov wrote:
This patch add possibility to load network configuration for container
in OpenVZ driver.
It support routing network and bridge devices. This types is currently
supported in create/define command.
Also, patch contain fix
On Wed, Sep 17, 2008 at 08:28:56PM +0400, Evgeniy Sokolov wrote:
I attached patch without hunk which was commited by Daniel.
Please commit if you are agree with it.
A few comments inline..
So you're not artifically restricting the max length of the
network name.
It is limit
2008/9/19 Evgeniy Sokolov [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Hello.
To start with, I have the following questions:
Does libvirt support the xml format for openvz driver described
in the next thread?
http://www.redhat.com/archives/libvir-list
Hi, Evgeniy
interface type='bridge'
source bridge='eth10'/
/interface
interface type='ethernet'
mac address='00:16:3e:34:21:9e'/
ip
2008/9/29 Evgeniy V. Sokolov [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
This behaviour contradicts with description found in docs
(in which
source tag specify interface in host, not in
container). I think,
the previous bridge must be
Hi.
I rewrite functions taken from vzctl in the new patch, so this:
Here is the patch, that implements the following behaviour
* interface name inside container is automatically generated and
equals ethN,
where N is the number of that interface within
P.S. Now I am working on that:
P.S. Are someone going to implement
interface type='bridge'
...
source bridge=...
...
/interface
part of openvz driver? :)
I plan to implement it in a month.
It
I done the following:
- Add function openvzAppendConfigParam(veid, param, value)
This function simply appends a string `param=value` to config file.
- Rewrite functions openvz{Get,Set}DefinedBridge to use that function
Patch looks good now.
I think, we need to rewrite {Get,Set}UUID
This implements support for bridge configs in openvz following the rules
set out in
http://wiki.openvz.org/Virtual_Ethernet_device#Making_a_bridged_veth-device_persistent
This simply requires that the admin has created /etc/vz/vznetctl.conf
containing
#!/bin/bash
Sorry for delay.
Big thanks for docs!
This is an update of the patch
http://www.redhat.com/archives/libvir-list/2008-October/msg00326.html
To enable bridge support in the OpenVZ driver. As well as the fixes
suggested last time, it includes an initial bit of HTML doc for the
openvz driver,
OpenVZ uses all CPUs available in system
- by default (number of CPUs did not set)
- number of CPUs = 0
Currenty, libvirt don't allow to set nvcpus = 0.
Attached patch removes limitation in libvirt set nvcpu = 0, but add it
to each driver which allow to set number of virtual CPU. For OpenVZ
On Mon, Nov 17, 2008 at 06:44:07PM +0300, Evgeniy Sokolov wrote:
OpenVZ uses all CPUs available in system
- by default (number of CPUs did not set)
- number of CPUs = 0
Currenty, libvirt don't allow to set nvcpus = 0
Attached patch removes limitation in libvirt set nvcpu = 0, but add
Hi,
attached patch fix problem.
Guys,
is it really an issue to fix also mac generation for OpenVZ? Vzctl
generates different macs for host's and domain's eth devices. Libvirt creates
them with equal macs.
In this case there is a bridge support for OpenVZ in libvirt but it
Hi Florian,
Hi everyone,
This patch is to allow using the mount type in the filesystem tag
for OpenVZ domains.
Example:
...
filesystem type='mount'
source dir='/path/to/filesystem/directory/' /
target dir='/path/to/pivot/root/' /
/filesystem
...
This is my first patch
Hi Evgeniy,
really, default config is specified in /etc/sysconfig/vz
# grep -R CONFIGFILE /etc/sysconfig/vz
CONFIGFILE=vps.basic
config file is calculating by
snprintf(path, sizeof(path), VPS_CONF_DIR ve-%s.conf-sample,
config);
Actually, vz.conf is in /etc/vz/ on my machine
Hi Anton,
I'm sorry for delay. I was on vacation.
Hi all.
When libvirt creates an OpenVZ machine, it does smth like
# vzctl create $ctid --ostemplate `ostemplate`
And we can't specify an --config `config` argument. In this case vzctl
chooses
a default config file (a value of CONFIG
2009/4/2 Daniel P. Berrange berra...@redhat.com
mailto:berra...@redhat.com
On Thu, Apr 02, 2009 at 06:36:15PM +0400, Evgeniy Sokolov wrote:
Config /etc/vz/conf/ve-XXX.conf-sample define there are many
parameters
like memory, CPU etc. This parameters
47 matches
Mail list logo