Re: LXC support (limits)
I'm not very familiar with the lxc-integration, but I would suggest checking out the container service ShapeBlue has created. http://www.shapeblue.com/cloudstack-container-service/ -- Erik On Mon, May 15, 2017 at 1:23 PM, Vladimir Melnikwrote: > Dear colleagues, > > Had anyone succeeded at limiting an LXC-instance that has been deployed by > ACS? > > On a CentOS-7-based host the VM can use all the CPU cores and all the > storage. Is that possible to limit at least the storage usage? > > Any hints would be greatly appreciated. Thank you! > > -- > V.Melnik
Re: LXC container template for CloudStack
Thanks Kishan. Have tried downloading the template and create a container on my LXC cluster (host is running Ubuntu), and it fails. Not too sure if it's because I tried to spin off a CentOS 7 container on an Ubuntu 12.04 LXC host?I understand that for container, the kernel of the guest container must be the same as the host OS? Thank you. On Wed, Jun 8, 2016 at 4:40 PM, Kishan Kavala <kishan.kav...@accelerite.com> wrote: > You can try this centos 7 template for LXC: > http://download.cloud.com/templates/builtin/centos-7-x86_64.tar.gz > > -Original Message- > From: Cloud List [mailto:cloud-l...@sg.or.id] > Sent: Wednesday, June 08, 2016 1:35 PM > To: users@cloudstack.apache.org; d...@cloudstack.apache.org > Subject: Re: LXC container template for CloudStack > > Dear all, > > Anyone can point me to any URLs containing ready-to-use LXC container > template for Cloudstack, ready for download? > > Thank you. > > -ip- > > > On Mon, Jun 6, 2016 at 2:21 PM, Cloud List <cloud-l...@sg.or.id> wrote: > > > Dear all, > > > > I am trying to add an LXC cluster in addition to the existing running > > KVM cluster in my CloudStack 4.8.0 test environment. > > > > > > https://cwiki.apache.org/confluence/display/CLOUDSTACK/LXC+Support+in+ > > Cloudstack > > > > I understand that the LXC container template for CloudStack is not > > provided / bundled by default, so we need to create one or download. > > May I > > know: > > > > (1) How do we create one? I follow the instruction on how to create > > LXC template for Ubuntu here: > > > > > > https://cwiki.apache.org/confluence/display/CLOUDSTACK/LXC+Template+cr > > eation#LXCTemplatecreation-CreatingtemplateonUbuntu > > > > It requires us to install lxc (apt-get install lxc) but doing so will > > remove cloudstack-agent package hosted on the same host. > > > > (2) Where can we download ready-to-use LXC container template for > > CloudStack? > > > > Looking forward to your reply, thank you. > > > > Cheers. > > > > -ip- > > > > > > DISCLAIMER > == > This e-mail may contain privileged and confidential information which is > the property of Accelerite, a Persistent Systems business. It is intended > only for the use of the individual or entity to which it is addressed. If > you are not the intended recipient, you are not authorized to read, retain, > copy, print, distribute or use this message. If you have received this > communication in error, please notify the sender and delete all copies of > this message. Accelerite, a Persistent Systems business does not accept any > liability for virus infected mails. >
RE: LXC container template for CloudStack
You can try this centos 7 template for LXC: http://download.cloud.com/templates/builtin/centos-7-x86_64.tar.gz -Original Message- From: Cloud List [mailto:cloud-l...@sg.or.id] Sent: Wednesday, June 08, 2016 1:35 PM To: users@cloudstack.apache.org; d...@cloudstack.apache.org Subject: Re: LXC container template for CloudStack Dear all, Anyone can point me to any URLs containing ready-to-use LXC container template for Cloudstack, ready for download? Thank you. -ip- On Mon, Jun 6, 2016 at 2:21 PM, Cloud List <cloud-l...@sg.or.id> wrote: > Dear all, > > I am trying to add an LXC cluster in addition to the existing running > KVM cluster in my CloudStack 4.8.0 test environment. > > > https://cwiki.apache.org/confluence/display/CLOUDSTACK/LXC+Support+in+ > Cloudstack > > I understand that the LXC container template for CloudStack is not > provided / bundled by default, so we need to create one or download. > May I > know: > > (1) How do we create one? I follow the instruction on how to create > LXC template for Ubuntu here: > > > https://cwiki.apache.org/confluence/display/CLOUDSTACK/LXC+Template+cr > eation#LXCTemplatecreation-CreatingtemplateonUbuntu > > It requires us to install lxc (apt-get install lxc) but doing so will > remove cloudstack-agent package hosted on the same host. > > (2) Where can we download ready-to-use LXC container template for > CloudStack? > > Looking forward to your reply, thank you. > > Cheers. > > -ip- > DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Accelerite, a Persistent Systems business. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Accelerite, a Persistent Systems business does not accept any liability for virus infected mails.
Re: LXC container template for CloudStack
Dear all, Anyone can point me to any URLs containing ready-to-use LXC container template for Cloudstack, ready for download? Thank you. -ip- On Mon, Jun 6, 2016 at 2:21 PM, Cloud Listwrote: > Dear all, > > I am trying to add an LXC cluster in addition to the existing running KVM > cluster in my CloudStack 4.8.0 test environment. > > > https://cwiki.apache.org/confluence/display/CLOUDSTACK/LXC+Support+in+Cloudstack > > I understand that the LXC container template for CloudStack is not > provided / bundled by default, so we need to create one or download. May I > know: > > (1) How do we create one? I follow the instruction on how to create LXC > template for Ubuntu here: > > > https://cwiki.apache.org/confluence/display/CLOUDSTACK/LXC+Template+creation#LXCTemplatecreation-CreatingtemplateonUbuntu > > It requires us to install lxc (apt-get install lxc) but doing so will > remove cloudstack-agent package hosted on the same host. > > (2) Where can we download ready-to-use LXC container template for > CloudStack? > > Looking forward to your reply, thank you. > > Cheers. > > -ip- >
Re: lxc on cloudstack
registering the template with requireshvm=false or executing the below query worked for me update vm_template set hvm=0 where id=‘TEMPLATE_ID’; I don’t know what the flag does or why it doesn’t work with lxc. ~Rajani On 01-Aug-2014, at 11:09 am, Osamu Ikehara ikeh...@joes.co.jp wrote: Hello, I am stacking about cloudstack + lxc. what I did is Ubuntu 14.04 trusty, cloudstack 4.4 installed from http://cloudstack.apt-get.eu/ubuntu/dists/trusty/ create management node - fine add kvm cluster - fine add kvm agent - fine create second storage vm, console vm - fine add lxc cluster - fine add lxc agent - seems to be fine add lxc instance adding iso - . log is below. is anyone able to create lxc instance on cloudstack? what is the mean 'they are not HVM enabled' ? please tell me how to create lxc. Thank you. 2014-08-01 13:08:43,304 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-52:ctx-0f32ce3a job-56) Executing AsyncJobVO {id:56, userId: 2, accountId: 2, instanceType: VirtualMachine, instanceId: 3, cmd: org.apache.cloudstack.api.command.admin.vm.DeployVMCmdByAdmin, cmdInfo: {serviceofferingid:ca9ec6a0-10e3-4101-9b4e-32da49929397,sessionkey:ZXZElEJY2wGlUjbYc8mYMTjEKDU\u003d,cmdEventType:VM.CREATE,ctxUserId:2,zoneid:e32f5ae1-5a01-4f44-b4ae-cc09419efd11,httpmethod:GET,templateid:60a6ae31-3690-4122-8cbe-ad106f18679f,response:json,id:3,ctxDetails:{\com.cloud.template.VirtualMachineTemplate\:\60a6ae31-3690-4122-8cbe-ad106f18679f\,\com.cloud.vm.VirtualMachine\:\f362e2be-e7a7-40a6-9388-556e95583d0b\,\com.cloud.offering.DiskOffering\:\842daf1f-bfd5-425b-a6f3-3f6fa06fd90a\,\com.cloud.dc.DataCenter\:\e32f5ae1-5a01-4f44-b4ae-cc09419efd11\,\com.cloud.offering.ServiceOffering\:\ca9ec6a0-10e3-4101-9b4e-32da49929397\},hypervisor:L XC,iptonetworklist[0].networkid:c220e198-baf3-419d-b561-dddb2b79540a,_:1406866122712,uuid:f362e2be-e7a7-40a6-9388-556e95583d0b,ctxAccountId:2,diskofferingid:842daf1f-bfd5-425b-a6f3-3f6fa06fd90a,ctxStartEventId:147}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 109955820418, completeMsid: null, lastUpdated: null, lastPolled: null, created: null} 2014-08-01 13:08:43,405 DEBUG [c.c.n.NetworkModelImpl] (API-Job-Executor-52:ctx-0f32ce3a job-56 ctx-f436dcd7) Service SecurityGroup is not supported in the network id=208 2014-08-01 13:08:43,408 DEBUG [c.c.n.NetworkModelImpl] (API-Job-Executor-52:ctx-0f32ce3a job-56 ctx-f436dcd7) Service SecurityGroup is not supported in the network id=208 2014-08-01 13:08:43,427 DEBUG [c.c.d.DeploymentPlanningManagerImpl] (API-Job-Executor-52:ctx-0f32ce3a job-56 ctx-f436dcd7) Deploy avoids pods: [], clusters: [], hosts: [] 2014-08-01 13:08:43,428 DEBUG [c.c.d.DeploymentPlanningManagerImpl] (API-Job-Executor-52:ctx-0f32ce3a job-56 ctx-f436dcd7) DeploymentPlanner allocation algorithm: com.cloud.deploy.FirstFitPlanner@5e99834a 2014-08-01 13:08:43,428 DEBUG [c.c.d.DeploymentPlanningManagerImpl] (API-Job-Executor-52:ctx-0f32ce3a job-56 ctx-f436dcd7) Trying to allocate a host and storage pools from dc:2, pod:null,cluster:null, requested cpu: 500, requested ram: 536870912 2014-08-01 13:08:43,428 DEBUG [c.c.d.DeploymentPlanningManagerImpl] (API-Job-Executor-52:ctx-0f32ce3a job-56 ctx-f436dcd7) Is ROOT volume READY (pool already allocated)?: No 2014-08-01 13:08:43,429 DEBUG [c.c.d.FirstFitPlanner] (API-Job-Executor-52:ctx-0f32ce3a job-56 ctx-f436dcd7) Searching all possible resources under this Zone: 2 2014-08-01 13:08:43,430 DEBUG [c.c.d.FirstFitPlanner] (API-Job-Executor-52:ctx-0f32ce3a job-56 ctx-f436dcd7) Listing clusters in order of aggregate capacity, that have (atleast one host with) enough CPU and RAM capacity under this Zone: 2 2014-08-01 13:08:43,433 DEBUG [c.c.d.FirstFitPlanner] (API-Job-Executor-52:ctx-0f32ce3a job-56 ctx-f436dcd7) Removing from the clusterId list these clusters from avoid set: [] 2014-08-01 13:08:43,439 DEBUG [c.c.d.DeploymentPlanningManagerImpl] (API-Job-Executor-52:ctx-0f32ce3a job-56 ctx-f436dcd7) Checking resources in Cluster: 3 under Pod: 2 2014-08-01 13:08:43,439 DEBUG [c.c.a.m.a.i.FirstFitAllocator] (API-Job-Executor-52:ctx-0f32ce3a job-56 ctx-f436dcd7 FirstFitRoutingAllocator) Looking for hosts in dc: 2 pod:2 cluster:3 2014-08-01 13:08:43,441 DEBUG [c.c.a.m.a.i.FirstFitAllocator] (API-Job-Executor-52:ctx-0f32ce3a job-56 ctx-f436dcd7 FirstFitRoutingAllocator) FirstFitAllocator has 1 hosts to check for allocation: [Host[-5-Routing]] 2014-08-01 13:08:43,443 DEBUG [c.c.a.m.a.i.FirstFitAllocator] (API-Job-Executor-52:ctx-0f32ce3a job-56 ctx-f436dcd7 FirstFitRoutingAllocator) Not considering hosts: [Host[-5-Routing]] to deploy template: Tmpl[201-ISO-201-2-e9eacfcd-1360-3e1d-8b5b-497997678249 as they are not HVM enabled 2014-08-01 13:08:43,444 DEBUG [c.c.a.m.a.i.FirstFitAllocator] (API-Job-Executor-52:ctx-0f32ce3a job-56 ctx-f436dcd7
Re: LXC template
Hello All, I get this error when spawning containers from instances of cloudstack UI using the tar template. This is the error on both versions, Cloudstack version 4.2.1 did you happen to find the solution FirstFitRoutingAllocator) Not considering hosts: [Host[-8-Routing]] to deploy template: Tmpl[204-TAR-204-2-38924546-779b-3ac1-bd1e-de8954924766 as they are not HVM enabled Cloudstack version 4.3 2014-04-13 07:21:56,126 DEBUG [c.c.a.m.a.i.FirstFitAllocator] (Job-Executor-14:ctx-61c059d3 ctx-66fe363c FirstFitRoutingAllocator) Not considering hosts: [Host[-4-Routing]] to deploy template: Tmpl[201-TAR-201-2-13d3b351-7e84-361d-ba55-3fc8bb0c53c2 as they are not HVM enabled HVM for intel on KVM hypervisors egrep '(vmx)' --color=always /proc/cpuinfo flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 popcnt lahf_lm ida arat epb dts tpr_shadow vnmi flexpriority ept vpid flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 popcnt lahf_lm ida arat epb dts tpr_shadow vnmi flexpriority ept vpid flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdt [root@OVS-1 ~]# lsmod | grep intel kvm_intel 54285 6 kvm 333172 1 kvm_intel Any Advice. Thank you Regards, Bhavin Shah On Sat, Apr 5, 2014 at 6:23 PM, Francois Gaudreault fgaudrea...@cloudops.com wrote: Sure! In fact, that was in a blog post that never got released on our side :S I also have the host build piece documented. Where it would be the best to drop that? In the LXC section of the doc or as an annexe or in the wiki? Francois On Sat, Apr 5, 2014 at 4:16 PM, David Nalley da...@gnsa.us wrote: Would you consider adding this as part of the documentation? Or at least as a blog post? --David On Wed, Apr 2, 2014 at 11:07 AM, Francois Gaudreault fgaudrea...@cloudops.com wrote: On 2014-04-02, 1:34 AM, Chinu wrote: Hello all, Please can someone advice how to create an LXC template image in tar format to spawn containers in KVM for Cloudstack version 4.2 or 4.3 Regards, Chinu I have that. This is for a CentOS image. I apologize for the formatting, I am using text emails ;) On your *HOST* run: |mkdir||/var/lib/libvirt/lxc/centos-6-x86_64/etc/yum||.repos.d/ -p | |cat||/etc/yum||.repos.d||/CentOS-Base||.repo |||sed||s/||'$releasever'||/6/g/var/lib/libvirt/lxc/centos-6-x86_64/etc/yum||.repos.d||/CentOS-Base||.repo| |yum groupinstall core --installroot=||/var/lib/libvirt/lxc/centos-6-x86_64/||--nogpgcheck -y| |yum||install||plymouth libselinux-python --installroot=||/var/lib/libvirt/lxc/centos-6-x86_64/||--nogpgcheck -y| On your *CHROOTED* container: |chroot||/var/lib/libvirt/lxc/centos-6-x86_64/| |echo||password |||passwd||root --stdin| |#Fix root login on console| |echo||pts/0/etc/securetty| |sed||-i s/||session required pam_selinux.so close||/||#session required pam_selinux.so close||/g||/etc/pam||.d||/login| |sed||-i s/||session required pam_selinux.so open||/||#session required pam_selinux.so open||/g||/etc/pam||.d||/login| |sed||-i s/||session required pam_loginuid.so||/||#session required pam_loginuid.so||/g||/etc/pam||.d||/login| |#Configuring basic networking| |cat/etc/sysconfig/network|| EOF| |NETWORKING=||yes| |HOSTNAME=lxc1.||test||.centos.org| |EOF| |cat/etc/sysconfig/network-scripts/ifcfg-eth0|| EOF| |DEVICE=eth0| |BOOTPROTO=dhcp| |ONBOOT=||yes| |EOF| |#Enabling sshd| |chkconfig sshd on| |# Fixing root login for sshd| |sed||-i s/||session required pam_selinux.so close||/||#session required pam_selinux.so close||/g||/etc/pam||.d||/sshd| |sed||-i s/||session required pam_loginuid.so||/||#session required pam_loginuid.so||/g||/etc/pam||.d||/sshd| |sed||-i s/||session required pam_selinux.so open env_params||/||#session required pam_selinux.so open env_params||/g||/etc/pam||.d||/sshd| || |cat/etc/fstab|| END| |/dev/root| |/ rootfs defaults0 0| |none ||/dev/shm| |tmpfs nosuid,nodev0 0| |END| || |cat/etc/init/lxc-sysinit||.conf END| |start on startup| |env||container| |pre-start script|
Re: LXC template
Would you consider adding this as part of the documentation? Or at least as a blog post? --David On Wed, Apr 2, 2014 at 11:07 AM, Francois Gaudreault fgaudrea...@cloudops.com wrote: On 2014-04-02, 1:34 AM, Chinu wrote: Hello all, Please can someone advice how to create an LXC template image in tar format to spawn containers in KVM for Cloudstack version 4.2 or 4.3 Regards, Chinu I have that. This is for a CentOS image. I apologize for the formatting, I am using text emails ;) On your *HOST* run: |mkdir||/var/lib/libvirt/lxc/centos-6-x86_64/etc/yum||.repos.d/ -p | |cat||/etc/yum||.repos.d||/CentOS-Base||.repo |||sed||s/||'$releasever'||/6/g/var/lib/libvirt/lxc/centos-6-x86_64/etc/yum||.repos.d||/CentOS-Base||.repo| |yum groupinstall core --installroot=||/var/lib/libvirt/lxc/centos-6-x86_64/||--nogpgcheck -y| |yum||install||plymouth libselinux-python --installroot=||/var/lib/libvirt/lxc/centos-6-x86_64/||--nogpgcheck -y| On your *CHROOTED* container: |chroot||/var/lib/libvirt/lxc/centos-6-x86_64/| |echo||password |||passwd||root --stdin| |#Fix root login on console| |echo||pts/0/etc/securetty| |sed||-i s/||session required pam_selinux.so close||/||#session required pam_selinux.so close||/g||/etc/pam||.d||/login| |sed||-i s/||session required pam_selinux.so open||/||#session required pam_selinux.so open||/g||/etc/pam||.d||/login| |sed||-i s/||session required pam_loginuid.so||/||#session required pam_loginuid.so||/g||/etc/pam||.d||/login| |#Configuring basic networking| |cat/etc/sysconfig/network|| EOF| |NETWORKING=||yes| |HOSTNAME=lxc1.||test||.centos.org| |EOF| |cat/etc/sysconfig/network-scripts/ifcfg-eth0|| EOF| |DEVICE=eth0| |BOOTPROTO=dhcp| |ONBOOT=||yes| |EOF| |#Enabling sshd| |chkconfig sshd on| |# Fixing root login for sshd| |sed||-i s/||session required pam_selinux.so close||/||#session required pam_selinux.so close||/g||/etc/pam||.d||/sshd| |sed||-i s/||session required pam_loginuid.so||/||#session required pam_loginuid.so||/g||/etc/pam||.d||/sshd| |sed||-i s/||session required pam_selinux.so open env_params||/||#session required pam_selinux.so open env_params||/g||/etc/pam||.d||/sshd| || |cat/etc/fstab|| END| |/dev/root| |/ rootfs defaults0 0| |none ||/dev/shm| |tmpfs nosuid,nodev0 0| |END| || |cat/etc/init/lxc-sysinit||.conf END| |start on startup| |env||container| |pre-start script| |||if||[||x$container||!=||xlxc||-a||x$container||!=||xlibvirt||];||then| |||stop;| |||fi| |||initctl start||tty||TTY=console| |||rm||-f||/var/lock/subsys/||*| |||rm||-f||/var/run/||*.pid| |||telinit 3| |||exit||0;| |end script| |END| || |#Exit the chroot| |exit| Tar it: |cd||/var/lib/libvirt/lxc/centos-6-x86_64| |tar||cvf centos-6-x86_64_lxc.||tar||. Upload to CloudStack and enjoy! | -- Francois Gaudreault Architecte de Solution Cloud | Cloud Solutions Architect fgaudrea...@cloudops.com 514-629-6775 - - - CloudOps 420 rue Guy Montréal QC H3J 1S6 www.cloudops.com @CloudOps_
Re: LXC template
Sure! In fact, that was in a blog post that never got released on our side :S I also have the host build piece documented. Where it would be the best to drop that? In the LXC section of the doc or as an annexe or in the wiki? Francois On Sat, Apr 5, 2014 at 4:16 PM, David Nalley da...@gnsa.us wrote: Would you consider adding this as part of the documentation? Or at least as a blog post? --David On Wed, Apr 2, 2014 at 11:07 AM, Francois Gaudreault fgaudrea...@cloudops.com wrote: On 2014-04-02, 1:34 AM, Chinu wrote: Hello all, Please can someone advice how to create an LXC template image in tar format to spawn containers in KVM for Cloudstack version 4.2 or 4.3 Regards, Chinu I have that. This is for a CentOS image. I apologize for the formatting, I am using text emails ;) On your *HOST* run: |mkdir||/var/lib/libvirt/lxc/centos-6-x86_64/etc/yum||.repos.d/ -p | |cat||/etc/yum||.repos.d||/CentOS-Base||.repo |||sed||s/||'$releasever'||/6/g/var/lib/libvirt/lxc/centos-6-x86_64/etc/yum||.repos.d||/CentOS-Base||.repo| |yum groupinstall core --installroot=||/var/lib/libvirt/lxc/centos-6-x86_64/||--nogpgcheck -y| |yum||install||plymouth libselinux-python --installroot=||/var/lib/libvirt/lxc/centos-6-x86_64/||--nogpgcheck -y| On your *CHROOTED* container: |chroot||/var/lib/libvirt/lxc/centos-6-x86_64/| |echo||password |||passwd||root --stdin| |#Fix root login on console| |echo||pts/0/etc/securetty| |sed||-i s/||session required pam_selinux.so close||/||#session required pam_selinux.so close||/g||/etc/pam||.d||/login| |sed||-i s/||session required pam_selinux.so open||/||#session required pam_selinux.so open||/g||/etc/pam||.d||/login| |sed||-i s/||session required pam_loginuid.so||/||#session required pam_loginuid.so||/g||/etc/pam||.d||/login| |#Configuring basic networking| |cat/etc/sysconfig/network|| EOF| |NETWORKING=||yes| |HOSTNAME=lxc1.||test||.centos.org| |EOF| |cat/etc/sysconfig/network-scripts/ifcfg-eth0|| EOF| |DEVICE=eth0| |BOOTPROTO=dhcp| |ONBOOT=||yes| |EOF| |#Enabling sshd| |chkconfig sshd on| |# Fixing root login for sshd| |sed||-i s/||session required pam_selinux.so close||/||#session required pam_selinux.so close||/g||/etc/pam||.d||/sshd| |sed||-i s/||session required pam_loginuid.so||/||#session required pam_loginuid.so||/g||/etc/pam||.d||/sshd| |sed||-i s/||session required pam_selinux.so open env_params||/||#session required pam_selinux.so open env_params||/g||/etc/pam||.d||/sshd| || |cat/etc/fstab|| END| |/dev/root| |/ rootfs defaults0 0| |none ||/dev/shm| |tmpfs nosuid,nodev0 0| |END| || |cat/etc/init/lxc-sysinit||.conf END| |start on startup| |env||container| |pre-start script| |||if||[||x$container||!=||xlxc||-a||x$container||!=||xlibvirt||];||then| |||stop;| |||fi| |||initctl start||tty||TTY=console| |||rm||-f||/var/lock/subsys/||*| |||rm||-f||/var/run/||*.pid| |||telinit 3| |||exit||0;| |end script| |END| || |#Exit the chroot| |exit| Tar it: |cd||/var/lib/libvirt/lxc/centos-6-x86_64| |tar||cvf centos-6-x86_64_lxc.||tar||. Upload to CloudStack and enjoy! | -- Francois Gaudreault Architecte de Solution Cloud | Cloud Solutions Architect fgaudrea...@cloudops.com 514-629-6775 - - - CloudOps 420 rue Guy Montréal QC H3J 1S6 www.cloudops.com @CloudOps_
Re: LXC template
Thank you Francois for the information. Please could you tell me which cloudstack template to use for spawning systems VMS on a LXC to spawn containers. I used LXC template found in database which was very old | 10 | SystemVM Template (LXC) | http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2| SYSTEM | LXC | which did not work as cloudstack release was too old, then I tried with | 3 | SystemVM Template (KVM) | http://download.cloud.com/templates/4.2/systemvmtemplate-2013-06-12-master-kvm.qcow2.bz2| SYSTEM | KVM. Still my system VMs were rebooting only 1 VM is up at a time. Any Advice would be appreciated Thank you Regards, Chinu On Wed, Apr 2, 2014 at 8:12 AM, Francois Gaudreault fgaudrea...@cloudops.com wrote: On 2014-04-02, 1:34 AM, Chinu wrote: Hello all, Please can someone advice how to create an LXC template image in tar format to spawn containers in KVM for Cloudstack version 4.2 or 4.3 Regards, Chinu Ok, the output was not as good as I though. Use this link instead :) http://pastebin.com/PuZd9gw6 -- Francois Gaudreault Architecte de Solution Cloud | Cloud Solutions Architect fgaudrea...@cloudops.com 514-629-6775 - - - CloudOps 420 rue Guy Montréal QC H3J 1S6 www.cloudops.com @CloudOps_
Re: LXC template
You need a real hypervisor to run your SSVM and CPVM (ie. KVM, Xen, etc.) You can't run the SSVM only on LXC. Francois On 2014-04-04, 4:32 PM, chinu shah wrote: Thank you Francois for the information. Please could you tell me which cloudstack template to use for spawning systems VMS on a LXC to spawn containers. I used LXC template found in database which was very old | 10 | SystemVM Template (LXC) | http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2 | SYSTEM | LXC | which did not work as cloudstack release was too old, then I tried with | 3 | SystemVM Template (KVM) | http://download.cloud.com/templates/4.2/systemvmtemplate-2013-06-12-master-kvm.qcow2.bz2 | SYSTEM | KVM. Still my system VMs were rebooting only 1 VM is up at a time. Any Advice would be appreciated Thank you Regards, Chinu On Wed, Apr 2, 2014 at 8:12 AM, Francois Gaudreault fgaudrea...@cloudops.com mailto:fgaudrea...@cloudops.com wrote: On 2014-04-02, 1:34 AM, Chinu wrote: Hello all, Please can someone advice how to create an LXC template image in tar format to spawn containers in KVM for Cloudstack version 4.2 or 4.3 Regards, Chinu Ok, the output was not as good as I though. Use this link instead :) http://pastebin.com/PuZd9gw6 -- Francois Gaudreault Architecte de Solution Cloud | Cloud Solutions Architect fgaudrea...@cloudops.com mailto:fgaudrea...@cloudops.com 514-629-6775 tel:514-629-6775 - - - CloudOps 420 rue Guy Montréal QC H3J 1S6 www.cloudops.com http://www.cloudops.com @CloudOps_ -- Francois Gaudreault Architecte de Solution Cloud | Cloud Solutions Architect fgaudrea...@cloudops.com 514-629-6775 - - - CloudOps 420 rue Guy Montréal QC H3J 1S6 www.cloudops.com @CloudOps_
Re: LXC template
On 2014-04-02, 1:34 AM, Chinu wrote: Hello all, Please can someone advice how to create an LXC template image in tar format to spawn containers in KVM for Cloudstack version 4.2 or 4.3 Regards, Chinu I have that. This is for a CentOS image. I apologize for the formatting, I am using text emails ;) On your *HOST* run: |mkdir||/var/lib/libvirt/lxc/centos-6-x86_64/etc/yum||.repos.d/ -p | |cat||/etc/yum||.repos.d||/CentOS-Base||.repo |||sed||s/||'$releasever'||/6/g/var/lib/libvirt/lxc/centos-6-x86_64/etc/yum||.repos.d||/CentOS-Base||.repo| |yum groupinstall core --installroot=||/var/lib/libvirt/lxc/centos-6-x86_64/||--nogpgcheck -y| |yum||install||plymouth libselinux-python --installroot=||/var/lib/libvirt/lxc/centos-6-x86_64/||--nogpgcheck -y| On your *CHROOTED* container: |chroot||/var/lib/libvirt/lxc/centos-6-x86_64/| |echo||password |||passwd||root --stdin| |#Fix root login on console| |echo||pts/0/etc/securetty| |sed||-i s/||session required pam_selinux.so close||/||#session required pam_selinux.so close||/g||/etc/pam||.d||/login| |sed||-i s/||session required pam_selinux.so open||/||#session required pam_selinux.so open||/g||/etc/pam||.d||/login| |sed||-i s/||session required pam_loginuid.so||/||#session required pam_loginuid.so||/g||/etc/pam||.d||/login| |#Configuring basic networking| |cat/etc/sysconfig/network|| EOF| |NETWORKING=||yes| |HOSTNAME=lxc1.||test||.centos.org| |EOF| |cat/etc/sysconfig/network-scripts/ifcfg-eth0|| EOF| |DEVICE=eth0| |BOOTPROTO=dhcp| |ONBOOT=||yes| |EOF| |#Enabling sshd| |chkconfig sshd on| |# Fixing root login for sshd| |sed||-i s/||session required pam_selinux.so close||/||#session required pam_selinux.so close||/g||/etc/pam||.d||/sshd| |sed||-i s/||session required pam_loginuid.so||/||#session required pam_loginuid.so||/g||/etc/pam||.d||/sshd| |sed||-i s/||session required pam_selinux.so open env_params||/||#session required pam_selinux.so open env_params||/g||/etc/pam||.d||/sshd| || |cat/etc/fstab|| END| |/dev/root| |/ rootfs defaults0 0| |none ||/dev/shm| |tmpfs nosuid,nodev0 0| |END| || |cat/etc/init/lxc-sysinit||.conf END| |start on startup| |env||container| |pre-start script| |||if||[||x$container||!=||xlxc||-a||x$container||!=||xlibvirt||];||then| |||stop;| |||fi| |||initctl start||tty||TTY=console| |||rm||-f||/var/lock/subsys/||*| |||rm||-f||/var/run/||*.pid| |||telinit 3| |||exit||0;| |end script| |END| || |#Exit the chroot| |exit| Tar it: |cd||/var/lib/libvirt/lxc/centos-6-x86_64| |tar||cvf centos-6-x86_64_lxc.||tar||. Upload to CloudStack and enjoy! | -- Francois Gaudreault Architecte de Solution Cloud | Cloud Solutions Architect fgaudrea...@cloudops.com 514-629-6775 - - - CloudOps 420 rue Guy Montréal QC H3J 1S6 www.cloudops.com @CloudOps_
Re: LXC template
On 2014-04-02, 1:34 AM, Chinu wrote: Hello all, Please can someone advice how to create an LXC template image in tar format to spawn containers in KVM for Cloudstack version 4.2 or 4.3 Regards, Chinu Ok, the output was not as good as I though. Use this link instead :) http://pastebin.com/PuZd9gw6 -- Francois Gaudreault Architecte de Solution Cloud | Cloud Solutions Architect fgaudrea...@cloudops.com 514-629-6775 - - - CloudOps 420 rue Guy Montréal QC H3J 1S6 www.cloudops.com @CloudOps_
RE: lxc cluster can't add primary storage
There is already a bug filed for this issue: https://issues.apache.org/jira/browse/CLOUDSTACK-4402 --Sanjay -Original Message- From: 卢惠勇 [mailto:luhuiy...@conew.com] Sent: Friday, December 20, 2013 11:54 AM To: users@cloudstack.apache.org Subject: lxc cluster can't add primary storage I can't add a nfs primary storage for my *lxc* cluster. this is the cloudstack error log: INFO [cloud.api.ApiServer] (catalina-exec-10:) *Failed to delete storage pool on host* but i can add nfs primary storage for my kvm cluster.why? --
Re: lxc 虚拟机启动失败
日志呢 在 2013年11月8日下午3:52,Du Jun dj199...@gmail.com写道: 我现在能够把lxc的host添加到management server,但是lxc的系统虚拟机起不来。有人知道原因吗?提供下思路呗!
回复: Re: lxc 虚拟机启动失败
虚机开不出来,排查思路一般是这样: 首先看下资源情况,主机、主存储、二级存储是否正常,资源是否足够 再看SSVM是否正常 再看模版 Cratical == 爱Coding,爱技术,喜欢数码的Geek一枚 == 发件人: Wei ZHOU 发送时间: 2013-11-08 23:03 收件人: users-cn@cloudstack.apache.org 主题: Re: lxc 虚拟机启动失败 日志呢 在 2013年11月8日下午3:52,Du Jun dj199...@gmail.com写道: 我现在能够把lxc的host添加到management server,但是lxc的系统虚拟机起不来。有人知道原因吗?提供下思路呗!
Re: LXC
On Sep 24, 2013, at 2:48 AM, Bjoern Teipel bjoern.tei...@internetbrands.com wrote: A question came up if LXC might be useful for cloudstack and I personally agree that's a pretty interesting product for all those internet guys like me who runs their hardware to the extreme. I came today across an interesting podcast (http://www.theregister.co.uk/2013/08/01/speaking_in_tech_episode_69/) which covers also the announcement of Openstack and AWS API and they mentioned LXC support's being developed on. More info at http://tech.gilt.com/post/41713823209/adding-lxc-support-to-cloudstack So I hope we'll getting a new toy pretty soon … did you check the wiki link on that page: https://cwiki.apache.org/confluence/display/CLOUDSTACK/LXC+Support+in+Cloudstack I haven't tried it, but any user feedback would be great. Regards, Bjoern
Re: LXC
No I didn't try yet, but I will. Following the lxc and open shift projects right now and both are pretty interesting to me since they provide a pass feeling like Heroku On Sep 24, 2013, at 12:08 AM, Sebastien Goasguen run...@gmail.com wrote: On Sep 24, 2013, at 2:48 AM, Bjoern Teipel bjoern.tei...@internetbrands.com wrote: A question came up if LXC might be useful for cloudstack and I personally agree that's a pretty interesting product for all those internet guys like me who runs their hardware to the extreme. I came today across an interesting podcast (http://www.theregister.co.uk/2013/08/01/speaking_in_tech_episode_69/) which covers also the announcement of Openstack and AWS API and they mentioned LXC support's being developed on. More info at http://tech.gilt.com/post/41713823209/adding-lxc-support-to-cloudstack So I hope we'll getting a new toy pretty soon … did you check the wiki link on that page: https://cwiki.apache.org/confluence/display/CLOUDSTACK/LXC+Support+in+Cloudstack I haven't tried it, but any user feedback would be great. Regards, Bjoern
RE: LXC
Openshift, to best of my knowledge, leverages advanced SELinux rules and not LXC for their cartridges. They presented on CCC13 and when asked why would you not run LXC instead, response was we don't think its mature enough... I don't know what to make of their response, but I guess being redhat they would know better. -Original Message- From: Teipel, Bjoern [mailto:bjoern.tei...@internetbrands.com] Sent: Tuesday, September 24, 2013 3:18 AM To: users@cloudstack.apache.org Cc: users@cloudstack.apache.org Subject: Re: LXC No I didn't try yet, but I will. Following the lxc and open shift projects right now and both are pretty interesting to me since they provide a pass feeling like Heroku On Sep 24, 2013, at 12:08 AM, Sebastien Goasguen run...@gmail.com wrote: On Sep 24, 2013, at 2:48 AM, Bjoern Teipel bjoern.tei...@internetbrands.com wrote: A question came up if LXC might be useful for cloudstack and I personally agree that's a pretty interesting product for all those internet guys like me who runs their hardware to the extreme. I came today across an interesting podcast (http://www.theregister.co.uk/2013/08/01/speaking_in_tech_episode_69/ ) which covers also the announcement of Openstack and AWS API and they mentioned LXC support's being developed on. More info at http://tech.gilt.com/post/41713823209/adding-lxc-support-to-cloudstac k So I hope we'll getting a new toy pretty soon ... did you check the wiki link on that page: https://cwiki.apache.org/confluence/display/CLOUDSTACK/LXC+Support+in + Cloudstack I haven't tried it, but any user feedback would be great. Regards, Bjoern