[libvirt-users] How to achieve higher priority of a process in a lxc on CentOS machine

2017-02-09 Thread WANG Cheng D
Dear all, I use libvirt lxc to host a real-time application with priority of -50. The native OS is fedora21 and lxc is also fedora21. Everything works fine. Linux "top" command shows the priority is -50). Then I use Openstack to manage lxc. The native compute node OS is CentOS7.2. and the lxc

[libvirt-users] How to pin an libvirt lxc to a specific physical CPU core in openstack?

2017-02-03 Thread WANG Cheng D
Dear all, In my applications, the real-time performance is very important, so I used 4 containers, with only one application running in each container and a physical CPU core is only dedicated to one lxc. and I must know which container is hosted by which CPU core. That is, I need to pin a

[libvirt-users] how to create container image for an existing container

2016-12-21 Thread WANG Cheng D
Dear all, I installed 8 containers using "yum --installroot=/root/fedora16lxc" to create the container filesystem. Now I want to manage these containers with openstack. So I need to deploy these containers by openstack which needs the container image. Can anyone tell me how to export my

[libvirt-users] How can openstack retrieve the CPU usage of a lxc via libvirt?

2016-12-06 Thread WANG Cheng D
Dear all, I want to have a view of lxc CPU usage in openstack Dashboard. According the Openstack official site , Openstack Ceilometer can poll libvirt daemon to obtain CPU usage of a virtual machine. I tried the command locally on the libvirtd host "virsh -c lxc:/// domjobinfo", I got an error

Re: [libvirt-users] Installation of libvirt on Ubuntu

2015-03-27 Thread WANG Cheng D
container, whether I also can share memory between Ubuntu containers? From: Dominique Ramaekers [mailto:dominique.ramaek...@cometal.be] Sent: 2015年3月27日 14:47 To: WANG Cheng D; libvirt-users@redhat.com Subject: RE: [libvirt-users] Installation of libvirt on Ubuntu Libvirt is in the standard

[libvirt-users] Installation of libvirt on Ubuntu

2015-03-26 Thread WANG Cheng D
Dear all, I wonder if libvirt can work on Ubuntu. As you know, it is very convenient to install libvirt on Fedora. I can download the libvirt packet from libvirt.org and install it using command ./configure, make and make install. As I am going to install an open source simulation system

[libvirt-users] why CPU pinning doesn't take effect when using lxc-enter-namespace to run an application

2014-12-22 Thread WANG Cheng D
Dear all, I want my container to run on the third CPU core and I define this by the following xml scrpits: vcpu placement=static cpuset=31/vcpu When I run my application in a container terminal, I can see the application runs on the third core as expected. When I run my application using

Re: [libvirt-users] why CPU pinning doesn't take effect when using lxc-enter-namespace to run an application

2014-12-22 Thread WANG Cheng D
Message- From: Martin Kletzander [mailto:mklet...@redhat.com] Sent: 2014年12月22日 18:13 To: WANG Cheng D Cc: libvirt-users@redhat.com Subject: Re: [libvirt-users] why CPU pinning doesn't take effect when using lxc-enter-namespace to run an application On Mon, Dec 22, 2014 at 08:40:03AM +, WANG

[libvirt-users] Why a core dump error occurs when a thread exits in container but it's correct when running in native linux

2014-10-27 Thread WANG Cheng D
Dear all, When I run my application in a container, sometimes the thread can exit correctly, sometime a core dump error occurs when it exits. But the application always exits correctly when it runs in a native fedora. Malloc() and free() functions are used in my application. I wonder if this

[libvirt-users] an error caused by lxc-enter-namespace command

2014-10-27 Thread WANG Cheng D
Dear all, On my last post Why a core dump error occurs when a thread exits in container but it's correct when running in native linux might be misleading. I did further test and the steps are described below. 1) First, the container is started (we have the first terminal window) 2)

Re: [libvirt-users] How can a user process be automatically started after the container is started?

2014-10-24 Thread WANG Cheng D
[mailto:berra...@redhat.com] Sent: 2014年10月23日 16:11 To: WANG Cheng D Cc: libvirt-users@redhat.com Subject: Re: [libvirt-users] How can a user process be automatically started after the container is started? On Thu, Oct 23, 2014 at 05:09:50AM +, WANG Cheng D wrote: Dear All, I want to start my

