From b77833182305d05efd58910972adca9030585777 Mon Sep 17 00:00:00 2001 From: penguhyang Date: Tue, 2 Feb 2016 01:35:48 -0500 Subject: [PATCH 1/5] update document about the kvm --- .../manage_clusters/common/kvm/manage_vm.rst | 17 ++++++++++++++ .../ppc64le/virtual_machines/FAQ.rst | 19 ++++++++++++++-- .../references/man1/rmigrate.1.rst | 22 +++++++++++++++++-- xCAT-client/pods/man1/rmigrate.1.pod | 18 +++++++++++++-- 4 files changed, 70 insertions(+), 6 deletions(-) diff --git a/docs/source/guides/admin-guides/manage_clusters/common/kvm/manage_vm.rst b/docs/source/guides/admin-guides/manage_clusters/common/kvm/manage_vm.rst index 4c61f1dc4..438db3b25 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/kvm/manage_vm.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/kvm/manage_vm.rst @@ -234,3 +234,20 @@ Clone a VM "vm3" from the VM master "vm6" in detaching mode: :: #clonevm vm3 -b vm6 -d vm3: Cloning vm6.sda.qcow2 (currently is 1042.21875 MB and has a capacity of 4096MB) +Migrate the virtual machine +--------------------------- + +**Migrate** is an operation that executing migration of a guest VM between hosts/hypervisors. + +Note: The directory used for storing disk images has to be mounted from shared storage on both vmhosts/hypervisors. + +Migrate the VM "kvm1" to hypervisor "hyp02", which is managed by hypervisor "hyp01": :: + + #rmigrate kvm1 hyp02 + kvm1: migrated to hyp02 + +Migrate the VM "kvm1" to hypervisor "hyp02", which is already on host "hyp02": :: + + #rmigrate kvm1 hyp02 + kvm1: Guest is already on host hyp02 + diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/FAQ.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/FAQ.rst index cbc01fcd0..04214860b 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/FAQ.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/FAQ.rst @@ -11,8 +11,8 @@ VNC client complains the credentials are not valid **Solution**: Check whether the clocks on the hypervisor and headnode are synced -rpower fails with "qemu: could not open disk image /var/lib/xcat/pools/2e66895a-e09a-53d5-74d3-eccdd9746eb5/vmXYZ.sda.qcow2: Permission denied" ------------------------------------------------------------------------------------------------------------------------------------------------ +rpower fails with "Error: internal error Process exited while reading console log qemu: could not open disk image /var/lib/xcat/pools/2e66895a-e09a-53d5-74d3-eccdd9746eb5/vmXYZ.sda.qcow2: Permission denied" +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **Issue**: :: @@ -30,6 +30,21 @@ rpower fails with "qemu: could not open disk image /var/lib/xcat/pools/2e66895a- **Note**: For stateless hypervisor, please purge the VM by ``rmvm -p vm1``, reboot the hypervisor and then create the VM. +rpower fails with "Error: internal error: process exited while connecting to monitor qemu: could not open disk image /var/lib/xcat/pools/2e66895a-e09a-53d5-74d3-eccdd9746eb5/vmXYZ.sda.qcow2: Permission denied" +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + **Issue**: :: + + #rpower vm1 on + vm1: Error: internal error: process exited while connecting to monitor: 2016-02-03T08:28:54.104601Z qemu-system-ppc64: -drive file=/var/lib/xcat/pools/c7953a80-89ca-53c7-64fb-2dcfc549bd45/kvm106.sda.qcow2,if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=none: Could not open '/var/lib/xcat/pools/c7953a80-89ca-53c7-64fb-2dcfc549bd45/kvm106.sda.qcow2': Permission denied + + **Solution**: + Usually caused by policy in SELinux configuration. The solution is simply to disable SELinux on the vmhost/hypervisor by editing "/etc/selinux/config" and change the SELINUX line to SELINUX=disabled: :: + + SELINUX=disabled + + Then reboot the system and try to power on the VM again... + "Error: Cannot communicate via libvirt to kvmhost1" --------------------------------------------------- diff --git a/docs/source/guides/admin-guides/references/man1/rmigrate.1.rst b/docs/source/guides/admin-guides/references/man1/rmigrate.1.rst index 63e42c57e..d7e3dfdb4 100644 --- a/docs/source/guides/admin-guides/references/man1/rmigrate.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rmigrate.1.rst @@ -34,7 +34,7 @@ For zVM: ******************* -\ **rmigrate**\ requests that a guest VM be moved from the current entity hosting it to another. It requests a live migration be done, if possible. +\ **rmigrate**\ requests that a guest VM be moved from the current entity hosting it to another. It requests a live migration be done, if possible. The directory used for storing disk images has to be mounted from shared storage on both vmhosts/hypervisors. For zVM: ======== @@ -95,10 +95,28 @@ This is used to determine the current host to migrate from. **************** +1. To migrate kvm guest "kvm1" to hypervisor "hyp02", which is managed by hypervisor "hyp01", enter: + +\ **rmigrate**\ \ *kvm1*\ \ *hyp02*\ + +Output is similar to: + .. code-block:: perl - rmigrate v1 n2 + kvm1: migrated to hyp02 + + +2. To migrate kvm guest "kvm1" to hypervisor "hyp02", which is already on host "hyp02", enter: + +\ **rmigrate**\ \ *kvm1*\ \ *hyp02*\ + +Output is similar to: + + +.. code-block:: perl + + kvm1: Guest is already on host hyp02 zVM specific: diff --git a/xCAT-client/pods/man1/rmigrate.1.pod b/xCAT-client/pods/man1/rmigrate.1.pod index 29d969a91..3ac1b34e2 100644 --- a/xCAT-client/pods/man1/rmigrate.1.pod +++ b/xCAT-client/pods/man1/rmigrate.1.pod @@ -12,7 +12,7 @@ B I [BI] [BI] [ =head1 B -B requests that a guest VM be moved from the current entity hosting it to another. It requests a live migration be done, if possible. +B requests that a guest VM be moved from the current entity hosting it to another. It requests a live migration be done, if possible. The directory used for storing disk images has to be mounted from shared storage on both vmhosts/hypervisors. =head2 For zVM: @@ -52,7 +52,21 @@ This is used to determine the current host to migrate from. =head1 B - rmigrate v1 n2 +1. To migrate kvm guest "kvm1" to hypervisor "hyp02", which is managed by hypervisor "hyp01", enter: + +B I I + +Output is similar to: + + kvm1: migrated to hyp02 + +2. To migrate kvm guest "kvm1" to hypervisor "hyp02", which is already on host "hyp02", enter: + +B I I + +Output is similar to: + + kvm1: Guest is already on host hyp02 =head2 zVM specific: From fb13e598f9efb2e7724c36e7e31f6c3afa41b1e9 Mon Sep 17 00:00:00 2001 From: penguhyang Date: Tue, 16 Feb 2016 22:02:13 -0500 Subject: [PATCH 2/5] improve document quality about the kvm --- .../manage_clusters/common/kvm/manage_vm.rst | 15 +++++--------- .../ppc64le/virtual_machines/FAQ.rst | 8 ++++---- .../references/man1/rmigrate.1.rst | 20 ++----------------- xCAT-client/pods/man1/rmigrate.1.pod | 12 ++--------- 4 files changed, 13 insertions(+), 42 deletions(-) diff --git a/docs/source/guides/admin-guides/manage_clusters/common/kvm/manage_vm.rst b/docs/source/guides/admin-guides/manage_clusters/common/kvm/manage_vm.rst index 438db3b25..273307a5b 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/kvm/manage_vm.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/kvm/manage_vm.rst @@ -234,20 +234,15 @@ Clone a VM "vm3" from the VM master "vm6" in detaching mode: :: #clonevm vm3 -b vm6 -d vm3: Cloning vm6.sda.qcow2 (currently is 1042.21875 MB and has a capacity of 4096MB) -Migrate the virtual machine ---------------------------- +Migrate Virtual Machines +------------------------ -**Migrate** is an operation that executing migration of a guest VM between hosts/hypervisors. +Virtual machine migration is a process that moves the virtual machines (guests) between different hypervisors (hosts). -Note: The directory used for storing disk images has to be mounted from shared storage on both vmhosts/hypervisors. +Note: The VM storage directory should be accessible from both hypervisors (hosts). -Migrate the VM "kvm1" to hypervisor "hyp02", which is managed by hypervisor "hyp01": :: +Migrate the VM "kvm1" from hypervisor "hyp01" to hypervisor "hyp02": :: #rmigrate kvm1 hyp02 kvm1: migrated to hyp02 -Migrate the VM "kvm1" to hypervisor "hyp02", which is already on host "hyp02": :: - - #rmigrate kvm1 hyp02 - kvm1: Guest is already on host hyp02 - diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/FAQ.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/FAQ.rst index 04214860b..394c42664 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/FAQ.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/virtual_machines/FAQ.rst @@ -30,20 +30,20 @@ rpower fails with "Error: internal error Process exited while reading console lo **Note**: For stateless hypervisor, please purge the VM by ``rmvm -p vm1``, reboot the hypervisor and then create the VM. -rpower fails with "Error: internal error: process exited while connecting to monitor qemu: could not open disk image /var/lib/xcat/pools/2e66895a-e09a-53d5-74d3-eccdd9746eb5/vmXYZ.sda.qcow2: Permission denied" +rpower fails with "Error: internal error: process exited while connecting to monitor qemu: could not open disk image /var/lib/xcat/pools/c7953a80-89ca-53c7-64fb-2dcfc549bd45/vmXYZ.sda.qcow2: Permission denied" ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- **Issue**: :: #rpower vm1 on - vm1: Error: internal error: process exited while connecting to monitor: 2016-02-03T08:28:54.104601Z qemu-system-ppc64: -drive file=/var/lib/xcat/pools/c7953a80-89ca-53c7-64fb-2dcfc549bd45/kvm106.sda.qcow2,if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=none: Could not open '/var/lib/xcat/pools/c7953a80-89ca-53c7-64fb-2dcfc549bd45/kvm106.sda.qcow2': Permission denied + vm1: Error: internal error: process exited while connecting to monitor: 2016-02-03T08:28:54.104601Z qemu-system-ppc64: -drive file=/var/lib/xcat/pools/c7953a80-89ca-53c7-64fb-2dcfc549bd45/vm1.sda.qcow2,if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=none: Could not open '/var/lib/xcat/pools/c7953a80-89ca-53c7-64fb-2dcfc549bd45/vm1.sda.qcow2': Permission denied **Solution**: - Usually caused by policy in SELinux configuration. The solution is simply to disable SELinux on the vmhost/hypervisor by editing "/etc/selinux/config" and change the SELINUX line to SELINUX=disabled: :: + Usually caused by SELinux policies. The solution is simply to disable SELinux on the vmhost/hypervisor by editing "/etc/selinux/config" and change the SELINUX line to SELINUX=disabled: :: SELINUX=disabled - Then reboot the system and try to power on the VM again... + Then reboot the hypervisor... "Error: Cannot communicate via libvirt to kvmhost1" --------------------------------------------------- diff --git a/docs/source/guides/admin-guides/references/man1/rmigrate.1.rst b/docs/source/guides/admin-guides/references/man1/rmigrate.1.rst index d7e3dfdb4..f119cf28d 100644 --- a/docs/source/guides/admin-guides/references/man1/rmigrate.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rmigrate.1.rst @@ -34,7 +34,7 @@ For zVM: ******************* -\ **rmigrate**\ requests that a guest VM be moved from the current entity hosting it to another. It requests a live migration be done, if possible. The directory used for storing disk images has to be mounted from shared storage on both vmhosts/hypervisors. +\ **rmigrate**\ requests that a guest VM to be moved from the current hypervisor to another. It will request a live migration if possible. The vmstorage directory should be shared between the source and destination hypervisors. For zVM: ======== @@ -95,30 +95,14 @@ This is used to determine the current host to migrate from. **************** -1. To migrate kvm guest "kvm1" to hypervisor "hyp02", which is managed by hypervisor "hyp01", enter: +1. To migrate kvm guest "kvm1" from hypervisor "hyp01" to hypervisor "hyp02", run: \ **rmigrate**\ \ *kvm1*\ \ *hyp02*\ -Output is similar to: - - -.. code-block:: perl - - kvm1: migrated to hyp02 - - 2. To migrate kvm guest "kvm1" to hypervisor "hyp02", which is already on host "hyp02", enter: \ **rmigrate**\ \ *kvm1*\ \ *hyp02*\ -Output is similar to: - - -.. code-block:: perl - - kvm1: Guest is already on host hyp02 - - zVM specific: ============= diff --git a/xCAT-client/pods/man1/rmigrate.1.pod b/xCAT-client/pods/man1/rmigrate.1.pod index 3ac1b34e2..083d2f9e9 100644 --- a/xCAT-client/pods/man1/rmigrate.1.pod +++ b/xCAT-client/pods/man1/rmigrate.1.pod @@ -12,7 +12,7 @@ B I [BI] [BI] [ =head1 B -B requests that a guest VM be moved from the current entity hosting it to another. It requests a live migration be done, if possible. The directory used for storing disk images has to be mounted from shared storage on both vmhosts/hypervisors. +B requests that a guest VM to be moved from the current hypervisor to another. It will request a live migration if possible. The vmstorage directory should be shared between the source and destination hypervisors. =head2 For zVM: @@ -52,22 +52,14 @@ This is used to determine the current host to migrate from. =head1 B -1. To migrate kvm guest "kvm1" to hypervisor "hyp02", which is managed by hypervisor "hyp01", enter: +1. To migrate kvm guest "kvm1" from hypervisor "hyp01" to hypervisor "hyp02", run: B I I -Output is similar to: - - kvm1: migrated to hyp02 - 2. To migrate kvm guest "kvm1" to hypervisor "hyp02", which is already on host "hyp02", enter: B I I -Output is similar to: - - kvm1: Guest is already on host hyp02 - =head2 zVM specific: =over 4 From b4d258c6285f4f6fb19fbf9583238cd0e4030a24 Mon Sep 17 00:00:00 2001 From: cxhong Date: Tue, 29 Mar 2016 11:21:24 -0400 Subject: [PATCH 3/5] Update rhels.rst --- docs/source/advanced/gpu/nvidia/osimage/rhels.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/advanced/gpu/nvidia/osimage/rhels.rst b/docs/source/advanced/gpu/nvidia/osimage/rhels.rst index 46fadda04..a39030f7a 100644 --- a/docs/source/advanced/gpu/nvidia/osimage/rhels.rst +++ b/docs/source/advanced/gpu/nvidia/osimage/rhels.rst @@ -4,7 +4,7 @@ RHEL 7.2 LE xCAT provides a sample package list (pkglist) files for CUDA. You can find them: * Diskful: ``/opt/xcat/share/xcat/install/rh/cuda*`` - * Diskless: ``/opt/xcat/share/xcat/install/rh/cuda*`` + * Diskless: ``/opt/xcat/share/xcat/netboot/rh/cuda*`` Diskful images --------------- From aee2b62c25af95e8410dafa401634116d7228031 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Tue, 29 Mar 2016 19:26:23 -0400 Subject: [PATCH 4/5] update the rst file to match the pod changes in pull request 850 --- docs/source/guides/admin-guides/references/man8/chtab.8.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/source/guides/admin-guides/references/man8/chtab.8.rst b/docs/source/guides/admin-guides/references/man8/chtab.8.rst index 408fa1c1e..64e90e0b1 100644 --- a/docs/source/guides/admin-guides/references/man8/chtab.8.rst +++ b/docs/source/guides/admin-guides/references/man8/chtab.8.rst @@ -37,6 +37,8 @@ DESCRIPTION The chtab command adds, deletes or updates the attribute value in the specified table.column for the specified keyvalue. Normally, the given value will completely replace the current attribute value. But if "+=" is used instead of "=", the specified value will be appended to the coma separated list of the attribute, if it is not already there. +The chtab is designed to work without passing xcatd, so it's out of control of policy mechanism. + ******* OPTIONS From 33ca59351aa47af0b11dd4cb57000ccbcefb56b6 Mon Sep 17 00:00:00 2001 From: caomengmeng Date: Wed, 30 Mar 2016 01:19:08 -0400 Subject: [PATCH 5/5] delete duplicated cases --- xCAT-test/autotest/testcase/xcatd/case0 | 133 ------------------------ 1 file changed, 133 deletions(-) diff --git a/xCAT-test/autotest/testcase/xcatd/case0 b/xCAT-test/autotest/testcase/xcatd/case0 index cb4600fc4..9dfdc93a8 100644 --- a/xCAT-test/autotest/testcase/xcatd/case0 +++ b/xCAT-test/autotest/testcase/xcatd/case0 @@ -131,136 +131,3 @@ check:output=~Error: Permission denied for request cmd:chtab name=root policy.commands= policy.rule=allow check:rc==0 end -start:xcatd_start -description:stop then start xcatd daemon, and check all the 6 processes are running -os:linux -cmd:service xcatd status -check:rc==0 -check:output=~xcatd service is running -cmd:service xcatd stop -check:rc==0 -cmd:sleep 3 -cmd:service xcatd start -check:rc==0 -check:output=~Starting xcatd -check:output=~[ OK ] -cmd:service xcatd status -check:rc==0 -check:output=~xcatd service is running -cmd:result=`ps -ef | grep "xcatd: SSL listener" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi -check:output=~only one process -cmd:result=`ps -ef | grep "xcatd: DB Access" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi -check:output=~only one process -cmd:result=`ps -ef | grep "xcatd: UDP listener" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi -check:output=~only one process -cmd:result=`ps -ef | grep "xcatd: install monitor" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi -check:output=~only one process -cmd:result=`ps -ef | grep "xcatd: Discovery worke" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi -check:output=~only one process -cmd:result=`ps -ef | grep "xcatd: Command log writer" | grep -v grep | wc -l`; if [ $result -eq 1 ]; then echo "only one process"; fi -check:output=~only one process -end - - -start:xcatd_stop -description:stop xcatd daemon, then check all the 6 processes are stopped -os:linux -cmd:service xcatd status -check:rc==0 -check:output=~xcatd service is running -cmd:service xcatd stop -check:rc==0 -check:output=~Stopping x(cat|CAT)d -check:output=~[ OK ] -cmd:sleep 3 -cmd:service xcatd status -check:output=~xcatd service is not running -cmd:ps -ef | grep xcatd -check:output!~"xcatd: SSL listener" -check:output!~"xcatd: DB Access" -check:output!~"xcatd: UDP listener" -check:output!~"xcatd: install monitor" -check:output!~"xcatd: Discovery worke" -check:output!~"xcatd: Command log writer" -cmd:service xcatd start -check:rc==0 -end - -start:xcatd_restart -description:restart xcatd daemon -os:linux -cmd:service xcatd status -check:output=~xcatd service is running -check:rc==0 -cmd:times=10; while [ $times -gt 0 ]; do service xcatd restart; if [ "$?" -ne "0" ]; then break; fi; ((times--)); done; if [ $times -gt 0 ]; then $?=1; fi -check:rc==0 -cmd:service xcatd status -check:output=~xcatd service is running -check:rc==0 -end - -start:run_command_with_XCATBYPASS -description:with XCATBYPASS=YES, the command works either xcatd deamon running or not -os:linux -cmd:service xcatd status -check:rc==0 -check:output=~xcatd service is running -cmd:XCATBYPASS=YES tabdump site -check:rc==0 -cmd:service xcatd stop -check:rc==0 -check:output=~Stopping x(cat|CAT)d -check:output=~[ OK ] -cmd:sleep 3 -cmd:service xcatd status -check:output=~xcatd service is not running -cmd:tabdump site -check:rc!=0 -cmd:XCATBYPASS=YES tabdump site -check:rc==0 -cmd:service xcatd start -check:rc==0 -check:output=~Starting x(cat|CAT)d -check:output=~[ OK ] -cmd:service xcatd status -check:rc==0 -check:output=~xcatd service is running -end - -start:disable_root_permission_in_policy_table -description:disable root permission, only with XCATBYPASS=YES, the command works -os:linux -cmd:service xcatd status -check:rc==0 -check:output=~xcatd service is running -cmd:chtab name=root policy.rule=disable -check:rc==0 -cmd:lsdef -check:output=~Error: Permission denied for request -cmd:XCATBYPASS=YES lsdef -check:rc==0 -cmd:XCATBYPASS=YES chtab name=root policy.rule=allow -check:rc==0 -cmd:lsdef -check:rc==0 -end - -start:assign_certain_command_permission -description:assign root permission to certain command, only this command works -os:linux -cmd:service xcatd status -check:rc==0 -check:output=~xcatd service is running -cmd:lsdef -check:rc==0 -cmd:tabdump policy -check:rc==0 -cmd:chtab name=root policy.commands=lsdef policy.rule=allow -check:rc==0 -cmd:lsdef -check:rc==0 -cmd:tabdump policy -check:output=~Error: Permission denied for request -cmd:chtab name=root policy.commands= policy.rule=allow -check:rc==0 -end