评分并提供意见反馈 :
华为采用机器翻译与人工审校相结合的方式将此文档翻译成不同语言,希望能帮助您更容易理解此文档的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 华为对于翻译的准确性不承担任何责任,并建议您参考英文文档(已提供链接)。
运行控制台上的程序
操作步骤
- 登录设备,进入LXC容器视图
# 登录设备,进入LXC容器视图,内容如下:
<Huawei> system-view Enter system view, return user view with Ctrl+Z. [Huawei] lxc [Huawei-lxc]
- 使能LXC容器
# 使能LXC容器
[Huawei-lxc] enable
- 创建LXC容器
# 创建LXC容器lxc0
[Huawei-lxc] container-create name lxc0 rootfs 502elxc [Huawei-lxc] save Warning: The current configuration will be written to the device. Are you sure to continue?[Y/N]:y It will take several minutes to save configuration file, please wait.......... .. Configuration file had been saved successfully Note: The configuration file will take effect after being activated
- 启动LXC容器
# 启动LXC容器lxc0
[Huawei-lxc] container-start lxc0
- 进入LXC容器控制台
# 进入LXC容器控制台
[Huawei-lxc] container-console lxc0 [Huawei-lxc] Connected to tty 1 Type <Ctrl+a q> to exit the console, <Ctrl+a Ctrl+ a> to enter Ctrl+a itself Debian GNU/Linux 8 huawei tty1 huawei login: root Password: Linux huawei 3.10.53-HULK2 #1 SMP PREEMPT Wed Jul 12 19:47:39 CST 2017 armv7l The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. root@huawei:~#
- 执行LXC容器控制台上的程序
# 执行容器内的程序uname
root@huawei:~# uname -a Linux huawei 3.10.53-HULK2 #1 SMP PREEMPT Wed Jul 12 19:47:39 CST 2017 armv7l GN U/Linux