mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 17:23:08 +00:00
polished based on comments.
This commit is contained in:
parent
6d2ce0ab53
commit
e85523c35e
@ -7,7 +7,7 @@ Create the Virtual Machine
|
||||
In this doc, we assume the powerKVM hypervisor host node001 is ready to use.
|
||||
|
||||
Create VM Node Definition
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
`````````````````````````
|
||||
|
||||
Define virtual machine vm1, add it to xCAT under the vm group, its ip is x.x.x.x, use makehost to add hostname and ip into /etc/hosts file: ::
|
||||
|
||||
@ -21,7 +21,7 @@ Update DNS with this new node: ::
|
||||
makedns -a
|
||||
|
||||
Define attributes for the VM
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
`````````````````````````````
|
||||
|
||||
Run the chdef command to change the following attributes for the vm1:
|
||||
|
||||
@ -107,37 +107,40 @@ Run the chdef command to change the following attributes for the vm1:
|
||||
/bin/cp -rf /tmp/iso/boot/grub/powerpc-ieee1275/elf.mod /tftpboot/boot/grub2/powerpc-ieee1275/
|
||||
|
||||
Make the VM under xCAT
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
``````````````````````
|
||||
|
||||
If vmstorage is on a nfs server or a device of hypervisor, for example ::
|
||||
|
||||
mkvm vm1
|
||||
|
||||
If create the virtual machine kvm1 with 20G hard disk from a large disk directory, for example ::
|
||||
If create the virtual machine vm1 with 20G hard disk from a large disk directory, for example ::
|
||||
|
||||
mkvm vm1 -s 20G
|
||||
|
||||
If the vm1 was created successfully, a hard disk file named vm1.hda.qcow2 can be found in vmstorage location. And you can run the lsdef vm1 to see whether the mac attribute has been set automatically.
|
||||
If the vm1 was created successfully, a hard disk file named vm1.sda.qcow2 can be found in vmstorage location. And you can run the lsdef vm1 to see whether the mac attribute has been set automatically.
|
||||
|
||||
Create osimage object
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
After you download the OS ISO, refer to :ref:`create_img` to create osimage objects.
|
||||
|
||||
Configure DHCP
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
```````````````
|
||||
::
|
||||
|
||||
makedhcp -n
|
||||
makedhcp -a
|
||||
|
||||
Create osimage object
|
||||
``````````````````````````````
|
||||
|
||||
After you download the OS ISO, refer to :ref:`create_img` to create osimage objects.
|
||||
|
||||
|
||||
Prepare the VM for installation
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
```````````````````````````````````````
|
||||
::
|
||||
|
||||
nodeset vm1 osimage=<osimage_name>
|
||||
|
||||
Start VM Installation
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
``````````````````````
|
||||
|
||||
::
|
||||
|
||||
@ -152,7 +155,7 @@ If the vm1 was powered on successfully, you can get following information when r
|
||||
|
||||
|
||||
Monitoring the Virtual Machine
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
``````````````````````````````
|
||||
|
||||
You can use console in xcat management node or kvm hypervisor to monitor the process.
|
||||
|
||||
@ -162,10 +165,9 @@ You can use console in xcat management node or kvm hypervisor to monitor the pro
|
||||
|
||||
* Use rcons/wcons on the xCAT management node to open text console: ::
|
||||
|
||||
cons=kvm
|
||||
chdef vm1 cons=kvm
|
||||
makeconservercf vm1
|
||||
rcons vm1
|
||||
wcons vm1
|
||||
|
||||
* Connecting to the virtual machine's vnc console
|
||||
|
||||
@ -176,7 +178,7 @@ You can use console in xcat management node or kvm hypervisor to monitor the pro
|
||||
vm1: textconsole: /dev/pts/0
|
||||
vm1: password: JOQTUtn0dUOBv9o3
|
||||
vm1: vidproto: vnc
|
||||
vm1: server: kvmhost1
|
||||
vm1: server: node001
|
||||
vm1: vidport: 5900
|
||||
|
||||
Note: Now just pick your favorite vnc client and connect to the hypervisor, using the password generated by "getrvidparms". If the vnc client complains the password is not valid, it is possible that your hypervisor and headnode clocks are out of sync! You can sync them by running "ntpdate <ntp server>" on both the hypervisor and the headnode.
|
||||
@ -226,16 +228,16 @@ In this mode, all the nodes will be attached to the vm master. Lesser disk space
|
||||
Create the vm master kvmm from a node (vm1) and make the original node kvm2 attaches to the new created vm master: ::
|
||||
|
||||
clonevm vm1 -t kvmm
|
||||
vm1: Cloning vm1.hda.qcow2 (currently is 1050.6640625 MB and has a capacity of 4096MB)
|
||||
vm1: Cloning of vm1.hda.qcow2 complete (clone uses 1006.74609375 for a disk size of 4096MB)
|
||||
vm1: Rebasing vm1.hda.qcow2 from master
|
||||
vm1: Rebased vm1.hda.qcow2 from master
|
||||
vm1: Cloning vm1.sda.qcow2 (currently is 1050.6640625 MB and has a capacity of 4096MB)
|
||||
vm1: Cloning of vm1.sda.qcow2 complete (clone uses 1006.74609375 for a disk size of 4096MB)
|
||||
vm1: Rebasing vm1.sda.qcow2 from master
|
||||
vm1: Rebased vm1.sda.qcow2 from master
|
||||
|
||||
After the performing, you can see the following entry has been added into the vmmaster table. ::
|
||||
|
||||
tabdump vmmaster
|
||||
name,os,arch,profile,storage,storagemodel,nics,vintage,originator,comments,disable
|
||||
"kvmm","rhels6","x86_64","compute","nfs://<storage_server_ip>/vms/kvm",,"br0","Tue Nov 23 04:18:17 2010","root",,
|
||||
"kvmm","<os>","<arch>","compute","nfs://<storage_server_ip>/vms/kvm",,"br0","<date>","root",,
|
||||
|
||||
Clone a new node vm2 from vm master kvmm: ::
|
||||
|
||||
@ -246,13 +248,13 @@ Clone a new node vm2 from vm master kvmm: ::
|
||||
Create a vm master that the original node detaches with the created vm master. ::
|
||||
|
||||
clonevm vm2 -t kvmmd -d
|
||||
vm2: Cloning vm2.hda.qcow2 (currently is 1049.4765625 MB and has a capacity of 4096MB)
|
||||
vm2: Cloning of vm2.hda.qcow2 complete (clone uses 1042.21875 for a disk size of 4096MB)
|
||||
vm2: Cloning vm2.sda.qcow2 (currently is 1049.4765625 MB and has a capacity of 4096MB)
|
||||
vm2: Cloning of vm2.sda.qcow2 complete (clone uses 1042.21875 for a disk size of 4096MB)
|
||||
|
||||
Clone the vm3 from the kvmmd with the detaching mode turn on: ::
|
||||
|
||||
clonevm vm3 -b kvmmd -d
|
||||
vm3: Cloning kvmmd.hda.qcow2 (currently is 1042.21875 MB and has a capacity of 4096MB)
|
||||
vm3: Cloning kvmmd.sda.qcow2 (currently is 1042.21875 MB and has a capacity of 4096MB)
|
||||
|
||||
FAQ
|
||||
---
|
||||
@ -275,9 +277,9 @@ FAQ
|
||||
**Issue**: When running command 'rpower kvm1 on', get the following error message: ::
|
||||
|
||||
kvm1: Error: unable to set user and group to '0:0'
|
||||
on '/var/lib/xcat/pools/27f1df4b-e6cb-5ed2-42f2-9ef7bdd5f00f/kvm1.hda.qcow2': Invalid argument:
|
||||
on '/var/lib/xcat/pools/27f1df4b-e6cb-5ed2-42f2-9ef7bdd5f00f/kvm1.sda.qcow2': Invalid argument:
|
||||
|
||||
**Solution**: try to figure out the nfs:// server was exported correctly. The nfs client should have root authority.
|
||||
**Solution**: try to figure out the ``nfs://<storage_server_ip>`` was exported correctly. The nfs client should have root authority.
|
||||
|
||||
3, VNC client complains the credentials are not valid
|
||||
|
||||
@ -285,14 +287,14 @@ FAQ
|
||||
|
||||
**Solution**: Check if the clocks on your hypervisor and headnode are in sync!
|
||||
|
||||
4, rpower fails with "qemu: could not open disk image /var/lib/xcat/pools/2e66895a-e09a-53d5-74d3-eccdd9746eb5/vmXYZ.hda.qcow2: Permission denied" error message
|
||||
4, rpower fails with "qemu: could not open disk image /var/lib/xcat/pools/2e66895a-e09a-53d5-74d3-eccdd9746eb5/vmXYZ.sda.qcow2: Permission denied" error message
|
||||
|
||||
**Issue**: When running rpower on a kvm vm, rpower complains with the following error message: ::
|
||||
|
||||
rpower vm1 on
|
||||
vm1: Error: internal error Process exited while reading console log output: char device redirected to /dev/pts/1
|
||||
qemu: could not open disk image /var/lib/xcat/pools/2e66895a-e09a-53d5-74d3-eccdd9746eb5/vm1.hda.qcow2: Permission denied: internal error Process exited while reading console log output: char device redirected to /dev/pts/1
|
||||
qemu: could not open disk image /var/lib/xcat/pools/2e66895a-e09a-53d5-74d3-eccdd9746eb5/vm1.hda.qcow2: Permission denied
|
||||
qemu: could not open disk image /var/lib/xcat/pools/2e66895a-e09a-53d5-74d3-eccdd9746eb5/vm1.sda.qcow2: Permission denied: internal error Process exited while reading console log output: char device redirected to /dev/pts/1
|
||||
qemu: could not open disk image /var/lib/xcat/pools/2e66895a-e09a-53d5-74d3-eccdd9746eb5/vm1.sda.qcow2: Permission denied
|
||||
[root@xcat xCAT_plugin]#
|
||||
|
||||
**Solution**: This might be caused by bad permissions in your NFS server / client (where clients will not mount the share with the correct permissions). Systems like CentOS 6 will have NFS v4 support activated by default. This might be causing the above mentioned problems so one solution is to simply disable NFS v4 support in your NFS server by uncommenting the following option in /etc/sysconfig/nfs: ::
|
||||
|
Loading…
x
Reference in New Issue
Block a user