Skip to content

Commit 6fb410a

Browse files
authored
Merge pull request #189 from AtaxyaNetwork/makefile-fix
Change make dev to handle plugin auto install
2 parents 66c4508 + 920c828 commit 6fb410a

File tree

2 files changed

+16
-27
lines changed

2 files changed

+16
-27
lines changed

GNUmakefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
NAME=xenserver
2+
AUTHOR=vatesfr
23
BINARY=packer-plugin-${NAME}
34

45
COUNT?=1
@@ -11,9 +12,8 @@ build:
1112
@go build -o ${BINARY}
1213

1314
dev: build
14-
@mkdir -p ~/.packer.d/plugins/
15-
@mv ${BINARY} ~/.packer.d/plugins/${BINARY}
16-
15+
@packer plugin install --path ./${BINARY} "github.com/${AUTHOR}/${NAME}"
16+
1717
test:
1818
@go test -race -count $(COUNT) $(TEST) -timeout=3m
1919

README.md

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ This is a fork of the original builder since the original project was abandoned
77
It improves the original project in the following ways:
88
1. Developed alongside the [Xenorchestra terraform provider](https://github.com/vatesfr/terraform-provider-xenorchestra) to ensure the hashicorp ecosystem is interoperable.
99
2. Reimplements how the boot commands are sent over VNC to be compatible with later versions of Xenserver (Citrix hypervisor) and XCP-ng
10+
3. New feature are added on regular basics, following request made via issues or PR
1011

1112
## Status
1213

13-
At the time of this writing the packer builder has been verified to work with Xenserver 7.6 and can launch VMs with the packer output through the xenorchestra terraform provider.
14+
At the time of this writing (January 2026) the packer builder has been verified to work with XCP-ng 8.3 and we can create VMs with the templates built by this Packer plugin either through the xenorchestra terraform provider or using Xen Orchestra web UI.
1415

1516
The following list contains things that are incomplete but will be worked on soon:
1617

17-
- The documentation is still in an inconsistent state with upstream
1818
- XVA builder is untested
1919
- Lots of dead code to remove from upstream
2020

@@ -25,7 +25,7 @@ The packer builder can be installed via `packer init` as long as the packer temp
2525
packer {
2626
required_plugins {
2727
xenserver= {
28-
version = ">= v0.6.0"
28+
version = ">= v0.9.0"
2929
source = "github.com/vatesfr/xenserver"
3030
}
3131
}
@@ -38,8 +38,6 @@ The following command will install the packer plugin using the Ubuntu example pr
3838
packer init examples/ubuntu/ubuntu-2004.pkr.hcl
3939
```
4040

41-
If you are using an older version of packer or are still using json templates you will need to download the relevant release from the project's [releases page](https://github.com/vatesfr/packer-builder-xenserver/releases) and copy the binary to `~/.packer.d/plugins/packer-builder-xenserver-iso`.
42-
4341
## Developing the builder
4442

4543
### Dependencies
@@ -54,24 +52,19 @@ resulting binary.
5452

5553
Documentation for Plugins directory: [Official Docs](https://developer.hashicorp.com/packer/docs/configure#packer-s-plugin-directory)
5654

57-
### Linux/MacOS
58-
59-
```shell
60-
go build -o packer-plugin-xenserver
55+
To compile the plugin, you can use this commands:
6156

62-
# Add the plugin to the location packer expects it to be installed in
63-
mkdir -p ~/.packer.d/plugins/
64-
cp packer-plugin-xenserver ~/.packer.d/plugins
6557
```
58+
make build
59+
make dev
60+
```
61+
`make dev` should output
6662

67-
### Windows (Powershell)
68-
69-
```powershell
70-
go build -o packer-plugin-xenserver
71-
72-
mkdir "%APPDATA%\packer.d\plugins"
73-
cp packer-plugin-xenserver "%APPDATA%\packer.d\plugins"
7463
```
64+
Successfully installed plugin github.com/vatesfr/xenserver from <path>/packer-plugin-xenserver/packer-plugin-xenserver to ~/.packer.d/plugins/github.com/vatesfr/xenserver/packer-plugin-xenserver_v0.9.0-dev_x5.0_linux_amd64
65+
```
66+
67+
Then you can use your build file like usual.
7568

7669
# Documentation
7770

@@ -80,8 +73,4 @@ xenserver-iso docs](docs/builders/iso/xenserver-iso.html.markdown)
8073

8174
## Support
8275

83-
You can discuss any issues you have or feature requests in [Discord](https://discord.gg/ZpNq8ez).
84-
85-
If you'd like to support my effort on the project, please consider buying me a coffee
86-
87-
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/ddelnano)
76+
You can discuss any issues you have or feature requests directly on this repository, or on the [forum](https://xcp-ng.org/forum/).

0 commit comments

Comments
 (0)