From 2f69722ec28b4ecdaa62fafbe5c5f3dd6af172e8 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 16 Mar 2015 14:23:43 +0800 Subject: [PATCH 1/7] Translating by ZTinoZ --- ...rtual Environment using Commandline Tools in Linux.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md index 19cddfb274..e3da1ec917 100644 --- a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md +++ b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md @@ -1,7 +1,6 @@ -Translating by ZTinoZ -How to Manage KVM Virtual Environment using Commandline Tools in Linux +如何在Linux中用命令行工具管理KVM虚拟环境 ================================================================================ -In this 4th part of our [KVM series][1], we are discussing KVM environment management using CLI. We use ‘virt-install’ CL tool to create and configure virtual machines, virsh CL tool to create and configure storage pools and qemu-img CL tool to create and manage disk images. +在我们[KVM系列专题][1]的第四部分,我们将会一起讨论下命令行界面下来管理KVM环境。We use ‘virt-install’ CL tool to create and configure virtual machines, virsh CL tool to create and configure storage pools and qemu-img CL tool to create and manage disk images. ![KVM Management in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/KVM-Management-in-Linux.jpg) KVM Management in Linux @@ -130,7 +129,7 @@ Booting Virtual Machine ![Installation of Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Installation-of-Virtual-Machine.jpeg) Installation of Virtual Machine -### Conclusion ### +### 结论 ### This is the latest part of our KVM tutorial, we haven’t covered everything of course. It a shot to scratch the KVM environment so its your turn to search and keep hands dirty using this nice resources. @@ -142,7 +141,7 @@ This is the latest part of our KVM tutorial, we haven’t covered everything of via: http://www.tecmint.com/kvm-management-tools-to-manage-virtual-machines/ 作者:[Mohammad Dosoukey][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From cb33d1666aaadb4f4c1a8031615debdc740f9f68 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 23 Mar 2015 17:59:31 +0800 Subject: [PATCH 2/7] Translating by ZTinoZ --- ...ual Environment using Commandline Tools in Linux.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md index e3da1ec917..cce8eb5688 100644 --- a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md +++ b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md @@ -1,15 +1,15 @@ 如何在Linux中用命令行工具管理KVM虚拟环境 ================================================================================ -在我们[KVM系列专题][1]的第四部分,我们将会一起讨论下命令行界面下来管理KVM环境。We use ‘virt-install’ CL tool to create and configure virtual machines, virsh CL tool to create and configure storage pools and qemu-img CL tool to create and manage disk images. +在我们[KVM系列专题][1]的第四部分,我们将会一起讨论下在命令行界面下来管理KVM环境。我们分别用‘virt-install’和virsh命令行工具来创建并配置虚拟机和存储池,用qemu-img命令行工具来创建并管理磁盘映像。 ![KVM Management in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/KVM-Management-in-Linux.jpg) -KVM Management in Linux +Linux系统的KVM管理 -There is nothing new concepts in this article, we just do the previous tasks using command line tools. There is no new prerequisite, just the same procedure, we have discussed in previous parts. +在这篇文章里没有什么新的概念,我们只是用命令行工具重复之前所做过的事情,也没有什么前提条件,都是相同的过程,之前的文章我们都讨论过。 -### Step 1: Configure Storage Pool ### +### 第一步: 配置存储池 ### -Virsh CLI tool is a management user interface for managing virsh guest domains. The virsh program can be used either to run one command by giving the command and its arguments on the shell command line. +Virsh命令行工具 CLI tool is a management user interface for managing virsh客户域 guest domains. The virsh program can be used either to run one command by giving the command and its arguments on the shell command line. In this section, we will use it to create storage pool for our KVM environment. For more information about the tool, use the following command. From 9b16eee344ab9740be1f03c800ef4e31938895d5 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 24 Mar 2015 11:52:15 +0800 Subject: [PATCH 3/7] Translating by ZTinoZ --- ...onment using Commandline Tools in Linux.md | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md index cce8eb5688..be433085c3 100644 --- a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md +++ b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md @@ -9,15 +9,15 @@ Linux系统的KVM管理 ### 第一步: 配置存储池 ### -Virsh命令行工具 CLI tool is a management user interface for managing virsh客户域 guest domains. The virsh program can be used either to run one command by giving the command and its arguments on the shell command line. +Virsh命令行工具是一款管理virsh客户域的用户界面。virsh程序能在命令行中运行所给的命令以及它的参数。 -In this section, we will use it to create storage pool for our KVM environment. For more information about the tool, use the following command. +本节中,我们要用它给我们的KVM环境创建存储池。想知道关于这个工具的更多信息,用以下这条命令。 # man virsh -**1. Using the command pool-define-as with virsh to define new storage pool, you need also to specify name, type and type’s arguments.** +**1. 用virsh带pool-define-as的命令来定义新的存储池,你需要指定名字、类型和类型参数。** -In our case, name will be Spool1, type will be dir. By default you could provide five arguments for the type: +本例中,我们将名字取为Spool1,类型为目录。默认情况下你可以提供五个参数给该类型: - source-host - source-path @@ -25,62 +25,62 @@ In our case, name will be Spool1, type will be dir. By default you could provide - source-name - target -For (Dir) type, we need the last argumet “target” to specify the path of storage pool, for the other arguments we could use “-” to unspecific them. +对于目录类型,我们需要用最后一个参数“target”来指定存储池的路径,其它参数项我们可以用“-”来填充。 # virsh pool-define-as Spool1 dir - - - - "/mnt/personal-data/SPool1/" ![Create New Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Create-New-Storage-Pool.png) -Create New Storage Pool +创建新存储池 -**2. To check the all storage pools you have in the environment, use the following command.** +**2. 查看环境中我们所有的存储池,用以下命令。** # virsh pool-list --all ![List All Storage Pools](http://www.tecmint.com/wp-content/uploads/2015/02/List-All-Storage-Pools.png) -List All Storage Pools +列出所有存储池 -**3. Now it’s time to build the storage pool, which we have defined above with the following command.** +**3. 现在是时候来构造存储池了,用以下命令来构造我们刚才定义的存储池。** # virsh pool-build Spool1 ![Build Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Build-Storage-Pool.png) -Build Storage Pool +构造存储池 -**4. Using the virsh command pool-start to active/enable the storage pool we have just created/built above.** +**4. 用virsh带pool-start的命令来激活并启动我们刚才创建并构造完成的存储池。** # virsh pool-start Spool1 ![Active Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Active-Storage-Pool.png) -Active Storage Pool +激活存储池 -**5. Check the status of environment storage pools using the following command.** +**5. 查看环境中存储池的状态,用以下命令。** # virsh pool-list --all ![Check Storage Pool Status](http://www.tecmint.com/wp-content/uploads/2015/02/Check-Storage-Pool-Status.png) -Check Storage Pool Status +查看存储池状态 -You will notice that the status of Spool1 converted to active. +你会发现Spool1的状态变成了已激活。 -**6. Configure Spool1 to start by libvirtd service every time automaticlly.** +**6. 对Spool1进行配置,让它每次都能被libvirtd服务自启动。** # virsh pool-autostart Spool1 ![Configure KVM Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Configure-Storage-Pool.png) -Configure KVM Storage Pool +配置KVM存储池 -**7. Finally lets display information about our new storage pool.** +**7. 最后来看看我们新的存储池的信息吧。** # virsh pool-info Spool1 ![Check KVM Storage Pool Information](http://www.tecmint.com/wp-content/uploads/2015/02/Check-Storage-Pool-Information.png) -Check KVM Storage Pool Information +查看KVM存储池信息 -Congratulations, Spool1 is ready to be used lets try to create storage volumes using it. +恭喜你,Spool1已经准备好待命,接下来我们试着创建存储卷来使用它。 -### Step 2: Configure Storage Volumes/Disk Images ### +### 第二步: 配置存储卷/磁盘映像 ### -Now it is disk image’s turn, using qemu-img to create new disk image from Spool1. For more details about qemy-img, use the man page. +现在轮到磁盘映像了,using qemu-img to create new disk image from Spool1. For more details about qemy-img, use the man page. # man qemu-img @@ -100,9 +100,9 @@ Check Storage Volume Information Now its time to create virtual machines in the next step. -### Step 3: Create Virtual Machines ### +### 第三步: 创建虚拟机 ### -10. Now with the last and latest part, we will create virtual machines using virt-istall. The virt-install is a command line tool for creating new KVM virtual machines using the “libvirt” hypervisor management library. For more details about it, use: +**10. Now with the last and latest part, we will create virtual machines using virt-istall. The virt-install is a command line tool for creating new KVM virtual machines using the “libvirt” hypervisor management library. For more details about it, use:** # man virt-install From 34cfb7e78f212cb3bfa591563c726c94b0aa77c1 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 24 Mar 2015 11:55:42 +0800 Subject: [PATCH 4/7] Translating by ZTinoZ --- ...e KVM Virtual Environment using Commandline Tools in Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md index be433085c3..7e47bac3bb 100644 --- a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md +++ b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md @@ -3,6 +3,7 @@ 在我们[KVM系列专题][1]的第四部分,我们将会一起讨论下在命令行界面下来管理KVM环境。我们分别用‘virt-install’和virsh命令行工具来创建并配置虚拟机和存储池,用qemu-img命令行工具来创建并管理磁盘映像。 ![KVM Management in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/KVM-Management-in-Linux.jpg) + Linux系统的KVM管理 在这篇文章里没有什么新的概念,我们只是用命令行工具重复之前所做过的事情,也没有什么前提条件,都是相同的过程,之前的文章我们都讨论过。 From bf30ebd317519848617aebe79772ffabcbe0a6bb Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 24 Mar 2015 15:07:32 +0800 Subject: [PATCH 5/7] Translating by ZTinoZ --- ...onment using Commandline Tools in Linux.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md index 7e47bac3bb..64ffeccad2 100644 --- a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md +++ b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md @@ -40,7 +40,7 @@ Virsh命令行工具是一款管理virsh客户域的用户界面。virsh程序 ![List All Storage Pools](http://www.tecmint.com/wp-content/uploads/2015/02/List-All-Storage-Pools.png) 列出所有存储池 -**3. 现在是时候来构造存储池了,用以下命令来构造我们刚才定义的存储池。** +**3. 现在我们来构造存储池了,用以下命令来构造我们刚才定义的存储池。** # virsh pool-build Spool1 @@ -81,46 +81,46 @@ Virsh命令行工具是一款管理virsh客户域的用户界面。virsh程序 ### 第二步: 配置存储卷/磁盘映像 ### -现在轮到磁盘映像了,using qemu-img to create new disk image from Spool1. For more details about qemy-img, use the man page. +现在轮到磁盘映像了,用qemu-img命令在Spool1中创建一个新磁盘映像。获取更多细节信息,可以查看man手册。 # man qemu-img -**8. We should specify the qemu-img command “create, check,….etc”, disk image format, the path of disk image you want to create and the size.** +**8. 我们应该在qemu-img命令之后指定“create, check,…”等等操作、磁盘映像格式、你想要创建的磁盘映像的路径和大小。** # qemu-img create -f raw /mnt/personal-data/SPool1/SVol1.img 10G ![Create Storage Volume](http://www.tecmint.com/wp-content/uploads/2015/02/Create-Storage-Volumes.png) -Create Storage Volume +创建存储卷 -**9. By using qemu-img command info, you could get information about your new disk image.** +**9. 通过使用带info的qemu-img命令,你可以获取到你的新磁盘映像的一些信息。** ![Check Storage Volume Information](http://www.tecmint.com/wp-content/uploads/2015/02/Check-Storage-Volume-Information.png) -Check Storage Volume Information +查看存储卷信息 -**Warning**: Never use qemu-img to modify images in use by a running virtual machine or any other process; this may destroy the image. +**警告**: 不要用qemu-img命令来修改被运行中的虚拟机或任何其它进程所正在使用的映像,那样映像会被破坏。 -Now its time to create virtual machines in the next step. +现在是时候来创建虚拟机了。 ### 第三步: 创建虚拟机 ### -**10. Now with the last and latest part, we will create virtual machines using virt-istall. The virt-install is a command line tool for creating new KVM virtual machines using the “libvirt” hypervisor management library. For more details about it, use:** +**10. 现在到最后一个环节了,在最后一步中,我们将用virt-istall命令来创建虚拟机。virt-install是一个用来创建新的KVM虚拟机命令行工具,它使用“libvirt”管理程序库。想获取更多细节,同样可以查看man手册。** # man virt-install -To create new KVM virtual machine, you need to use the following command with all the details like shown in the below. +要创建新的KVM虚拟机,你需要用到带以下所有信息的命令。 -- Name: Virtual Machine’s name. -- Disk Location: Location of disk image. -- Graphics : How to connect to VM “Usually be SPICE”. -- vcpu : Number of virtual CPU’s. -- ram : Amount of allocated memory in megabytes. -- Location : Specify the installation source path. -- Network : Specify the virtual network “Usually be vibr00 bridge”. +- Name: 虚拟机的名字。 +- Disk Location: 磁盘映像的位置。 +- Graphics : 怎样连接VM,通常是SPICE。 +- vcpu : 虚拟CPU的数量。 +- ram : 以兆字节计算的已分配内存大小。 +- Location : 指定安装源路径。 +- Network : 指定虚拟网络,通常是virbr0网桥。 # virt-install --name=rhel7 --disk path=/mnt/personal-data/SPool1/SVol1.img --graphics spice --vcpu=1 --ram=1024 --location=/run/media/dos/9e6f605a-f502-4e98-826e-e6376caea288/rhel-server-7.0-x86_64-dvd.iso --network bridge=virbr0 ![Create New Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Create-New-Virtual-Machines.png) -Create New Virtual Machine +创建新的虚拟机 **11. You will find also a pop-up virt-vierwer window appears to communicate with virtual machine through it.** From cbb77ef8b6fec1153153adce051ab21299c5e28e Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 25 Mar 2015 14:22:39 +0800 Subject: [PATCH 6/7] Translating by ZTinoZ --- ...ual Environment using Commandline Tools in Linux.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md index 64ffeccad2..3ece220dd5 100644 --- a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md +++ b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md @@ -103,7 +103,7 @@ Virsh命令行工具是一款管理virsh客户域的用户界面。virsh程序 ### 第三步: 创建虚拟机 ### -**10. 现在到最后一个环节了,在最后一步中,我们将用virt-istall命令来创建虚拟机。virt-install是一个用来创建新的KVM虚拟机命令行工具,它使用“libvirt”管理程序库。想获取更多细节,同样可以查看man手册。** +**10. 现在到最后一个环节了,在最后一步中,我们将用virt-install命令来创建虚拟机。virt-install是一个用来创建新的KVM虚拟机命令行工具,它使用“libvirt”管理程序库。想获取更多细节,同样可以查看man手册。** # man virt-install @@ -122,17 +122,17 @@ Virsh命令行工具是一款管理virsh客户域的用户界面。virsh程序 ![Create New Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Create-New-Virtual-Machines.png) 创建新的虚拟机 -**11. You will find also a pop-up virt-vierwer window appears to communicate with virtual machine through it.** +**11. 你会看到弹出一个virt-vierwer窗口,像是在通过它在与虚拟机通信。** ![Booting Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Booting-Virtual-Machine.jpeg) -Booting Virtual Machine +虚拟机启动程式 ![Installation of Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Installation-of-Virtual-Machine.jpeg) -Installation of Virtual Machine +虚拟机安装过程 ### 结论 ### -This is the latest part of our KVM tutorial, we haven’t covered everything of course. It a shot to scratch the KVM environment so its your turn to search and keep hands dirty using this nice resources. +以上就是我们KVM教程的最后一部分了,当然我们还没有完全覆盖到全部,我们只是打了个擦边球,所以现在该轮到你来好好地利用这些丰富的资源来做自己想做的事了。 - [KVM Getting Started Guide][2] - [KVM Virtualization Deployment and Administration Guide][3] From 4167a92860f6c4ad2d72a7360c239a0b5829e2bf Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 25 Mar 2015 14:23:59 +0800 Subject: [PATCH 7/7] Finish the translation by ZTinoZ --- ...ge KVM Virtual Environment using Commandline Tools in Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md (100%) diff --git a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/translated/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md similarity index 100% rename from sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md rename to translated/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md