Commit Graph

29 Commits

Author SHA1 Message Date
Mathieu Tortuyaux
35387cfdff
build_lib/qemu_tmpl: fix short-form warning
starting from qemu-6.0.0, options with short-form are deprecated.

```
$ ./flatcar_production_qemu.sh
qemu-system-x86_64: -fsdev local,id=conf,security_model=none,readonly,path=/tmp/flatcar-configdrive.gyqmdrQqfA: warning: short-form boolean option 'readonly' deprecated
Please use readonly=on instead
```

See this commit: ccd3b3b811

Signed-off-by: Mathieu Tortuyaux <mathieu@kinvolk.io>
2021-07-16 16:04:50 +02:00
Vincent Batts
d46b95ba29
Merge pull request #91 from kinvolk/vbatts/arm
qemu_template: use more cpus for ARM if available
2020-12-15 08:29:10 -05:00
Vincent Batts
ed7de96c1f
qemu_template: shell lint and update
Signed-off-by: Vincent Batts <vbatts@kinvolk.io>
2020-09-16 10:30:07 -04:00
Vincent Batts
a97df50696
qemu_template: use more cpus for ARM if available
But don't hog all `VM_NCPUS`, as we are still emulating them

Signed-off-by: Vincent Batts <vbatts@kinvolk.io>
2020-09-15 17:39:35 -04:00
Thilo Fromm
56341ea725 qemu_template.sh: update naming CoreOS -> Flatcar 2020-05-15 15:25:27 +02:00
Flatcar Buildbot
c7bbb2b1e2 2345.0.0 2019-12-04 14:59:11 +01:00
Flatcar Buildbot
1dad511f69 2317.0.1 2019-11-07 19:40:01 +01:00
David Michael
2467923d56 Remove arm64 from supported board operations 2018-10-25 16:00:09 +00:00
Benjamin Gilbert
1717709dbf build_library: avoid obsolete QEMU -net syntax
It's been deprecated since QEMU 0.12. Fixes warning on QEMU startup:

    qemu-system-x86_64: -net nic,vlan=0,model=virtio: 'vlan' is deprecated. Please use 'netdev' instead.
2018-05-15 17:33:27 -04:00
Benjamin Gilbert
72bd0b175b build_library: attach virtio-rng-pci device to QEMU VMs
Pass /dev/urandom through to QEMU VMs. (Not /dev/random, to avoid
draining the host's entropy.) This speeds initialization of VM entropy.
2018-05-15 17:22:24 -04:00
Dongsu Park
52214f533b build_library: fix a bug when setting a CDROM image
Setting `$VM_CDROM` in the qemu script does not work as expected when
installing Container Linux from the given bootable CDROM image. That's
probably because qemu-system-x86_64 expects another boot option `-boot
order=d` to be able to boot from the given CDROM drive. Let's specify
specify a `-boot` as well as `-drive` option for the given CDROM drive.
2018-03-12 21:38:42 +01:00
Geoff Levand
e76030e0e9 build_library: Update qemu script to run on arm64 machines
Signed-off-by: Geoff Levand <geoff@infradead.org>
2017-07-28 14:39:53 -07:00
Geoff Levand
5e94a55069 build_library: Add missing die function
Signed-off-by: Geoff Levand <geoff@infradead.org>
2017-07-28 14:39:53 -07:00
Alex Crawford
c93416caf2 build_library: support ignition in qemu template 2016-11-22 19:17:42 -08:00
Nick Owens
e0524264b9 build_library: generate pflash files for qemu_uefi from edk2-armvirt 2016-04-21 10:45:15 -07:00
Andrej Rosano
8ba400eca7 Add arm64 qemu image support
Allows image_to_vm.sh to build also arm64 qemu images.

Signed-off-by: Andrej Rosano <andrej@inversepath.com>
2015-09-17 14:16:18 +02:00
Michael Marineau
810ba021b7 vm_image_util: add qemu_uefi image type for easier testing 2014-11-05 15:53:17 -08:00
Michael Marineau
1a8b197659 qemu: adjust the meaning of the -s (simple) flag
My primary use case for this flag is to fix booting with UEFI firmware
which can have problems when mixed with KVM, adding kexec into the mix
doesn't help matters either. The current version of OVMF can boot from
virtio drives just fine so that is now enabled and KVM is disabled.

So the -s option can also mean sloooooooow but boots!
2014-09-07 09:58:51 -07:00
Michael Marineau
2a004f0081 qemu: set DHCP hostname based on image name and version
Provides an easy way to test this setting hostname from DHCP, most other
systems rely on it.
2014-07-21 16:43:48 -07:00
Michael Marineau
12c0008ad9 feat(qemu_template): Add support for user-provided configs.
A custom cloud config can be provided directly via -u or as an existing
config drive image via -c.
2014-04-11 18:06:18 -07:00
Michael Marineau
150ab005e0 feat(qemu_template): Provide SSH keys via config drive
Moving away from our old behavior of loading 'authorized_keys' on virtfs
volumes. Still using virtfs to avoid depending on mkisofs or similar.
2014-04-11 18:06:18 -07:00
Michael Marineau
0d0c7c7578 fix(qemu_template): Replace getopts with simple pattern matching.
The use of getopts was leading to conflicts between this script's short
options and qemu's long options. For example -serial was getting
interpreted as -s -- erial which is not very helpful.
2014-04-11 18:06:18 -07:00
Alex Polvi
0d3cd4b417 feat(iso): add iso image format to image_to_vm 2014-03-31 15:49:57 -07:00
Michael Marineau
11aabd7bd0 fix(vm_image_util): Do not generate a machine UUID.
If QEMU is given a uuid systemd will detect that and in turn use it for
the machine-id. This made the bug causing the machine-id to be always
re-generated on boot harder to notice since it didn't happen on QEMU.
2014-03-25 14:23:23 -07:00
Michael Marineau
066bd23df8 feat(vm_image_util): Rework the qemu wrapper script to work for PXE
Now the script can be used with a disk image or a kernel/initrd.
Using a disk with the PXE kernel should work too but haven't tried it.
2014-03-22 22:28:10 -07:00
Jeremiah Orem
84b94c97f7 qemu_template: == is a bashism, change to =. 2014-02-07 00:17:14 -08:00
Michael Marineau
12e0f8dddd fix(qemu): Enable all available CPU features and SMP by default 2014-01-17 00:23:24 -08:00
Michael Marineau
c6f20655db fix(qemu_template): Fix getopts usage in qemu wrapper script.
Previously shifts were added into the getopts loop to work around
differences between different sh implementations but that causes getopts
to end the loop early. Instead use an intermediate variable to work
around inconsistent OPTIND behavior and explicitly check for the --
separator. Tested in bash, dash, and ash.
2013-10-08 13:35:10 -07:00
Michael Marineau
0f84e3b05f feat(image_to_vm): Add new and improved qemu wrapper script.
This one is more automagical and sets up ssh keys from ssh-agent and the
user's home directory by default. Also adds an option for setting the
ssh port so it can be something other than 2222. Script should be
sufficiently portable, tested in bash, dash, and ash.
2013-08-18 19:43:07 -04:00