Skip to content

Commit

Permalink
Update default config to compatible with QEMU 7.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gaozengqi committed Aug 1, 2022
1 parent d8cc4e9 commit 4442122
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@

* Fix port collision problem with default ssh port 2222.
* Export serial port to unix socket for debug.

# 0.1.9 (2022-08-01)

* Set default config for newer qemu (>=7.0.0)
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@ to control and provision machines using QEMU.

**Notes: test with Apple Silicon / M1 and CentOS / Ubuntu aarch64 image**

## Compatible with

Tested:

* MacOS >= 12.4
* QEMU >= 7.0.0
* CentOS (centos-7-aarch64-2009-4K)
* Ubuntu (see [Wiki](https://github.com/ppggff/vagrant-qemu/wiki) for detais)

Others:

* (MacOS < 12.4) + (QEMU >= 7.0.0) : update OS, or use QEMU 6.x
* QEMU 6.x: use following config:
```
config.vm.provider "qemu" do |qe|
qe.machine = "virt,accel=hvf,highmem=off"
qe.cpu = "cortex-a72"
end
```

## Features

* Import from a Libvirt vagrant box or qcow2 image
Expand Down
4 changes: 2 additions & 2 deletions lib/vagrant-qemu/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def merge(other)
def finalize!
@ssh_port = 50022 if @ssh_port == UNSET_VALUE
@arch = "aarch64" if @arch == UNSET_VALUE
@machine = "virt,accel=hvf,highmem=off" if @machine == UNSET_VALUE
@cpu = "cortex-a72" if @cpu == UNSET_VALUE
@machine = "virt,accel=hvf,highmem=on" if @machine == UNSET_VALUE
@cpu = "host" if @cpu == UNSET_VALUE
@smp = "2" if @smp == UNSET_VALUE
@memory = "4G" if @memory == UNSET_VALUE
@net_device = "virtio-net-device" if @net_device == UNSET_VALUE
Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-qemu/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module VagrantPlugins
module QEMU
VERSION = '0.1.8'
VERSION = '0.1.9'
end
end

0 comments on commit 4442122

Please sign in to comment.