Replace -nodefconfig with -no-user-config.

This option was removed from qemu for no apparent reason except to
break existing consumers.  It does the same as -no-user-config, added
in May 2012, so use that instead.
This commit is contained in:
Richard W.M. Jones
2018-11-30 11:03:14 +00:00
parent cbe4150fbc
commit 9c8d133455
11 changed files with 15 additions and 15 deletions

View File

@@ -84,7 +84,7 @@ rm -f "$out"
# Boot the guest in qemu with a serial console. Allow it to run
# for a set amount of time, and then kill it.
$qemu \
-nodefconfig \
-no-user-config \
-display none \
-machine accel=kvm:tcg \
-m 1024 \

View File

@@ -70,7 +70,7 @@ main (int argc, char *argv[])
qemuopts_set_binary (qopts, "qemu-system-x86_64"));
CHECK_ERROR (-1, "qemuopts_add_flag",
qemuopts_add_flag (qopts, "-nodefconfig"));
qemuopts_add_flag (qopts, "-no-user-config"));
CHECK_ERROR (-1, "qemuopts_add_arg",
qemuopts_add_arg (qopts, "-m", "1024"));
CHECK_ERROR (-1, "qemuopts_add_arg_format",
@@ -116,7 +116,7 @@ main (int argc, char *argv[])
const char *expected =
"qemu-system-x86_64 \\\n"
" -nodefconfig \\\n"
" -no-user-config \\\n"
" -m 1024 \\\n"
" -smp 4 \\\n"
" -drive file=/tmp/foo,if=ide \\\n"
@@ -139,7 +139,7 @@ main (int argc, char *argv[])
actual_argv = qemuopts_to_argv (qopts));
const char *expected_argv[] = {
"qemu-system-x86_64",
"-nodefconfig",
"-no-user-config",
"-m", "1024",
"-smp", "4",
"-drive", "file=/tmp/foo,if=ide",

View File

@@ -196,7 +196,7 @@ last_option (struct qemuopts *qopts)
/**
* Add a command line flag which has no argument. eg:
*
* qemuopts_add_flag (qopts, "-nodefconfig");
* qemuopts_add_flag (qopts, "-no-user-config");
*
* Returns C<0> on success. Returns C<-1> on error, setting C<errno>.
*/

View File

@@ -139,7 +139,7 @@ virt-builder $osversion --arch $arch \
--selinux-relabel
# Run the guest.
qemu-system-x86_64 -nodefconfig -nodefaults -nographic \
qemu-system-x86_64 -no-user-config -nodefaults -nographic \
-no-reboot \
-machine accel=kvm:tcg \
-cpu host \

View File

@@ -49,7 +49,7 @@ disk=$tmpdir/guest.img
virt-builder rhel-6.8 --output $disk
# Boot the guest as if running with virt-p2v ISO in the CD drive.
qemu-system-x86_64 -nodefconfig -nodefaults \
qemu-system-x86_64 -no-user-config -nodefaults \
-no-reboot \
-machine accel=kvm:tcg \
-cpu host \

View File

@@ -116,7 +116,7 @@ rm -f $bat1 $bat2
# Adding a network device is not strictly necessary, but makes
# the Debian 7 guest happier.
$qemu \
-nodefconfig \
-no-user-config \
-display none \
-machine accel=kvm:tcg \
-m 2048 \

View File

@@ -98,7 +98,7 @@ system ("virt-builder", $guestname, "--quiet",
# Run qemu and make sure we get to the login prompt.
my $exp = Expect->spawn ($qemu,
"-nodefconfig", "-display", "none",
"-no-user-config", "-display", "none",
"-machine", "accel=kvm:tcg",
"-m", "1024", "-boot", "c",
"-drive", "file=$disk,format=raw,if=ide",

View File

@@ -123,7 +123,7 @@ virt-builder "$guestname" \
#
# Use IDE because some ancient guests don't support anything else.
$qemu \
-nodefconfig \
-no-user-config \
-display none \
-machine accel=kvm:tcg \
-m 2048 \

View File

@@ -480,8 +480,8 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
*/
arg ("-global", VIRTIO_DEVICE_NAME ("virtio-blk") ".scsi=off");
if (guestfs_int_qemu_supports (g, data->qemu_data, "-nodefconfig"))
flag ("-nodefconfig");
if (guestfs_int_qemu_supports (g, data->qemu_data, "-no-user-config"))
flag ("-no-user-config");
/* This oddly named option doesn't actually enable FIPS. It just
* causes qemu to do the right thing if FIPS is enabled in the

View File

@@ -78,7 +78,7 @@ cmdline="root=/dev/sda4 ro console=ttyS0 printk.time=1 p2v.server=10.0.2.2 p2v.p
# Run virt-p2v inside qemu.
$qemu \
-nodefconfig \
-no-user-config \
-display none \
-machine accel=kvm:tcg \
-m 2048 \

View File

@@ -195,7 +195,7 @@ construct_timeline (void)
/* Find where we run qemu. */
FIND_OPTIONAL ("qemu", LONG_ACTIVITY,
data->events[j].source == GUESTFS_EVENT_APPLIANCE &&
strstr (data->events[j].message, "-nodefconfig"),
strstr (data->events[j].message, "-no-user-config"),
data->events[k].source == GUESTFS_EVENT_CLOSE);
/* For the libvirt backend, connecting to libvirt, getting
@@ -259,7 +259,7 @@ construct_timeline (void)
/* From starting qemu up to entering the BIOS is the qemu overhead. */
FIND_OPTIONAL ("qemu:overhead", 0,
data->events[j].source == GUESTFS_EVENT_APPLIANCE &&
strstr (data->events[j].message, "-nodefconfig"),
strstr (data->events[j].message, "-no-user-config"),
data->events[k].source == GUESTFS_EVENT_APPLIANCE &&
strstr (data->events[k].message, FIRST_FIRMWARE_MESSAGE));