[libvirt-users] How can a user process be automatically started after the container is started?

2014-10-22 Thread WANG Cheng D
Dear All, I want to start my application automatically after I start the container with a virsh command virsh -c lxc:/// start mycontainer How can I achieve this? Thank you in advance. Cheng ___ libvirt-users mailing list libvirt-users@redhat.com

[libvirt-users] How to assign multiple IP addresses to a container

2014-10-09 Thread WANG Cheng D
Dear all, I want to assign multiple IP address to a container, does anybody know how to achieve that? Thanks in advance. Cheng ___ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users

Re: [libvirt-users] How to configure the container's NIC automatically with an assigned IP address

2014-09-28 Thread WANG Cheng D
Dear Gene, Thank you for your response. I want to assign a static IP address to my container, I wonder if I can achieve this by editing the container's /etc/sysconfig/network-scripts/ifcfg-eth0. I tried this, but failed, and eth0 is always not assigned an IP address automatically (my host and

[libvirt-users] How to configure the container's NIC automatically with an assigned IP address

2014-09-26 Thread WANG Cheng D
Dear all, I want to run a TCP/IP application automatically after I start the container using virsh -c lxc:/// start mycontainer. Does anybody know how to configure the NIC automatically with an assigned IP address? I couldn't find useful information from domain XML format spec and it only talks

[libvirt-users] How can I get the pid mapping relationship between the container and the native OS

2014-09-01 Thread WANG Cheng D
Dear all, I want to dynamically change the CPU affinity of multiple processes/threads started in a container. Changing affinity operation is done in native OS. My problem is how to obtain the mapping relationship between the two pids owned by the process/thread. As you know, one pid is given by

Re: [libvirt-users] Libvirt installion error: You must install the libyajl library headers to compile libvirt

2014-07-02 Thread WANG Cheng D
Yes, I installed yajl-devel and 4 other rpm packags.,then it works Thank a lot for your response. Cheng -Original Message- From: Martin Kletzander [mailto:mklet...@redhat.com] Sent: 2014年7月1日 17:58 To: WANG Cheng D Cc: libvirt-users@redhat.com Subject: Re: [libvirt-users] Libvirt

Re: [libvirt-users] Libvirt installion error: You must install the libyajl library headers to compile libvirt

2014-07-02 Thread WANG Cheng D
Yes, I installed yajl-devel and 4 other rpm packags.,then it works Thanks a lot for your help Cheng -Original Message- From: Claudio Bley [mailto:cb...@av-test.de] Sent: 2014年7月1日 15:57 To: WANG Cheng D Cc: libvirt-users@redhat.com Subject: Re: [libvirt-users] Libvirt installion error

Re: [libvirt-users] Libvirt installion error: You must install the libyajl library headers to compile libvirt

2014-07-02 Thread WANG Cheng D
Dear Jan, I installed yajl-devel and 4 other rpm packags.,then it works Thanks a lot for your help Cheng -Original Message- From: Ján Tomko [mailto:jto...@redhat.com] Sent: 2014年7月1日 15:56 To: WANG Cheng D; libvirt-users@redhat.com Subject: Re: [libvirt-users] Libvirt installion error

[libvirt-users] changing the priority of a process in the container is not permitted

2014-07-02 Thread WANG Cheng D
Dear all, I want to run a process in a container with a real-time (RT) priority. When the sched_setscheduler(0, SCHED_RR, sparam) is called in the container, an error is reported which is operation not permitted I had added the following line in the file /etc/security/limits.conf for both the

[libvirt-users] How can I setup a privileged container

2014-07-02 Thread WANG Cheng D
Dear all, I want to setup a privileged container, which means I can set the priority of a process to SCHED_RR (real-time) dynamically by calling sched_setscheduler() in a C program running on a container. In my system (host: fedora19, container: fedora19, libvirt 1.2.5), my C code reports

[libvirt-users] Libvirt installion error: You must install the libyajl library headers to compile libvirt

