Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 662697 Details for
Bug 884558
RFE: Add Hyper-V support to beaker
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Hyper-V power control script based on WS-MAN
hyper-v (text/plain), 2.71 KB, created by
Ladislav Jozsa
on 2012-12-12 23:23:33 UTC
(
hide
)
Description:
Hyper-V power control script based on WS-MAN
Filename:
MIME Type:
Creator:
Ladislav Jozsa
Created:
2012-12-12 23:23:33 UTC
Size:
2.71 KB
patch
obsolete
>#!/bin/bash ># ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ># ># hyper-v ># Description: Power control of Hyper-V guests via WS-MAN ># Author: Ladislav Jozsa <ljozsa@redhat.com> ># ># ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ># ># Copyright (c) 2012 Red Hat, Inc. All rights reserved. ># ># This copyrighted material is made available to anyone wishing ># to use, modify, copy, or redistribute it subject to the terms ># and conditions of the GNU General Public License version 2. ># ># This program is distributed in the hope that it will be ># useful, but WITHOUT ANY WARRANTY; without even the implied ># warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ># PURPOSE. See the GNU General Public License for more details. ># ># You should have received a copy of the GNU General Public ># License along with this program; if not, write to the Free ># Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ># Boston, MA 02110-1301, USA. ># ># ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >set -e > ># Do we have wsmancli installed? >rpm -q wsmancli &> /dev/null || echo "wsmancli needed. Please install it first" >&2 > ># Passed in variable check >[ -z $power_user ] && { echo '$power_user variable is not set' >&2; exit; } >[ -z $power_pass ] && { echo '$power_pass variable is not set' >&2; exit; } >[ -z $power_address ] && { echo '$power_address variable is not set' >&2; exit; } >[ -z $power_id ] && { echo '$power_id variable is not set' >&2; exit; } >[ -z $power_mode ] && { echo '$power_mode variable is not set' >&2; exit; } > ># Search for guest UUID >uuid=`wsman enumerate http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/* --username $power_user -p $power_pass -h $power_address --port 5985 -y basic --filter "select * from Msvm_ComputerSystem where Description = \"Microsoft Virtual Machine\" and ElementName = \"$power_id\"" -D http://schemas.microsoft.com/wbem/wsman/1/WQL --port 5985 | grep \<p:Name\> | sed 's/^[^>]*>\([^<]*\).*$/\1/'` > ># Execute given power action >if [[ $power_mode == "on" ]]; then > wsman invoke -a RequestStateChange -k RequestedState=2 "http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/Msvm_ComputerSystem?Name=$uuid,CreationClassName=Msvm_ComputerSystem" --username $power_user -p $power_pass -y basic -h $power_address --port 5985 > /dev/null >elif [[ $power_mode == "off" ]]; then > wsman invoke -a RequestStateChange -k RequestedState=3 "http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/Msvm_ComputerSystem?Name=$uuid,CreationClassName=Msvm_ComputerSystem" --username $power_user -p $power_pass -y basic -h $power_address --port 5985 > /dev/null >else > echo 'Invalid power operation' >&2; exit 1 >fi > >sleep 5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 884558
: 662697