qemu.tests.cpu_hotplug: Make cpu hotplug command configurable.

cpu_set command will be removed in new qemu. So make cpu hotplug
 command configurable.

'cpu_set 1 online' will always sent out as human monitor command no matter
 qmp support cpu_set or not.

Update it to 'cpu_set cpu=1,state=online'. send_args_cmd() will transfer
it to correct human monitor command 'cpu_set 1 online'. Or correct qmp
monitor command if qmp support it.

Signed-off-by: Feng Yang <fyang@redhat.com>
shared.deps.finish.bat: Add vds service start in finish.bat

Start this service to ignore diskpart failed in some windows guests
like win2003.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Acked-by: Xiaoqing Wei <xwei@redhat.com>
tests: Add a function for copy image from nfs when install failed

As this is a prepare case for test loops, we should make sure there
is a good image for the rest of the tests. So will copy images from nfs
if this case failed.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
shared.unattended: Make win2008r2 support key during installation.

Multiple Activation Key (MAK) could not work in 2008r2
 answer file in the WindowsPE phase of setup.
Always get following error:
The unattend answer file contains an invalid product key.
Either remove the invalid key or provide a valid product key in
 the unattend answer file to proceed with Windows Installation

So add key in Microsoft-Windows-Shell-Setup in component.
http://technet.microsoft.com/en-us/library/cc749389%28v=ws.10%29.aspx

Signed-off-by: Feng Yang <fyang@redhat.com>
Acked-by: Suqin Huang <shuang@redhat.com>
tests: Read serial output from the log file in unattended_install

Read serial output from vm.serial will loss infos when do migrate
operates. The migrate will start new session when boot up the dst
guest. And the infos from src guest will loss in checkout step.
This will cause the case can not get the finish strings. So use
serail log file to instead it.

changes from v1:
   - move fd.close to finally branch to ignore the multi open
     problem
changes from v2:
   - to ignore the try:except:finally problem in python 2.4
     use a old method.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Acked-by: Qingtang Zhou <qzhou@redhat.com>
tests: unattended_install: Fix serial log file path

The isa serial console's log file path is updated in commit
5e320327ecfb1ef25cc1656029b071a26ff1378d

So we need to update unattended_install as well.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>

Update the serial log path to fit both control mode and standard alone
mode.

Singed-off-by: Yiqiao Pu <ypu@redhat.com>
tests: unattended_install: Create missing serial log file

If the serial log file is missing, try to create an empty file
to avoid redundant warning msg.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
tests: Support copy iso file to local host in unattended_install.cdrom case.

This patch is useful for performance testing.
So comment it out by default.

Changes from v3:
Do not copy again, if file already there with same md5 value.
Changes from v2:
Check parameter available before using it.
Changes from v1:
Add copy_to_local parameter to set which file need copy to local host.

Signed-off-by: Feng Yang <fyang@redhat.com>
tests: Update the unattended install string update function

Make the Windows guests unattended files can support more type of
driver install.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
tests: Read driver id from inf file for Windows drivers

Update the driver id according the inf file of driver for virtio
drivers in Windows guests

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.utils_test: Update get_driver_hardware_id to ignore device is busy

Update get_driver_hardware_id to close the txt_file before umount the
driver disk for virtio drivers. Also update the re_hw_id.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
tests: Win guest unattended_install support latest driver

This patch modify win8 and win2012 using their own driver.
This patch also make windows unattended_install support
scsi disk and scsi cdrom.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
Acked-by: Suqin Huang <shuang@redhat.com>
test: Store the boot disk to results dir

Copy the boot disk to results dir for furthur debug especially for Windows
guests. You can configure it by the store_boot_disk, and this is disabled
by default.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
tests: Copy image when unattended install failed even in the start steps

We use unattended install in test loops as an image prepare case. So
we need it copy image from nfs if the case is failed. Otherwise the
following cases in the test loop will failed because the image is not
bootable.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
shared.unattended: Update the unattended files

Update the format of unattended files. Add some commands for
Windows test enviroment prepare. Also enlarge the Windows
image size to 30G as we will install more package inside the guests.

For the RHEL guests ks, we update some package that we needed. And
start X when guest booted up.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
test.cfg: Add some sub test in unattended install

Add some sub test in unattended install.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
tests.mac_change : change mac when the interface is active

this patch make the mac_change test support changing mac when the
interface is active
this patch also modify the method of get drive number of win_utils

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
Merge pull request #658 from humanux/mac_change_v1

tests.mac_change : change mac when the interface is active
qemu.tests.virtio_console: Raise correct exception

virtio_console catches exceptions and raises TestFail when unknown
exception occurs (because any Shell/... exception usually means
test failure.

Anyway it should raise TestError and TestNAError in case they occurs.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
share.cfg: disable xfstests on old RHEL OSes dont have xfs support

and add xfsprogs in RHEL-6 ks

Signed-off-by: Xiaoqing Wei <xwei@redhat.com>