2014-07-01 Thread WANG Cheng D
Dear all, I am installing the libvirt 1.2.5 on my newly installed Fedora19. When I run ./configure, an error is reported: You must install the libyajl library headers to compile libvirt In fact, the package yajl-2.0.4-2fc19.x86_64.rpm has been installed on the fedora19. I found several links

Re: [libvirt-users] Libvirt installion error: You must install the libyajl library headers to compile libvirt

2014-07-01 Thread WANG Cheng D
:-( Thank you for your response. Cheng -Original Message- From: Ján Tomko [mailto:jto...@redhat.com] Sent: 2014年7月1日 15:56 To: WANG Cheng D; libvirt-users@redhat.com Subject: Re: [libvirt-users] Libvirt installion error: You must install the libyajl library headers to compile libvirt On 07/01

Re: [libvirt-users] Libvirt installion error: You must install the libyajl library headers to compile libvirt

2014-07-01 Thread WANG Cheng D
Sorry. I confused yajl with yajl-devel. I will try again Thanks cheng -Original Message- From: Ján Tomko [mailto:jto...@redhat.com] Sent: 2014年7月1日 15:56 To: WANG Cheng D; libvirt-users@redhat.com Subject: Re: [libvirt-users] Libvirt installion error: You must install the libyajl

Re: [libvirt-users] Libvirt installion error: You must install the libyajl library headers to compile libvirt

2014-07-01 Thread WANG Cheng D
Sorry. I confused yajl with yajl-devel. I will try again Thanks cheng -Original Message- From: Claudio Bley [mailto:cb...@av-test.de] Sent: 2014年7月1日 15:57 To: WANG Cheng D Cc: libvirt-users@redhat.com Subject: Re: [libvirt-users] Libvirt installion error: You must install

[libvirt-users] about sharing the hugepage memory segment between the host and the container

2014-06-12 Thread WANG Cheng D
Dear all, What I want to do is to share a hugepage memory segment between the host and a container (I am trying to use intel DPDK package in container). For a normal memory (4k page), the memory sharing can be achieved by memory-mapped I/O (mmap())method with the same disk file on the host

[libvirt-users] Can I assign a dedicated NIC to a container?

2014-05-07 Thread WANG Cheng D
Dear all, There are two containers hosted by my host machine. And the host machine has two same 1G NICs. I want to assign a dedicated NIC to one container. The host and the other container share the second NIC. How can I achieve this? Any comments will be highly appreciated. Cheng

[libvirt-users] How can I have more than one console/terminal windows when connecting to lxc

2014-04-29 Thread WANG Cheng D
Dear all, I use virsh command to start a container and connect to it. When I use virsh -c lxc:/// console mycontainer, I only have one console. I wonder how to open multiple terminal windows for the same container. Thank you in advance Cheng Wang ___

Re: [libvirt-users] LXC + USB passthrough = Operation not permitted

2014-04-14 Thread WANG Cheng D
2) Open a new post to see if lxc experts can help you Good luck! Cheng From: Filip Maj [mailto:f...@saucelabs.com] Sent: 2014年4月15日 1:57 To: WANG Cheng D Cc: libvirt-users@redhat.com Subject: Re: [libvirt-users] LXC + USB passthrough = Operation not permitted I'd also like to point out

Re: [libvirt-users] LXC + USB passthrough = Operation not permitted

2014-04-13 Thread WANG Cheng D
Dear Fil, I am not sure if my answer can help you. I had ever asked a similar question to Daniel and I was using a thirty-party card. As a container uses a shared kernel with the host, so hostdev mode='subsystem' doesn't make sense. Maybe you can try to use hostdev mode='capabilities'. Please

Re: [libvirt-users] LXC + USB passthrough = Operation not permitted

2014-04-13 Thread WANG Cheng D
is a char device, but it really works. If I use “ hostdev mode=’subsystem’”, it will fail to expose the PCIe card. From: Filip Maj [mailto:f...@saucelabs.com] Sent: 2014年4月14日 11:26 To: WANG Cheng D Cc: libvirt-users@redhat.com Subject: RE: [libvirt-users] LXC + USB passthrough = Operation not permitted

[libvirt-users] a question on vCPU setting for lxc

