<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LXC &#8211; NhanVPH&#039;s Blog</title>
	<atom:link href="https://blntech.io.vn/tag/lxc/feed/" rel="self" type="application/rss+xml" />
	<link>https://blntech.io.vn</link>
	<description></description>
	<lastBuildDate>Wed, 22 Apr 2026 06:43:39 +0000</lastBuildDate>
	<language>vi</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://blntech.io.vn/wp-content/uploads/2026/04/cropped-cropped-Logo-BLN-32x32.jpg</url>
	<title>LXC &#8211; NhanVPH&#039;s Blog</title>
	<link>https://blntech.io.vn</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Proxmox &#8211; Cấu Hình iGPU Passthrough Cho LXC Và Kích Hoạt HW Transcode Trên Plex</title>
		<link>https://blntech.io.vn/proxmox-cau-hinh-igpu-passthrough-cho-lxc-va-kich-hoat-hw-transcode-tren-plex/</link>
		
		<dc:creator><![CDATA[nhanvph]]></dc:creator>
		<pubDate>Wed, 22 Apr 2026 06:32:46 +0000</pubDate>
				<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[iGPU]]></category>
		<category><![CDATA[LXC]]></category>
		<category><![CDATA[Plex]]></category>
		<category><![CDATA[Proxmox]]></category>
		<guid isPermaLink="false">https://blntech.io.vn/?p=1922</guid>

					<description><![CDATA[Sau khi cài đặt Plex lên máy ảo LXC (Linux Container), mình nghiên cứu tiếp đến cách cấu hình Hardware Transcoding cho Plex [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Sau khi <strong>cài đặt Plex</strong> lên máy ảo LXC (Linux Container), mình nghiên cứu tiếp đến cách cấu hình Hardware Transcoding cho Plex để giảm tải cho CPU máy chủ.</p>



<p class="wp-block-paragraph">Mặc định, Plex sẽ sử dụng tài nguyên CPU cho tác vụ chuyển mã (Transcode) phim mỗi khi thiết bị phát không hỗ trợ mở trực tiếp (Direct Play) từ server. Việc này sẽ gây ảnh hưởng đến hiệu năng hoạt động của các máy ảo khác trong cùng hệ thống.</p>



<p class="wp-block-paragraph">Nếu máy tính được trang bị GPU rời hay iGPU (đồ hoạ tích hợp trên CPU Intel), chúng ta có thể cấu hình cho Plex sử dụng tính năng Hardware Acceleration để transcode phim bằng card màn hình để giảm tải cho CPU.</p>



<p class="wp-block-paragraph">Trong bài viết này, mình sẽ hướng dẫn cách cấu hình cho phép LXC Container sử dụng iGPU tích hợp trên CPU Intel để Plex tận dụng tính năng Quick Sync cho việc transcode phim.</p>



<h2 class="wp-block-heading">Yêu cầu chuẩn bị</h2>



<ul class="wp-block-list">
<li>Máy chủ trang bị CPU Intel đời Sandy Bridge (2011) trở về sau.</li>



<li>Máy ảo LXC Container đã được cài đặt sẵn Plex Media Server.</li>



<li>Tài khoản <strong><a href="https://www.plex.tv/plex-pass/" target="_blank" rel="noreferrer noopener">Plex Pass</a></strong>: để có thể sử dụng tính năng Hardward Transcoding trên Plex</li>
</ul>



<h2 class="wp-block-heading">Điều chỉnh thông số LXC</h2>



<p class="wp-block-paragraph">Mặc định Proxmox không cho phép LXC Container truy cập vào GPU của hệ thống. Chúng ta có thể kiểm tra bằng cách sử dụng lệnh <code><strong>vainfo</strong></code></p>



<p class="wp-block-paragraph">Cài đặt vainfo trong LXC</p>



<pre class="wp-block-preformatted"><code>sudo apt install vainfo</code></pre>



<p class="wp-block-paragraph">Gõ lệnh <code><strong>vainfo</strong></code>, hệ thống sẽ phản hồi lỗi error như dưới đây</p>



<pre class="wp-block-preformatted"><code>root@plex:~# vainfo<br>error: can't connect to X server!<br>error: failed to initialize display</code></pre>



<p class="wp-block-paragraph">Trong khi đó, nếu chạy lệnh <code><strong>vainfo</strong></code> trực tiếp trên Proxmox host, kết quả trả về như sau</p>



<pre class="wp-block-preformatted"><code>root@proxmox:~# vainfo<br>error: can't connect to X server!<br>libva info: VA-API version 1.10.0<br>libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so<br>libva info: va_openDriver() returns -1<br>libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so<br>libva info: Found init function __vaDriverInit_1_8<br>libva info: va_openDriver() returns 0<br>vainfo: VA-API version: 1.10 (libva 2.10.0)<br>vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 2.4.1<br>vainfo: Supported profile and entrypoints<br>      VAProfileMPEG2Simple            : VAEntrypointVLD<br>      VAProfileMPEG2Simple            : VAEntrypointEncSlice<br>      VAProfileMPEG2Main              : VAEntrypointVLD<br>      VAProfileMPEG2Main              : VAEntrypointEncSlice<br>      VAProfileH264ConstrainedBaseline: VAEntrypointVLD<br>      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice<br>      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP<br>      VAProfileH264ConstrainedBaseline: VAEntrypointFEI<br>      VAProfileH264ConstrainedBaseline: VAEntrypointStats<br>      VAProfileH264Main               : VAEntrypointVLD<br>      VAProfileH264Main               : VAEntrypointEncSlice<br>      VAProfileH264Main               : VAEntrypointEncSliceLP<br>      VAProfileH264Main               : VAEntrypointFEI<br>      VAProfileH264Main               : VAEntrypointStats<br>      VAProfileH264High               : VAEntrypointVLD<br>      VAProfileH264High               : VAEntrypointEncSlice<br>      VAProfileH264High               : VAEntrypointEncSliceLP<br>      VAProfileH264High               : VAEntrypointFEI<br>      VAProfileH264High               : VAEntrypointStats<br>      VAProfileH264MultiviewHigh      : VAEntrypointVLD<br>      VAProfileH264StereoHigh         : VAEntrypointVLD<br>      VAProfileVC1Simple              : VAEntrypointVLD<br>      VAProfileVC1Main                : VAEntrypointVLD<br>      VAProfileVC1Advanced            : VAEntrypointVLD<br>      VAProfileJPEGBaseline           : VAEntrypointVLD<br>      VAProfileJPEGBaseline           : VAEntrypointEncPicture<br>      VAProfileVP8Version0_3          : VAEntrypointVLD<br>      VAProfileHEVCMain               : VAEntrypointVLD</code></pre>



<p class="wp-block-paragraph">Để LXC có quyền truy cập vào iGPU, mình sẽ chỉnh sửa lại file cấu hình của LXC</p>



<p class="wp-block-paragraph">Truy cập vào Terminal của Proxmox host và gõ lệnh sau</p>



<pre class="wp-block-preformatted"><code>nano /etc/pve/lxc/&lt;container id>.conf</code></pre>



<p class="wp-block-paragraph">Bạn cần thay thế&nbsp;bằng id tương ứng của LXC đang cài Plex. Xem id trong giao diện quản lý Web của Proxmox.</p>



<p class="wp-block-paragraph">Nội dung của file sẽ tương tự như sau</p>



<pre class="wp-block-preformatted"><code>arch: amd64<br>cmode: shell<br>cores: 1<br>features: nesting=1<br>hostname: plex<br>memory: 1024<br>net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.0.1,hwaddr=E2:63:4F:3F:04:AC,ip=192.168.0.60/24,type=veth<br>onboot: 1<br>ostype: ubuntu<br>rootfs: local-lvm:vm-103-disk-0,size=8G<br>swap: 1024<br>unprivileged: 1</code></pre>



<p class="wp-block-paragraph">Thay thế thông số <code><strong>unprivileged</strong></code> từ <strong>1</strong> thành <strong>0</strong></p>



<p class="wp-block-paragraph">Thêm các dòng sau vào dưới cùng</p>



<p class="wp-block-paragraph">Áp dụng cho Proxmox 7.0 về sau</p>



<pre class="wp-block-preformatted"><code>lxc.cgroup2.devices.allow: c 226:0 rwm<br>lxc.cgroup2.devices.allow: c 226:128 rwm<br>lxc.cgroup2.devices.allow: c 29:0 rwm<br>lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir<br>lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file</code></pre>



<p class="wp-block-paragraph">Áp dụng cho Proxmox 6.4 hoặc cũ hơn</p>



<pre class="wp-block-preformatted"><code>lxc.cgroup.devices.allow: c 226:0 rwm<br>lxc.cgroup.devices.allow: c 226:128 rwm<br>lxc.cgroup.devices.allow: c 29:0 rwm<br>lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir<br>lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file</code></pre>



<p class="wp-block-paragraph">Toàn bộ nội dung sau khi chỉnh sửa sẽ như sau</p>



<pre class="wp-block-preformatted"><code>arch: amd64<br>cmode: shell<br>cores: 1<br>features: nesting=1<br>hostname: plex<br>memory: 1024<br>net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.0.1,hwaddr=E2:63:4F:3F:04:AC,ip=192.168.0.60/24,type=veth<br>onboot: 1<br>ostype: ubuntu<br>rootfs: local-lvm:vm-103-disk-0,size=8G<br>swap: 1024<br>unprivileged: 0<br>lxc.cgroup2.devices.allow: c 226:0 rwm<br>lxc.cgroup2.devices.allow: c 226:128 rwm<br>lxc.cgroup2.devices.allow: c 29:0 rwm<br>lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir<br>lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=fil</code>e</pre>



<p class="wp-block-paragraph">Lưu lại và thoát ra.</p>



<p class="wp-block-paragraph">Tiếp theo, mình sẽ truy cập vào LXC Container để tắt nó đi. Sau đó khởi động lại để các thay đổi cấu hình vừa chỉnh ở trên được áp dụng.</p>



<p class="wp-block-paragraph">Tắt LXC Container (gõ trong Terminal của LXC)</p>



<pre class="wp-block-preformatted"><code>sudo shutdown now</code></pre>



<p class="wp-block-paragraph">Mở LXC Container (gõ trong Terminal của Proxmox)</p>



<pre class="wp-block-preformatted"><code>pct start 103</code></pre>



<p class="wp-block-paragraph">Trong đó 103 là id của LXC Container. Hoặc bạn có thể sử dụng giao diện Web UI của Proxmox để khởi động LXC.</p>



<h2 class="wp-block-heading">Kiểm tra LXC có truy cập GPU chưa?</h2>



<p class="wp-block-paragraph">Sau khi LXC Container khởi động lại, mình sẽ truy cập vào Terminal của nó và kiểm tra lại lệnh <code><strong>vainfo</strong></code></p>



<pre class="wp-block-preformatted"><code>root@plex:~# vainfo<br>error: can't connect to X server!<br>libva info: VA-API version 1.7.0<br>libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so<br>libva info: Found init function __vaDriverInit_1_7<br>libva info: va_openDriver() returns 0<br>vainfo: VA-API version: 1.7 (libva 2.6.0)<br>vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 20.1.1 ()<br>vainfo: Supported profile and entrypoints<br>      VAProfileMPEG2Simple            : VAEntrypointVLD<br>      VAProfileMPEG2Main              : VAEntrypointVLD<br>      VAProfileH264Main               : VAEntrypointVLD<br>      VAProfileH264Main               : VAEntrypointEncSliceLP<br>      VAProfileH264High               : VAEntrypointVLD<br>      VAProfileH264High               : VAEntrypointEncSliceLP<br>      VAProfileJPEGBaseline           : VAEntrypointVLD<br>      VAProfileJPEGBaseline           : VAEntrypointEncPicture<br>      VAProfileH264ConstrainedBaseline: VAEntrypointVLD<br>      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP<br>      VAProfileVP8Version0_3          : VAEntrypointVLD<br>      VAProfileHEVCMain               : VAEntrypointVLD</code></pre>



<p class="wp-block-paragraph">Kết quả trả về giờ đã hiển thị các thông tin liên quan đến Intel iHD driver, cho thấy LXC đã có quyền truy cập vào GPU tích hợp trên CPU Intel để sử dụng tính năng Quick Sync khi Transcode.</p>



<h2 class="wp-block-heading">Cấu hình Transcoder trên Plex</h2>



<p class="wp-block-paragraph">Truy cập vào phần cấu hình trên Plex: Plex —&gt; Settings —&gt; Transcoder và bấm chọn hai mục [x] &nbsp;Use hardware acceleration when available và [x] &nbsp;Use hardware-accelerated video encoding</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="487" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-45-1024x487.png" alt="" class="wp-image-5681" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-45-1024x487.png 1024w, https://blntech.io.vn/wp-content/uploads/2026/04/image-45-300x143.png 300w, https://blntech.io.vn/wp-content/uploads/2026/04/image-45-768x365.png 768w, https://blntech.io.vn/wp-content/uploads/2026/04/image-45.png 1280w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">Bấm Save Changes để lưu lại.</p>



<p class="wp-block-paragraph">Lưu ý: 2 mục này chỉ xuất hiện nếu bạn đang sử dùng tài khoản&nbsp;<a href="https://www.plex.tv/plex-pass/" target="_blank" rel="noreferrer noopener">Plex Pass</a>&nbsp;trả phí. Còn sử dụng Plex miễn phí thì sẽ không thể kích hoạt tính năng Hardward Transcoding.</p>



<h2 class="wp-block-heading">Kiểm tra Transcoder có sử dụng iGPU?</h2>



<p class="wp-block-paragraph">Để kiểm tra xem Plex có tận dụng tính năng Quick Sync trên Intel GPU cho tác vụ Transcoder không, mình sẽ mở 1 phim trên iPhone và truy cập vào mục Playback Settings → Quality → Chọn Convert to 1080p HD (High) để ép Plex thực hiện Transcoding thay vì Streaming trực tiếp.</p>



<p class="wp-block-paragraph">Truy cập vào Plex Dashboard, nếu thấy xuất hiện chữ Transcode (hw) ở dòng Video nghĩa là Plex đang sử dụng tính năng Quick Sync của iGPU để chuyển mã phim</p>



<figure class="wp-block-image aligncenter size-large"><img decoding="async" width="1024" height="487" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-46-1024x487.png" alt="" class="wp-image-5682" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-46-1024x487.png 1024w, https://blntech.io.vn/wp-content/uploads/2026/04/image-46-300x143.png 300w, https://blntech.io.vn/wp-content/uploads/2026/04/image-46-768x365.png 768w, https://blntech.io.vn/wp-content/uploads/2026/04/image-46.png 1280w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">Kiểm tra CPU trên Proxmox, sẽ thấy CPU chạy nhẹ nhàng, không bị full load 90-100% như trước khi cấu hình chuyển mã bằng iGPU.</p>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="600" height="388" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-47.png" alt="" class="wp-image-5683" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-47.png 600w, https://blntech.io.vn/wp-content/uploads/2026/04/image-47-300x194.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></figure>



<p class="wp-block-paragraph">Vậy là yên tâm xem phim thoải mái. Không lo Proxmox bị sập vì CPU quá tải.</p>



<p class="wp-block-paragraph">Chúc bạn thực hiện thành công!</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph">Nguồn: thuanbui</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Proxmox &#8211; Phần 5 &#8211; Thiết Lập LXC (LinuX Container)</title>
		<link>https://blntech.io.vn/proxmox-phan-5-thiet-lap-lxc-linux-container/</link>
		
		<dc:creator><![CDATA[nhanvph]]></dc:creator>
		<pubDate>Wed, 22 Apr 2026 06:03:35 +0000</pubDate>
				<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[LXC]]></category>
		<category><![CDATA[Proxmox]]></category>
		<category><![CDATA[Seri Proxmox]]></category>
		<guid isPermaLink="false">https://blntech.io.vn/?p=1807</guid>

					<description><![CDATA[Bên cạnh tính năng tạo máy ảo KVM, Proxmox còn được tích hợp tính năng thiết lập và quản lý [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Bên cạnh tính năng tạo máy ảo KVM, Proxmox còn được tích hợp tính năng thiết lập và quản lý LXC (LinuX Container), công nghệ ảo hoá hệ điều hành đang rất phổ biến hiện nay.</p>



<p class="wp-block-paragraph"><a href="https://linuxcontainers.org/" target="_blank" rel="noreferrer noopener">LXC (<strong>L</strong>inu<strong>X</strong>&nbsp;<strong>C</strong>ontainer)</a>&nbsp;là giải pháp ảo hoá trên nền hệ điều hành cho phép nhiều hệ thống Linux cùng hoạt động trên một máy chủ vật lý, sử dụng chung Linux kernel.</p>



<p class="wp-block-paragraph">Để hiểu rõ hơn về LXC, bạn có thể xem lại bài viết LXC vs. Docker mình đã chia sẻ trước đây</p>



<p class="wp-block-paragraph">Bài viết: <strong><a href="https://blntech.io.vn/tim-hieu-ve-cong-nghe-ao-hoa-phan-2-ao-hoa-he-dieu-hanh-lxc-vs-docker/" data-type="post" data-id="1985" target="_blank" rel="noreferrer noopener">Ảo hoá hệ điều hành: LXC vs Docker</a></strong></p>



<p class="wp-block-paragraph">Bài viết này mình sẽ hướng dẫn cách thiết lập LXC trên môi trường ảo hoá Proxmox VE.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Hướng dẫn tạo LXC Container trên Proxmox" width="1200" height="675" src="https://www.youtube.com/embed/FtZfajB9S1Y?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<h2 class="wp-block-heading">I. Tải LXC Templates</h2>



<p class="wp-block-paragraph">Tương tự như khi thiết lập máy ảo KVM, bạn cần phải chuẩn bị sẵn nguồn cài đặt khi thiết lập LXC. Proxmox sử dụng cái mẫu cài đặt với tên gọi là CT Template. Bạn cần phải tải các mẫu CT Templates về Proxmox trước khi tạo LXC Container.</p>



<p class="wp-block-paragraph">Truy cập vào mục local storage → CT Templates → Bấm vào nút Templates</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="702" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-29-1024x702.png" alt="" class="wp-image-5655" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-29-1024x702.png 1024w, https://blntech.io.vn/wp-content/uploads/2026/04/image-29-300x206.png 300w, https://blntech.io.vn/wp-content/uploads/2026/04/image-29-768x527.png 768w, https://blntech.io.vn/wp-content/uploads/2026/04/image-29.png 1308w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">Proxmox đã thiết lập sẵn 1 kho CT Templates với rất nhiều các bản Linux distro cũng như các ứng dụng web được cấu hình sẵn. Bấm vào Template bạn cần và bấm nút Download để tải về.</p>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="702" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-30-1024x702.png" alt="" class="wp-image-5656" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-30-1024x702.png 1024w, https://blntech.io.vn/wp-content/uploads/2026/04/image-30-300x206.png 300w, https://blntech.io.vn/wp-content/uploads/2026/04/image-30-768x527.png 768w, https://blntech.io.vn/wp-content/uploads/2026/04/image-30.png 1308w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="821" height="521" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-31.png" alt="" class="wp-image-5657" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-31.png 821w, https://blntech.io.vn/wp-content/uploads/2026/04/image-31-300x190.png 300w, https://blntech.io.vn/wp-content/uploads/2026/04/image-31-768x487.png 768w" sizes="auto, (max-width: 821px) 100vw, 821px" /></figure>



<p class="wp-block-paragraph">Sau khi hoàn tất, các template sẽ xuất hiện trong mục CT Templates. Chúng ta đã có thể tạo LXC trên Proxmox.</p>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="702" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-32-1024x702.png" alt="" class="wp-image-5658" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-32-1024x702.png 1024w, https://blntech.io.vn/wp-content/uploads/2026/04/image-32-300x206.png 300w, https://blntech.io.vn/wp-content/uploads/2026/04/image-32-768x527.png 768w, https://blntech.io.vn/wp-content/uploads/2026/04/image-32.png 1308w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">II. Tạo LXC trên Proxmox</h2>



<p class="wp-block-paragraph">Truy cập vào giao diện Web UI của Proxmox, bấm vào nút Create CT trên Header (Proxmox gọi tắt Linux Container là CT)</p>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="721" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-33-1024x721.png" alt="" class="wp-image-5659" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-33-1024x721.png 1024w, https://blntech.io.vn/wp-content/uploads/2026/04/image-33-300x211.png 300w, https://blntech.io.vn/wp-content/uploads/2026/04/image-33-768x541.png 768w, https://blntech.io.vn/wp-content/uploads/2026/04/image-33.png 1274w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">1. General</h3>



<p class="wp-block-paragraph">Giữ nguyên thông số mặc định, mình chỉ thay đổi 2 thông số</p>



<ul class="wp-block-list">
<li>Hostname: nhập tên container</li>



<li>Password &amp; Confirm password: nhập mật khẩu dùng để quản lý container.</li>
</ul>



<p class="wp-block-paragraph">Bấm Next</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="734" height="524" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-34.png" alt="" class="wp-image-5660" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-34.png 734w, https://blntech.io.vn/wp-content/uploads/2026/04/image-34-300x214.png 300w" sizes="auto, (max-width: 734px) 100vw, 734px" /></figure>



<h3 class="wp-block-heading">2. Template</h3>



<ul class="wp-block-list">
<li>Template: chọn template bạn muốn cài đặt cho container.</li>
</ul>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="734" height="524" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-35.png" alt="" class="wp-image-5661" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-35.png 734w, https://blntech.io.vn/wp-content/uploads/2026/04/image-35-300x214.png 300w" sizes="auto, (max-width: 734px) 100vw, 734px" /></figure>



<h3 class="wp-block-heading">3. Disks</h3>



<ul class="wp-block-list">
<li>Disk size (GiB): giữ nguyên mặc định 8 GB hoặc thay đổi tuỳ ý bạn</li>
</ul>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="734" height="524" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-36.png" alt="" class="wp-image-5662" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-36.png 734w, https://blntech.io.vn/wp-content/uploads/2026/04/image-36-300x214.png 300w" sizes="auto, (max-width: 734px) 100vw, 734px" /></figure>



<h3 class="wp-block-heading">4. CPU</h3>



<p class="wp-block-paragraph">Thay đổi số CPU Cores tuỳ theo nhu cầu sử dụng. Mình giữ mặc định 1 Core</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="734" height="524" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-37.png" alt="" class="wp-image-5663" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-37.png 734w, https://blntech.io.vn/wp-content/uploads/2026/04/image-37-300x214.png 300w" sizes="auto, (max-width: 734px) 100vw, 734px" /></figure>



<h3 class="wp-block-heading">5. Memory</h3>



<p class="wp-block-paragraph">Bạn cần thay đổi dung lượng Memory tuỳ theo mục đích sử dụng.</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="734" height="524" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-38.png" alt="" class="wp-image-5664" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-38.png 734w, https://blntech.io.vn/wp-content/uploads/2026/04/image-38-300x214.png 300w" sizes="auto, (max-width: 734px) 100vw, 734px" /></figure>



<h3 class="wp-block-heading">6. Network</h3>



<ul class="wp-block-list">
<li>IPv4: chọn Static cấu hình IP tĩnh cho container dựa theo subnet của bạn.</li>



<li>IPv6: chọn Static và để mặc định None để vô hiệu hoá IPv6.</li>
</ul>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="734" height="524" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-39.png" alt="" class="wp-image-5665" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-39.png 734w, https://blntech.io.vn/wp-content/uploads/2026/04/image-39-300x214.png 300w" sizes="auto, (max-width: 734px) 100vw, 734px" /></figure>



<h3 class="wp-block-heading">7. DNS</h3>



<p class="wp-block-paragraph">Giữ nguyên thông số mặc định để sử dụng DNS của Proxmox.</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="734" height="524" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-40.png" alt="" class="wp-image-5666" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-40.png 734w, https://blntech.io.vn/wp-content/uploads/2026/04/image-40-300x214.png 300w" sizes="auto, (max-width: 734px) 100vw, 734px" /></figure>



<h3 class="wp-block-heading">8. Confirm</h3>



<p class="wp-block-paragraph">Kiểm tra lại toàn bộ thông số lần cuối. Bấm chọn Start after created để LXC tự động chạy sau khi tạo xong.</p>



<p class="wp-block-paragraph">Bấm Finish để tạo LXC Container mới.</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="734" height="524" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-41.png" alt="" class="wp-image-5667" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-41.png 734w, https://blntech.io.vn/wp-content/uploads/2026/04/image-41-300x214.png 300w" sizes="auto, (max-width: 734px) 100vw, 734px" /></figure>



<p class="wp-block-paragraph">Chờ vài phút cho Proxmox thiết lập Container. Khi hoàn thành, trong bảng thông báo sẽ hiện ra TASK OK. Bạn có thể tắt hộp thoại này để bắt đầu truy cập LXC Container.</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="814" height="514" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-42.png" alt="" class="wp-image-5668" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-42.png 814w, https://blntech.io.vn/wp-content/uploads/2026/04/image-42-300x189.png 300w, https://blntech.io.vn/wp-content/uploads/2026/04/image-42-768x485.png 768w" sizes="auto, (max-width: 814px) 100vw, 814px" /></figure>



<h2 class="wp-block-heading">III. Truy cập LXC Container</h2>



<p class="wp-block-paragraph">Do sử dụng chung nhân Linux kernel với host Proxmox nên LXC khởi động cực nhanh. Container khởi động gần như tức thời sau khi bấm nút Start – khởi động.</p>



<p class="wp-block-paragraph">Mình truy cập vào mục Console của LXC để vào giao diện dòng lệnh CLI. Mọi thao tác quản lý, cài đặt có thể thực hiện tại đây.</p>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="705" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-43-1024x705.png" alt="" class="wp-image-5669" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-43-1024x705.png 1024w, https://blntech.io.vn/wp-content/uploads/2026/04/image-43-300x207.png 300w, https://blntech.io.vn/wp-content/uploads/2026/04/image-43-768x529.png 768w, https://blntech.io.vn/wp-content/uploads/2026/04/image-43.png 1302w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">Mặc định sau khi thiết lập, LXC container sẽ khoá tính năng truy cập SSH của tài khoản&nbsp;<code>root</code>. Do đó, mình sẽ tạo thêm tài khoản sudo mới dùng để đăng nhập SSH</p>



<h3 class="wp-block-heading">1. Tạo tài khoản mới</h3>



<p class="wp-block-paragraph">Tạo tài khoản mới với tên đăng nhập&nbsp;<code>thuanbui</code>. Bạn nhớ thay thế bằng bất kỳ tên đăng nhập nào khác tuỳ thích.</p>



<pre class="wp-block-preformatted"><code>sudo adduser thuanbui</code></pre>



<p class="wp-block-paragraph">Hệ thống sẽ yêu cầu tạo mật khẩu và cung cấp thông tin cá nhân cho tài khoản mới. Nhớ tạo mật khẩu phức tạp (đừng dùng 123456 hay abcdef). Phần thông tin Full Name, Room Number,… bạn có thể để trống và Enter nhiều lần, sau đó chọn Y để xác nhận là xong</p>



<pre class="wp-block-preformatted"><code>Adding user `<strong>thuanbui</strong>' ...<br>Adding new group `<strong>thuanbui</strong>' (1002) ...<br>Adding new user `<strong>thuanbui</strong>' (1002) with group `<strong>thuanbui</strong>' ...<br>Creating home directory `<strong>/home/thuanbui</strong>' ...<br>Copying files from `/etc/skel' ...<br>New password:<br>Retype new password:<br>passwd: password updated successfully<br>Changing the user information for thuanbui<br>Enter the new value, or press ENTER for the default<br>        Full Name []: <strong>Thuan Bui</strong><br>        Room Number []:<br>        Work Phone []:<br>        Home Phone []:</code></pre>



<p class="wp-block-paragraph">Thêm tài khoản mới này vào group sudo. Group sudo là group có quyền quản trị trên Linux.</p>



<pre class="wp-block-preformatted"><code>sudo usermod -aG sudo <strong>thuanbui</strong></code></pre>



<p class="wp-block-paragraph">Để kiểm tra lại quyền sudo của tài khoản mới, đầu tiên cần chuyển qua dùng tài khoản mới này</p>



<pre class="wp-block-preformatted"><code>su - <strong>thuanbui</strong></code></pre>



<p class="wp-block-paragraph">Tiếp theo, gõ thử lệnh sau</p>



<pre class="wp-block-preformatted"><code>sudo ls -la /root</code></pre>



<p class="wp-block-paragraph">Nhập mật khẩu của tài khoản mà bạn đã tạo lúc nãy</p>



<pre class="wp-block-preformatted"><code>[sudo] password for thuanbui:</code></pre>



<p class="wp-block-paragraph">Kết quả nhận được như sau có nghĩa là tài khoản mới đã có quyền sudo, có thể cài đặt, cấu hình máy ảo thoải mái.</p>



<pre class="wp-block-preformatted"><code>thuanbui@ubuntu:~$ sudo ls -la /root
total 76836
drwx------  5 root root     4096 Jan 25 08:08 .
drwxr-xr-x 22 root root     4096 Jan 26 13:16 ..
-rw-------  1 root root     1315 Jan 26 13:16 .bash_history
-rw-r--r--  1 root root     3106 Dec  5  2019 .bashrc
drwx------  2 root root     4096 Jan 23 23:27 .cache
drwx------  3 root root     4096 Jan 25 08:08 .config
drwxr-xr-x  3 root root     4096 Jan 24 13:28 .local
-rw-r--r--  1 root root      161 Dec  5  2019 .profile
-rw-r--r--  1 root root 78640798 Jan 20 08:04 plexmediaserver_1.25.4.5426-eb46d070e_amd64.deb</code><small>Code language: YAML (yaml)</small></pre>



<h3 class="wp-block-heading">2. Kích hoạt Start at boot</h3>



<p class="wp-block-paragraph">Tính năng Start at boot sẽ cho phép LXC container tự động chạy mỗi khi Proxmox khởi động lại. Với các container nào cần thiết sử dụng 24/7, mình sẽ kích hoạt tính năng này để bảo đảm nó luôn luôn hoạt động mỗi khi Proxmox khởi động.</p>



<ol class="wp-block-list">
<li>Chọn LXC Container cần chỉnh bên Resource Tree</li>



<li>Chọn Options</li>



<li>Chọn Start at boot</li>



<li>Bấm Edit</li>



<li>Chọn Start at boot và bấm OK</li>
</ol>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="705" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-44-1024x705.png" alt="" class="wp-image-5670" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-44-1024x705.png 1024w, https://blntech.io.vn/wp-content/uploads/2026/04/image-44-300x207.png 300w, https://blntech.io.vn/wp-content/uploads/2026/04/image-44-768x529.png 768w, https://blntech.io.vn/wp-content/uploads/2026/04/image-44.png 1302w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">Vậy là xong. Bạn đã có trong tay 1 “máy ảo” LXC trên nền tảng Proxmox để tha hồ vọc vạch nghiên cứu.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph">Nguồn: thuanbui</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Tìm Hiểu Về Công Nghệ Ảo Hoá – Phần 2 &#8211; Ảo Hoá Hệ Điều Hành: LXC vs Docker</title>
		<link>https://blntech.io.vn/tim-hieu-ve-cong-nghe-ao-hoa-phan-2-ao-hoa-he-dieu-hanh-lxc-vs-docker/</link>
		
		<dc:creator><![CDATA[nhanvph]]></dc:creator>
		<pubDate>Wed, 22 Apr 2026 04:37:04 +0000</pubDate>
				<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[LXC]]></category>
		<guid isPermaLink="false">https://blntech.io.vn/?p=1985</guid>

					<description><![CDATA[Tiếp tục nghiên cứu về các công nghệ ảo hoá, bài viết này mình sẽ giới thiệu về các giải pháp [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Tiếp tục nghiên cứu về các công nghệ ảo hoá, bài viết này mình sẽ giới thiệu về các giải pháp ảo dựa trên nền hệ điều hành (OS-level virtualization).</p>



<h2 class="wp-block-heading">I. Ảo hoá nền hệ điều hành là gì?</h2>



<p class="wp-block-paragraph">Ảo hoá nền hệ điều hành (OS-level virtualization) là phương pháp ảo hoá được thực hiện trực tiếp trên nền hệ điều hành được cài đặt trên máy chủ vật lý. Công nghệ này tận dụng tính năng phân chia không gian người dùng (user space) trong nhân của hệ điều hành, tạo ra các hệ điều hành ảo riêng biệt.</p>



<p class="wp-block-paragraph">Các máy ảo trong công nghệ ảo hoá nền hệ điều hành (OS-level virtualization) thường được gọi là&nbsp;<strong>Container</strong>&nbsp;hoặc&nbsp;<strong>Instance</strong>, để phân biệt với tên gọi&nbsp;<strong>Virtual Machine</strong>&nbsp;trong công nghệ ảo hoá phần cứng Hardware-level virtualization.</p>



<h3 class="wp-block-heading">1. Ưu điểm</h3>



<ul class="wp-block-list">
<li><strong>Linh hoạt</strong>: Quản lý, cấp phát và chia sẻ tài nguyên hiệu quả hơn. Tài nguyên được chia sẻ linh hoạt giữa các container, không bị giới hạn tài nguyên “cứng” như virtual machine</li>



<li><strong>Tiết kiệm tài nguyên hệ thống</strong> vì không phải lãng phí tài nguyên (CPU, RAM, Storage) cho Hypvisor và hệ điều hành khách như khi dùng Virtual Machine.</li>



<li><strong>Hiệu năng</strong>: Hoạt động nhanh và mượt hơn vì chạy trực tiếp trên cùng một nhân hệ điều hành. Không phải thông qua thông qua Hypervisor và hệ điều hành khách như hình thức ảo hóa phần cứng.</li>
</ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="988" height="383" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-22.png" alt="" class="wp-image-5638" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-22.png 988w, https://blntech.io.vn/wp-content/uploads/2026/04/image-22-300x116.png 300w, https://blntech.io.vn/wp-content/uploads/2026/04/image-22-768x298.png 768w" sizes="auto, (max-width: 988px) 100vw, 988px" /></figure>



<h3 class="wp-block-heading">2. Nhược điểm</h3>



<ul class="wp-block-list">
<li><strong>Kém ổn định</strong>: Hiệu năng hoạt động của Container không ổn định nếu không quản lý hợp lý. Lý do vi tài nguyên hệ thống được chia sẻ giữa các Container, không được phân chia “cứng” như trên máy ảo Virtual Machine. Nếu 1 container chiếm dụng quá nhiều tài nguyên sẽ ảnh hưởng đến các container khác trong cùng hệ thống.</li>



<li><strong>Hạn chế lựa chọn</strong>: Không thể tạo ra máy ảo container sử dụng hệ điều hành khác với hệ điều hành Host.</li>
</ul>



<h2 class="wp-block-heading">II. Các công nghệ ảo hoá hệ điều hành</h2>



<p class="wp-block-paragraph">Các hệ điều hành phổ biến đều đang có những công nghệ ảo hoá OS-level virtualization khác nhau:</p>



<ul class="wp-block-list">
<li>Linux: <a href="https://openvz.org/" target="_blank" rel="noreferrer noopener"><strong>OpenVZ</strong></a>, <a href="http://linuxcontainers.org/" target="_blank" rel="noreferrer noopener"><strong>LXC</strong></a>, <a href="https://en.wikipedia.org/wiki/Singularity_(software)" target="_blank" rel="noreferrer noopener"><strong>Singularity</strong></a>, <a href="https://en.wikipedia.org/wiki/Linux-VServer" target="_blank" rel="noreferrer noopener"><strong>Linux-VServer</strong></a>…</li>



<li>BSD: <strong><a href="https://en.wikipedia.org/wiki/Vkernel" target="_blank" rel="noreferrer noopener">vkernel</a>, <a href="https://en.wikipedia.org/wiki/FreeBSD_jail" target="_blank" rel="noreferrer noopener">FreeBSD jail</a></strong>,…</li>



<li>Windows: <strong><a href="https://en.wikipedia.org/wiki/Sandboxie" target="_blank" rel="noreferrer noopener">Sandboxie</a>, <a href="https://turbo.net/" target="_blank" rel="noreferrer noopener">Turbo</a></strong>,…</li>



<li>Solaris: <a href="https://en.wikipedia.org/wiki/Solaris_Containers" target="_blank" rel="noreferrer noopener"><strong>Solaris Containers</strong></a></li>



<li>Cross-Platform (đa nền tảng): <a href="https://www.docker.com/" target="_blank" rel="noreferrer noopener"><strong>Docker</strong></a></li>
</ul>



<p class="wp-block-paragraph">Danh sách chi tiết các công nghệ ảo hoá hệ điều hành các bạn có thể tham khảo ở đây:&nbsp;<a href="https://en.wikipedia.org/wiki/OS-level_virtualization#Implementations" target="_blank" rel="noreferrer noopener">OS-level virtualization – Wikipedia</a>.</p>



<p class="wp-block-paragraph">Số lượng công nghệ ảo hoá hệ điều hành tuy nhiều nhưng trên thực tế hiện tại chỉ còn 2 công nghệ được sử dụng phổ biến trong ngành điện toán đám mây (cloud computing):&nbsp;<strong>LXC</strong>&nbsp;và&nbsp;<strong>Docker</strong>. OpenVZ đã từng được dùng phổ biến cách đây khoảng 8-10 năm nhưng sau đó dần bị thay thế bởi LXC.</p>



<p class="wp-block-paragraph">Do đó trong bài viết này mình chỉ tập trung giới thiệu về LXC và Docker.</p>



<h2 class="wp-block-heading">III. LXC là gì?</h2>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="650" height="350" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-23.png" alt="" class="wp-image-5639" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-23.png 650w, https://blntech.io.vn/wp-content/uploads/2026/04/image-23-300x162.png 300w" sizes="auto, (max-width: 650px) 100vw, 650px" /></figure>



<p class="wp-block-paragraph"><a href="http://linuxcontainers.org/" target="_blank" rel="noreferrer noopener">LXC (<strong>L</strong>inu<strong>X</strong>&nbsp;<strong>C</strong>ontainer)</a>&nbsp;là giải pháp ảo hoá trên nền hệ điều hành cho phép nhiều hệ thống Linux cùng hoạt động trên một máy chủ vật lý, sử dụng chung Linux kernel.</p>



<p class="wp-block-paragraph">LXC kết hợp hai tính năng đặc biệt của nhân Linux:&nbsp;<a rel="noreferrer noopener" href="https://en.wikipedia.org/wiki/Cgroups" target="_blank">cgroups</a>&nbsp;(cho phép giới hạn và ưu tiền tài nguyên hệ thống) và&nbsp;<a rel="noreferrer noopener" href="https://en.wikipedia.org/wiki/Linux_namespaces" target="_blank">namespace</a>&nbsp;(cho phép tạo phân vùng tài nguyên độc lập trên hệ điều hành) để tạo ra các môi trường ảo hoá (VE – Virtual Environment) để triển khai ứng dụng.</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="574" height="273" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-24.png" alt="" class="wp-image-5640" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-24.png 574w, https://blntech.io.vn/wp-content/uploads/2026/04/image-24-300x143.png 300w" sizes="auto, (max-width: 574px) 100vw, 574px" /></figure>



<p class="wp-block-paragraph">LXC là dự án mã nguồn mở (<a href="https://github.com/lxc/lxc" target="_blank" rel="noreferrer noopener">link Github</a>), được phát triển từ năm 2008. Hiện tại, nó đang được đóng góp bởi các tập đoàn lớn như Virtuozzo (công ty tạo ra OpenVZ), IBM và Google.</p>



<p class="wp-block-paragraph">Bên cạnh LXC, chúng ta còn có thêm&nbsp;<a href="https://linuxcontainers.org/lxd/introduction/" target="_blank" rel="noreferrer noopener">LXD</a>&nbsp;– công cụ quản lý container và máy ảo được cải tiến từ LXC. LXD được sáng tạo và phát triển bởi Canonical (công ty tạo ra hệ điều hành Ubuntu).</p>



<p class="wp-block-paragraph">LXC thường được dùng bởi các công ty Cloud Hosting để cung cấp các dịch vụ Hosting cao cấp. Trong đó có hai cái tên nổi tiếng là Kinsta và SiteGround.</p>



<h2 class="wp-block-heading">IV. Docker là gì?</h2>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="400" height="331" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-25.png" alt="" class="wp-image-5641" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-25.png 400w, https://blntech.io.vn/wp-content/uploads/2026/04/image-25-300x248.png 300w" sizes="auto, (max-width: 400px) 100vw, 400px" /></figure>



<p class="wp-block-paragraph">Docker là cung là một giải pháp ảo hóa nền hệ điều hành để cung cấp phần mềm được đóng gói dưới dạng Container.</p>



<p class="wp-block-paragraph">Docker được ra mắt vào năm 2013 với hình thức mã nguồn mở tên gọi Docker Engine. Thời điểm đó, Docker sử dụng LXC làm trình điều khiển cho container. Từ phiên bản 0.9, Docker đã thay thế LXC bằng trình điều khiển riêng với tên gọi&nbsp;<em>libcontainer.</em></p>



<p class="wp-block-paragraph">Trong khi thế mạnh của LXC là tạo môi trường ảo cho hệ điều hành, thế mạnh của Docker tạo ra môi trường ảo dành cho ứng dụng. Mỗi ứng dụng hoạt động độc lập trong một môi trường ảo (Docker container) tách biệt. Các container giao tiếp với nhau thông qua phần mềm điều khiển Docker Engine được cài trên hệ điều hành của máy chủ vật lý.</p>



<figure class="wp-block-image aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="818" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-26-1024x818.png" alt="" class="wp-image-5642" style="width:1024px;height:auto" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-26-1024x818.png 1024w, https://blntech.io.vn/wp-content/uploads/2026/04/image-26-300x240.png 300w, https://blntech.io.vn/wp-content/uploads/2026/04/image-26-768x614.png 768w, https://blntech.io.vn/wp-content/uploads/2026/04/image-26.png 1198w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption"><strong>Docker</strong></figcaption></figure>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="818" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-27-1024x818.png" alt="" class="wp-image-5643" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-27-1024x818.png 1024w, https://blntech.io.vn/wp-content/uploads/2026/04/image-27-300x240.png 300w, https://blntech.io.vn/wp-content/uploads/2026/04/image-27-768x614.png 768w, https://blntech.io.vn/wp-content/uploads/2026/04/image-27.png 1198w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption"><strong>Virtual Machine</strong></figcaption></figure>



<h3 class="wp-block-heading">Ưu điểm của Docker</h3>



<ul class="wp-block-list">
<li><strong>Cơ động</strong>: Ứng dụng được đóng gói trong Container giúp triển khai nhanh chóng trên mọi hệ thống, bảo đảm tính đồng nhất từ môi trường Development ra Production.</li>



<li><strong>Linh hoạt</strong>: Docker có thể được triển khai đa nền tảng Linux / Windows / Mac OS, trong khi LXC chỉ có thể triển khai trên Linux.</li>



<li><strong>Tối ưu tài nguyên</strong>: Docker Engine phân bố tài nguyên đến Container trực tiếp từ tài nguyên vật lý của Host, không phải thông qua hệ điều hành khách như khi sử dụng LXC. Do đó bạn có thể vận hành nhiều Docker Container hơn so với số lượng LXC Container trên cùng một máy chủ.</li>



<li><strong>Nhanh và nhỏ gọn</strong>: Bạn không cần phải thiết lập máy ảo mới để triển khai ứng dụng. Mọi thông số cấu hình của ứng dụng được tích hợp sẵn trong Docker container. Bạn có thể khởi động, tạm dừng hay khởi động lại container trong tích tắc.</li>
</ul>



<p class="wp-block-paragraph">Docker hiện nay đang được ứng dụng cực kỳ phổ biến trong ngành công nghiệp điện toán đám mây (Cloud Computing) nhờ vào sự hậu thuẫn của các tập đoàn công nghệ lớn: Netflix, Google, Redhat, IBM, Microsoft,…</p>



<figure class="wp-block-image aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="546" src="https://blntech.io.vn/wp-content/uploads/2026/04/image-28-1024x546.png" alt="" class="wp-image-5644" srcset="https://blntech.io.vn/wp-content/uploads/2026/04/image-28-1024x546.png 1024w, https://blntech.io.vn/wp-content/uploads/2026/04/image-28-300x160.png 300w, https://blntech.io.vn/wp-content/uploads/2026/04/image-28-768x410.png 768w, https://blntech.io.vn/wp-content/uploads/2026/04/image-28.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">V. Lựa chọn công nghệ ảo hoá</h2>



<p class="wp-block-paragraph">Nắm được sự khác nhau giữa các công nghệ ảo hoá sẽ giúp bạn lựa chọn dịch vụ phù hợp với nhu cầu sử dụng của mình.</p>



<ul class="wp-block-list">
<li>Nếu bạn đang cần sử dụng máy chủ ảo VPS, hãy chọn lựa các nhà cung cấp máy chủ ảo <strong>KVM</strong> / <strong>Xen</strong> để bảo đảm hiệu năng và sự ổn định. Đừng chọn LXC.</li>



<li>Nếu bạn cần thiết lập nhiều ứng dụng trên cùng một máy chủ ảo / máy chủ vật lý, hãy chọn <strong>Docker Container</strong> để đơn giản hoá việc cài đặt và cấu hình.</li>



<li>Nếu bạn cần thiết lập máy ảo Linux trong môi trường Homelab, LXC là lựa chọn tối ưu nhờ kích thước nhỏ gọn và khả năng tối ưu tài nguyên hệ thống.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph">Nguồn: thuanbui, Section, Docker, Redhat</p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
