virt: Run vm.pause/resume methond instead of call monitor cmd

Some cases call Monitor.cmd method directly, and they can't
work with qmp monitor, we need to make them call the wrapper
of monitor instead.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.kvm_monitor: Record all monitor message into a separated file

This patch record all monitor cmd/response in a seperated file,
so that we can analyse them easily.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt: Fix floppy image path for the old command line

The floppy image path in old format command line is not an abspath
which will cause some cases failed.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Fix the md5sum check issue

The "md5sum -c" will check the file which is md5sumed. in guest-os.cfg, it will hit a error,if we don't use the right
path
lyang0@lyang0-OptiPlex-755:~/community/autotest_upstream$ cd /bin && md5sum ls > /tmp/ls.md5 && cd /tmp && md5sum -c ls.md5
md5sum: ls: No such file or directory
ls: FAILED open or read
md5sum: WARNING: 1 of 1 listed file could not be read

Signed-off-by: Lei Yang <yanglei.fage@gmail.com>
virt: to test timer functionality of guest

This test implements the following github issue
https://github.com/autotest/autotest/issues/404

Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
boottool: get rid of DeprecationWarning messages

Get rid of DeprecationWarning messages on newer Python version while still
making it run on properly on Python 2.4

Signed-off-by: Cleber Rosa <crosa@redhat.com>
boottool: support instalation of grubby build dependencies

Signed-off-by: Cleber Rosa <crosa@redhat.com>
kvm.tests.time_manage: stress parameters fixup

cpu and io stress has been added to the host load command.

Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
Use -device for virtio-blk

Create virtio-blk devices using '-drive if=none,...' and
'-device virtio-blk-pci'.  Has the advantage that we can
support bootindex this way.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
bootindex support for ahci

pass on bootindex (if set) to ide drives hooked up via ahci.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
add option to switch from boot=on to bootindex

This adds a global switch 'use_bootindex' which will make autotest
use bootindex instead of boot=on when it sees image_boot=yes.  Needed
when testing upstream qemu as boot=on isn't supported there.

Unfortunaly there is no easy way to figure whenever qemu supports
boot=on or not, thus we need the inconvinient manual switch here.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Catch KeyError in BaseVM.del_nic()

Base_VM.add_nic() doesn't add mac to address_cache,
so when we delete call BaseVM.del_nic(), it is like this:
    del self.address_cache[nic_mac]
This may lead to KeyError. But BaseVM.del_nic() only catch IndexError.
So we should catch KeyError too.

And also, we should do delete the nic in virtnet before we delete it
from address_cache, in case we occur the KeyError.

Signed-off-by: Tang Chen <tanchen@cn.fujitsu.com>
boottool: add debug logging when running commands

Previous boottool versions logged every single command that was run,
but that was considered to be exceedingly verbose, because all of those
commands and output/return would show in *.DEBUG files. Now, when running
into bugs, we frequently have add log statements to the _run_* methods.

This patch checks an environment variable and logs debug messages if
it is set. I chose to keep that as an extra knob, as casual users
may want to see debug messages ('--verbose=5') but not every single
command run and it's output/return code.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
boottool: add checks and debug statements when running grubby

And the actual grubby path set is not valid.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
boottool: remove imp (black) magic

Now that the boottool app is properly named, that is, has a .py suffix.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
boottool: avoid instantiating boottool with invalid grubby path

Signed-off-by: Cleber Rosa <crosa@redhat.com>
virt: Fix the extra blank in readonly_floopy

Remove the extra blank

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Merge pull request #452 from ypu/remove_blank

virt: Fix the extra blank space in readonly_floopy
virt_utils: add a debug sentence in vnet_hdr_probe()

python 2.4 has a bug (http://bugs.python.org/issue1471),
fcntl.ioctl() in vnet_hdr_probe() always raises OverflowError
exception. This problem doesn't exist in python 2.6
This patch added a debug message in exception process path.

Signed-off-by: Amos Kong <akong@redhat.com>
virt: fix a typo in comment

Signed-off-by: Amos Kong <akong@redhat.com>