2014-03-17 Thread WANG Cheng D
Dear all, I am not clear about the 'vcpu' element for CPU allocation. I allocated 1 vCPU to my container, after I started the container, I ran 4 computation-intensive tasks on the container. And I found all the 4 physical core are 100% used (my host has 4 physical cores and no other application

Re: [libvirt-users] a question on vCPU setting for lxc

2014-03-17 Thread WANG Cheng D
Dear yuanle, Thank you for the information. You might be right. But I am still confused about what’s the difference between a vCPU and a physical core. Regards, Cheng From: sylecn [mailto:syl...@gmail.com] Sent: 2014年3月17日 15:06 To: WANG Cheng D Cc: libvirt-users@redhat.com Subject: Re: [libvirt

Re: [libvirt-users] method for communication between containers

2014-03-03 Thread WANG Cheng D
. It seems that the exposed file cannot be recognized by shmget() function, although ftok() can work and return the value. Do you have an idea? Best wishes. Cheng Wang -Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: 2014年2月27日 18:30 To: WANG Cheng D Cc

[libvirt-users] method for communication between containers

2014-02-26 Thread WANG Cheng D
Dear all, In my system, two containers need to exchange data as quick as possible and the two containers are hosted by the same physical machine, I wonder if socket is the only method for communication between containers? Thank you. Cheng Wang ___

Re: [libvirt-users] If it's possible for a third-party PCIe card to be shared by multiple containers

2014-01-23 Thread WANG Cheng D
currently. Have a nice day, Cheng Wang -Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: 2014年1月16日 18:34 To: WANG Cheng D Cc: libvirt-users@redhat.com Subject: Re: [libvirt-users] If it's possible for a third-party PCIe card to be shared by multiple

Re: [libvirt-users] If it's possible for a third-party PCIe card to be shared by multiple containers

2014-01-20 Thread WANG Cheng D
Dear Daniel, Thank you for the information. I think I should study more about libvirt's Node Device functions. Have a nice day. Cheng -Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: 2014年1月16日 18:34 To: WANG Cheng D Cc: libvirt-users@redhat.com Subject: Re

Re: [libvirt-users] If it's possible for a third-party PCIe card to be shared by multiple containers

2014-01-16 Thread WANG Cheng D
running in the which solely operates the PCIe card, all the containers will send/receive data to this process via socket. With my warmest regards, Cheng Wang -Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: 2014年1月15日 18:46 To: WANG Cheng D Cc: libvirt-users

Re: [libvirt-users] Does libvirt lxc driver support cpuset attribute?

2014-01-15 Thread WANG Cheng D
Dear Daniel, Thank you for the information. :-) Cheng On Wed, Jan 15, 2014 at 05:49:23AM +, WANG Cheng D wrote: Dear all I allocate only one vcpu for the container by the following statement, that is, I want to pin the vcpu to physical core 2. vcpu placement='static' cpuset=2 1/vcpu

[libvirt-users] If it's possible for a third-party PCIe card to be shared by multiple containers

2014-01-14 Thread WANG Cheng D
Dear all, I have a thirty-party PCIe card in my host which can work properly in native mode. I wonder if this card can be shared by multiple containers. As far as the network interface is concerned, too many efforts have been made for it. Two dedicated cgroup resource

[libvirt-users] Does libvirt lxc driver support cpuset attribute?

2014-01-14 Thread WANG Cheng D
Dear all I allocate only one vcpu for the container by the following statement, that is, I want to pin the vcpu to physical core 2. vcpu placement='static' cpuset=2 1/vcpu My host has 4 physical cores. Before test, all the 4 cores are idle. After I run 4 processes in the container, I found all

[libvirt-users] How to start the container's network interface automatically

2014-01-06 Thread WANG Cheng D
Dear all, I failed to start the container's network interface automatically. I have to start it manually each time after the container finishes booting. I know that in a native fedora, if we want the network interface to start automatically, we should edit

[libvirt-users] How to start the linux container's network interface automatically

2014-01-05 Thread WANG Cheng D
Dear all, I failed to start the linux container's network interface automatically. I have to start it manually each time after the container finishes booting. I know that in a native fedora, if we want the network interface to start automatically, we should edit