diff --git a/3rdparty/vagrant/README.md b/3rdparty/vagrant/README.md new file mode 100644 index 0000000000..334b8d9af7 --- /dev/null +++ b/3rdparty/vagrant/README.md @@ -0,0 +1,48 @@ +# Haiku Vagrant boxes + +> Haiku, Inc. has access to draft a new release at Vagrant + +https://app.vagrantup.com/haiku-os + +## Creating libvirt box + +Create base image: +```qemu-image -f qcow2 libvirt/box.img 8G``` + +Install Haiku: +```qemu-system-x86_64 --enable-kvm -hda libvirt/box.img -cdrom -m 1G``` + +Boot Haiku: +```qemu-system-x86_64 --enable-kvm -hda libvirt/box.img -m 1G``` + +Update software: +``` +pkgman update + +pkgman install vim +``` + +Install vagrant public key: +``` +mkdir ~/config/settings/ssh +wget https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub -O ~/config/settings/ssh/authorized_keys +chmod 700 ~/config/settings/ssh +chmod 600 ~/config/settings/ssh/authorized_keys +``` + +Rename "user" to "vagrant" by editing /etc/passwd. Change "user" to "vagrant" + +### Packaging libvirt + +``` +cd libvirt +tar cvzf ../libvirt.box * +``` + +## Creating VirtualBox box + +``` +qemu-image convert -f qcow2 -O vmdk libvirt/box.img virtualbox/box-0001.vmdk +cd virtualbox +tar cvzf ../virtualbox.box * +``` diff --git a/3rdparty/vagrant/Vagrantfile b/3rdparty/vagrant/Vagrantfile new file mode 100644 index 0000000000..087adab526 --- /dev/null +++ b/3rdparty/vagrant/Vagrantfile @@ -0,0 +1,7 @@ +# +# Example Vagrantfile to launch a haiku image +# +Vagrant.configure("2") do |config| + config.vm.box = "haiku-os/r1beta3-x86_64" + config.vm.box_version = "20220216" +end diff --git a/3rdparty/vagrant/libvirt/Vagrantfile b/3rdparty/vagrant/libvirt/Vagrantfile new file mode 100644 index 0000000000..36dc2b7672 --- /dev/null +++ b/3rdparty/vagrant/libvirt/Vagrantfile @@ -0,0 +1,12 @@ +Vagrant.configure("2") do |config| + config.vm.provider :libvirt do |libvirt| + libvirt.driver = "kvm" + libvirt.host = "" + libvirt.memory = 1024 + libvirt.cpus = 2 + libvirt.input :type => "tablet", :bus => "usb" + libvirt.video_type = "qxl" + libvirt.graphics_type = "spice" + libvirt.machine_arch = "x86_64" + end +end diff --git a/3rdparty/vagrant/libvirt/box.img b/3rdparty/vagrant/libvirt/box.img new file mode 100644 index 0000000000..e69de29bb2 diff --git a/3rdparty/vagrant/libvirt/info.json b/3rdparty/vagrant/libvirt/info.json new file mode 100644 index 0000000000..668a434c9b --- /dev/null +++ b/3rdparty/vagrant/libvirt/info.json @@ -0,0 +1,4 @@ +{ + "author": "Haiku, Inc.", + "homepage": "https://haiku-os.org" +} diff --git a/3rdparty/vagrant/libvirt/metadata.json b/3rdparty/vagrant/libvirt/metadata.json new file mode 100644 index 0000000000..a791ee90fd --- /dev/null +++ b/3rdparty/vagrant/libvirt/metadata.json @@ -0,0 +1,5 @@ +{ +"provider" : "libvirt", +"format" : "qcow2", +"virtual_size" : 8 +} diff --git a/3rdparty/vagrant/virtualbox/Vagrantfile b/3rdparty/vagrant/virtualbox/Vagrantfile new file mode 100644 index 0000000000..f3479c3938 --- /dev/null +++ b/3rdparty/vagrant/virtualbox/Vagrantfile @@ -0,0 +1,11 @@ +Vagrant::Config.run do |config| + # This Vagrantfile is auto-generated by `vagrant package` to contain + # the MAC address of the box. Custom configuration should be placed in + # the actual `Vagrantfile` in this box. + config.vm.base_mac = "0800274992E3" +end + +# Load include vagrant file if it exists after the auto-generated +# so it can override any of the settings +include_vagrantfile = File.expand_path("../include/_Vagrantfile", __FILE__) +load include_vagrantfile if File.exist?(include_vagrantfile) diff --git a/3rdparty/vagrant/virtualbox/box-disk001.vmdk b/3rdparty/vagrant/virtualbox/box-disk001.vmdk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/3rdparty/vagrant/virtualbox/box.ovf b/3rdparty/vagrant/virtualbox/box.ovf new file mode 100755 index 0000000000..e4cbfefb16 --- /dev/null +++ b/3rdparty/vagrant/virtualbox/box.ovf @@ -0,0 +1,145 @@ + + + + + + + List of the virtual disks used in the package + + + + Logical networks used in the package + + Logical network used by this appliance. + + + + A virtual machine + + The kind of installed guest operating system + Other_64 + Other_64 + + + Virtual hardware requirements for a virtual machine + + Virtual Hardware Family + 0 + haiku-r1b3-x86_64 + virtualbox-2.2 + + + 2 virtual CPU + Number of virtual CPUs + 2 virtual CPU + 1 + 3 + 2 + + + MegaBytes + 1024 MB of memory + Memory Size + 1024 MB of memory + 2 + 4 + 1024 + + + 0 + sataController0 + SATA Controller + sataController0 + 3 + AHCI + 20 + + + 0 + usb + USB Controller + usb + 4 + 23 + + + 3 + false + sound + Sound Card + sound + 5 + ensoniq1371 + 35 + + + 0 + disk1 + Disk Image + disk1 + /disk/vmdisk1 + 6 + 3 + 17 + + + true + Ethernet adapter on 'NAT' + NAT + Ethernet adapter on 'NAT' + 7 + 10 + + + + Complete VirtualBox machine configuration in VirtualBox format + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/vagrant/virtualbox/info.json b/3rdparty/vagrant/virtualbox/info.json new file mode 100644 index 0000000000..668a434c9b --- /dev/null +++ b/3rdparty/vagrant/virtualbox/info.json @@ -0,0 +1,4 @@ +{ + "author": "Haiku, Inc.", + "homepage": "https://haiku-os.org" +} diff --git a/3rdparty/vagrant/virtualbox/metadata.json b/3rdparty/vagrant/virtualbox/metadata.json new file mode 100644 index 0000000000..d177b38b61 --- /dev/null +++ b/3rdparty/vagrant/virtualbox/metadata.json @@ -0,0 +1 @@ +{"provider":"virtualbox"} \ No newline at end of file