Today I tested Fedora 25 Alpha under Windows 10 with VirtualBox from Oracle and packer.
The VirtualBox can be found here.
The packer software can be found here.
Because I used Vagrant from here used the default folder vagrant to test Fedora 25 Alpha , see tree command:
C:\HashiCorp\Vagrant\bin>tree
Folder PATH listing
Volume serial number is 0000003D 9A67:3A80
C:.
├───.vagrant
│ └───machines
│ └───default
│ └───virtualbox
├───build
│ └───Fedora_25_Alpha
└───packer_cache
I install VirtualBox the last version and I put packer.exe
into bin
folder.The packer use two config files:
- the
packer.config
- looks for %APPDATA%/packer.config
,if the file doesn't exist,
then Packer ignores it and just uses the default configuration;- the
packer.json
-I used fedora25alpha.json file for settings.My fedora25alpha.json file come with this settings:
{
"variables": {
"iso_location": "https://download.fedoraproject.org/pub/fedora/linux/releases/test/25_Alpha/Workstation/x86_64/iso",
"harddisk_size": "40960",
"vm_name": "Fedora_25_Alpha",
"outputfile": "Fedora_25_Alpha.box",
"compression": "6"
},
"builders": [{
"vm_name": "{{user `vm_name`}}",
"output_directory": "build/{{user `vm_name`}}",
"type": "virtualbox-iso",
"virtualbox_version_file": ".vbox_version",
"headless": false,
"guest_os_type": "Fedora_64",
"hard_drive_interface": "sata",
"disk_size": "{{user `harddisk_size`}}",
"iso_url": "{{user `iso_location`}}/Fedora-Workstation-netinst-x86_64-25-Alpha-1.2.iso",
"iso_checksum": "ba181dd271cda2ac709a4327258683bc3b6e5635a0fd69548dc6f957d25927d9",
"iso_checksum_type": "sha256",
"boot_wait": "12s",
"http_directory": "http",
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "1024"],
["modifyvm", "{{.Name}}", "--cpus", "1"]
],
"shutdown_command": "echo 'vagrant'|sudo -S /sbin/halt -h -p"
}],
"post-processors": [
{
"type": "vagrant",
"output": "build/{{user `outputfile`}}",
"compression_level": "{{user `compression`}}"
}
]
}
I add also the path to the Windows enviroment with powershell:
$env:PACKER_LOG=1
$env:PACKER_LOG_PATH="packerlog.txt"
You can also use the set command to do that.The next step is to use two commands for packer.
First command will validate your settings and the last command will start the virtualization process:
packer validate fedora25alpha.json
packer build fedora25alpha.json
The output of this is virtual running of Fedora 25 Alpha.