On host[bash] $ cd ~ $ sudo apt-get lxc $ sudo mkdir /var/local/cgroup $ sudo vi /etc/fstab # add this line: # cgroup /var/local/cgroup cgroup defaults 0 0 $ sudo mount cgroup $ git clone https://github.com/phbaer/lxc-tools.git $ cd lxc-tools # change ubuntu mirror to http://cn.archive.ubuntu.com/ubuntu in the next screen $ sudo lxc-ubuntu create -n guestos001 # above command would take a long time like half or one hour $ sudo vi guestos001/config # change lxc.network.line = virbr0 # to setup a bridge between lxc container and guest os $ sudo apt-get install libvirt-bin # start and set root password $ sudo lxc-start -n guestos001 /bin/bash $ passwd # set password for root # close it from another host session $ sudo lxc-stop -n guestos001 # start it again $ sudo lxc-start -n guestos001 # the console will hang there no input accepted [/bash] On another session of host [bash] $ sudo lxc-console -n guestos001 # loggin with root and its password # Now you are in guestos # restart network, if neccessary $ sudo mkdir /var/run/network $ sudo /etc/init.d/networking restart # add user $ adduser pxiao --home /home/pxiao # set password # close it from an third session on host $ sudo lxc-close -n guestos001 [/bash]
Setup lxc container on ubuntu 10.04 (inside virtualbox)
原创mb61c29e71e2c20 ©著作权
©著作权归作者所有:来自51CTO博客作者mb61c29e71e2c20的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
删除Azure Container Registry中tag为null的容器镜像
但随着时间的推移和业务复杂性的增长,很多客户都会发现,ACR中的某些Repo内,显示的清单计数和实际的清单数量不一致的问题。一般出现这种问题的原因主要有一下几种:• 上传容器镜像时,没有规范的对容器镜像应用tag标签• 删除容器镜像时,没有规范的对容器镜像进行删除
Azure Kubernetes Container Container Regisitry -
Ubuntu 10.04 KVM
首先要配置br0 这个bridge 网卡模式,保证br0有ip eth0没有ipiface br0 inet static address 172.16.17.140  
KVM virt-install virt-manager