mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-14 02:10:23 +00:00
Remove trailing spaces in file docs/source/guides/admin-guides/manage_clusters/common/kvm/manage_vm.rst
This commit is contained in:
@ -20,10 +20,10 @@ Update DNS configuration and database: ::
|
||||
makedns -n
|
||||
makedns -a
|
||||
|
||||
Specify VM attributes
|
||||
Specify VM attributes
|
||||
`````````````````````
|
||||
|
||||
After the VM object is created, several key attributes need to be specified with ``chdef`` :
|
||||
After the VM object is created, several key attributes need to be specified with ``chdef`` :
|
||||
|
||||
1. the hardware management module, "kvm" for PowerKVM: ::
|
||||
|
||||
@ -34,21 +34,21 @@ After the VM object is created, several key attributes need to be specified with
|
||||
chdef vm1 vmcpus=2
|
||||
|
||||
3. the kvm hypervisor of the VM: ::
|
||||
|
||||
|
||||
chdef vm1 vmhost=kvmhost1
|
||||
|
||||
4. the virtual memory size, with the unit "Megabit". Specify 1GB memory to "vm1" here: ::
|
||||
|
||||
chdef vm1 vmmemory=1024
|
||||
|
||||
**Note**: For diskless node, the **vmmemory** should be at least 2048 MB, otherwise the node cannot boot up.
|
||||
**Note**: For diskless node, the **vmmemory** should be at least 2048 MB, otherwise the node cannot boot up.
|
||||
|
||||
5. Define the virtual network card, it should be set to the bridge "br0" which has been created in the hypervisor. If no bridge is specified, no network device will be created for the VM node "vm1": ::
|
||||
|
||||
chdef vm1 vmnics=br0
|
||||
|
||||
6. The **vmnicnicmodel** attribute is used to set the type and corresponding driver for the nic. If not set, the default value is 'virtio'.
|
||||
::
|
||||
::
|
||||
|
||||
chdef vm1 vmnicnicmodel=virtio
|
||||
|
||||
@ -72,7 +72,7 @@ After the VM object is created, several key attributes need to be specified with
|
||||
|
||||
chdef vm1 vmstorage=dir:///var/lib/libvirt/images
|
||||
|
||||
**Note**: The attribute **vmstorage** is only valid for diskful VM node.
|
||||
**Note**: The attribute **vmstorage** is only valid for diskful VM node.
|
||||
|
||||
8. Define the **console** attributes for VM: ::
|
||||
|
||||
@ -84,13 +84,13 @@ After the VM object is created, several key attributes need to be specified with
|
||||
|
||||
10. (optional)For assigning PCI devices to the VM, set **othersettings** value: ::
|
||||
|
||||
chtab node=vm1 vm.othersettings="devpassthrough:0000:01:00.2"
|
||||
chtab node=vm1 vm.othersettings="devpassthrough:0000:01:00.2"
|
||||
|
||||
Or: ::
|
||||
|
||||
chtab node=vm1 vm.othersettings="devpassthrough:pci_0000_01_00_2"
|
||||
|
||||
Take assigning SR-IOV VFs to the VM as an example:
|
||||
Take assigning SR-IOV VFs to the VM as an example:
|
||||
|
||||
* Use ``lspci`` to get VFs PCI from hypervisor: ::
|
||||
|
||||
@ -99,17 +99,17 @@ After the VM object is created, several key attributes need to be specified with
|
||||
0000:01:00.2 Infiniband controller: Mellanox Technologies MT27700 Family [ConnectX-4 Virtual Function]
|
||||
|
||||
* Set the VFs PCI into ``vm`` table on MN: ::
|
||||
|
||||
|
||||
chtab node=vm1 vm.othersettings="devpassthrough:0000:01:00.1,0000:01:00.2"
|
||||
|
||||
11. Set **netboot** attribute
|
||||
|
||||
* **[x86_64]** ::
|
||||
|
||||
|
||||
chdef vm1 netboot=xnba
|
||||
|
||||
* **[PPC64LE]** ::
|
||||
|
||||
|
||||
chdef vm1 netboot=grub2
|
||||
|
||||
Make sure "grub2" had been installed on the management node: ::
|
||||
@ -118,7 +118,7 @@ After the VM object is created, several key attributes need to be specified with
|
||||
grub2-xcat-1.0-1.noarch
|
||||
|
||||
|
||||
Make virtual machine
|
||||
Make virtual machine
|
||||
````````````````````
|
||||
|
||||
If **vmstorage** is a NFS mounted directory or a device on hypervisor, run ::
|
||||
@ -128,7 +128,7 @@ If **vmstorage** is a NFS mounted directory or a device on hypervisor, run ::
|
||||
To create the virtual machine "vm1" with 20G hard disk on a hypervisor directory, run ::
|
||||
|
||||
mkvm vm1 -s 20G
|
||||
|
||||
|
||||
When "vm1" is created successfully, a VM hard disk file with a name like "vm1.sda.qcow2" will be found in the location specified by **vmstorage**. What's more, the **mac** attribute of "vm1" is set automatically, check it with: ::
|
||||
|
||||
lsdef vm1 -i mac
|
||||
@ -145,14 +145,14 @@ or running the following command on the kvm hypervisor "kvmhost1" ::
|
||||
|
||||
#virsh list
|
||||
Id Name State
|
||||
--------------------------------
|
||||
--------------------------------
|
||||
6 vm1 running
|
||||
|
||||
|
||||
Monitoring the Virtual Machine
|
||||
``````````````````````````````
|
||||
|
||||
When the VM has been created and powered on, choose one of the following methods to monitor and access it.
|
||||
When the VM has been created and powered on, choose one of the following methods to monitor and access it.
|
||||
|
||||
* Open the console on kvm hypervisor: ::
|
||||
|
||||
@ -176,11 +176,11 @@ When the VM has been created and powered on, choose one of the following methods
|
||||
vm1: server: kvmhost1
|
||||
vm1: vidport: 5900
|
||||
|
||||
**Note**: Now just pick a favorite vnc client to connect the hypervisor, with the password generated by ``getrvidparms``. If the vnc client complains "the password is not valid", the reason might be that the hypervisor and headnode clocks are out of sync! Please try to sync them by running ``ntpdate <ntp server>`` on both the hypervisor and the headnode.
|
||||
**Note**: Now just pick a favorite vnc client to connect the hypervisor, with the password generated by ``getrvidparms``. If the vnc client complains "the password is not valid", the reason might be that the hypervisor and headnode clocks are out of sync! Please try to sync them by running ``ntpdate <ntp server>`` on both the hypervisor and the headnode.
|
||||
|
||||
|
||||
* Use wvid on management node
|
||||
|
||||
|
||||
Make sure **firewalld** service is stopped, disable it if not: ::
|
||||
|
||||
chkconfig firewalld off
|
||||
@ -212,14 +212,14 @@ Remove the definition of "vm1" and related storage: ::
|
||||
Clone the virtual machine
|
||||
-------------------------
|
||||
|
||||
**Clone** is an operation that creating a VM from an existed one by inheriting most of its attributes and data.
|
||||
**Clone** is an operation that creating a VM from an existed one by inheriting most of its attributes and data.
|
||||
|
||||
The general step of **clone** a VM is like this: first creating a **VM master** , then creating a VM with the newly created **VM master** in **attaching** or **detaching** mode.
|
||||
|
||||
|
||||
**In attaching mode**
|
||||
|
||||
In this mode, all the newly created VMs are attached to the VM master. Since the image of the newly created VM only includes the differences from the VM master, which requires less disk space. The newly created VMs can NOT run without the VM master.
|
||||
In this mode, all the newly created VMs are attached to the VM master. Since the image of the newly created VM only includes the differences from the VM master, which requires less disk space. The newly created VMs can NOT run without the VM master.
|
||||
|
||||
An example is shown below:
|
||||
|
||||
@ -233,7 +233,7 @@ Create the VM master "vm5" from a VM node "vm1": ::
|
||||
|
||||
The newly created VM master "vm5" can be found in the **vmmaster** table. ::
|
||||
|
||||
#tabdump vmmaster
|
||||
#tabdump vmmaster
|
||||
name,os,arch,profile,storage,storagemodel,nics,vintage,originator,comments,disable
|
||||
"vm5","<os>","<arch>","compute","nfs://<storage_server_ip>/vms/kvm",,"br0","<date>","root",,
|
||||
|
||||
|
Reference in New Issue
Block a user