Ubuntu preseed: Change the network and domain names

Change the default hostname and domain names to something
more palatable.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
unattended_install: Use fakeroot to remaster initrd

In order to install Ubuntu, we've been relying on cpio
directly. However, it needs root access for its operations.

So, in order to avoid failures when running as nonroot,
use fakeroot instead. This introduces a new dependency,
but hopefully it is not a huge one. And moreover, this
should only affect people looking to install Ubuntu or
Debian.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
guest support: Add Debian 6.0.7 x86_64

Introduce support to Debian 6.0.7 x86_64. I happened to
be working on a related subject, so I took the chance and
added support to it. It comes with a download asset file,
which means you can conveniently download it.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Guest support: Add Fedora 17 asset file

It's an older guest, but frequently useful for tests.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
qemu_vm: Make command logging copy+paste friendly

This logs the command as a single blog with properly escaped
line breaks, which allows copy+pasting the command. Helps for
manually reproducing a test.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Acked-by: Lukáš Doktor <ldoktor@redhat.com>
qemu: unittest: Tweak log message

quote the unittest name to make it more obvious when reading logs.

Acked-by: Lukáš Doktor <ldoktor@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
qemu: unittest: Adding -S is redundant

Since qemu_vm.py does it unconditionally. Adapt the code to handle
empty extra_params.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
qemu: unittest: Make missing build a SKIP, not ERROR

Acked-by: Lukáš Doktor <ldoktor@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
qemu: Add config for ./run --type qemu --test unittest

This allows the basic unittest config to be shared between

./run --type qemu --test unittest        and
./run --config qemu/cfg/unittests.cfg

While the latter may be the preferred invocation, I don't see any
reason to arbitrarily restrict things, especially when 'unittest'
shows up the --list-tests output.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
.gitignore: Ignore qemu/unittests

qemu/unittests symlink is required to run the 'unittest', so makes
sense to .gitignore it.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
virttest.qemu_vm: Raise VMConfigMissingError for 9p cfgs

The original VMCreateError exception arguments are incorrect.
And actually these 2 places should raise a VMConfigMissingError.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virttest.qemu_monitor: Implement MonitorConnectError class

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virttest.qemu_vm: Add missing definition of exception

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virttest.utils_test: get_linux_ifname - Make sys_method more robust

Sometimes, /sys/class/net may contain files (such as bonding_masters,
if the bonding module is loaded). So, let's handle the ShellCmdErrors
that might arise when trying to list the mac address of the interfaces.

Also, if no suitable interfaces were found, just return None.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.utils_test: get_linux_ifname - Introduce ip link method

Try to use ip link in case ifconfig didn't work. Looking
on /sys would be the last resource.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
libvirt tests.cfg: Remove OS definition

Since this prevents running things with the test runner
with other guests.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
fix of assigning multiple netdev_extra_params

Currently we added a comma for netdev_extra_params in framework,
if we want to add multiple parameters in more than one times,
we should not use comma prefix in first parameter string.

eg. add multiple parameters more than one times:
  netdev_extra_params = "vhost=on"
  netdev_extra_params += ",sndbuf=512"

This patch moved the comma out of framework, then we can
set the parameter conveniently. We don't care about if it's the
first assignment, just using comma prefix for all params strings.

Signed-off-by: Amos Kong <akong@redhat.com>
virt-libvirt: Be helpful with old-libvirt installs

Signed-off-by: Chris Evich <cevich@redhat.com>
virsh_unittest.py: Avoid failures when virsh is not installed

We shouldn't take the virsh bin for granted when running this
unittest. Use a trick similar to the one used in other test
and skip the test that depends on it directly.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virt: Allow virsh.resume to return CmdResult.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>