xenserver / packer-plugin-xenserver

A builder plugin for Packer.IO to support building Citrix Hypervisor images.
Mozilla Public License 2.0
101 stars 114 forks source link

packer build fails with API Error: NO_HOSTS_AVAILABLE #96

Closed suite800 closed 4 years ago

suite800 commented 6 years ago

I have an old Dell computer that has Citrix XenServer 6.5 and SP1 freshly installed. The packer command fails with the following error.

C:\GO\src\github.com\xenserver\packer-builder-xenserver\examples>packer build -debug centos-6.6-mine.json Debug mode enabled. Builds will not be parallelized. xenserver-iso output will be in this color.

==> xenserver-iso: XAPI client session established ==> xenserver-iso: Downloading or copying ISO xenserver-iso: Downloading or copying: http://archive.kernel.org/centos-vault/6.6/isos/x86_64/CentOS-6.6-x86_64-minimal. o ==> xenserver-iso: Starting HTTP server on port 8000 ==> xenserver-iso: Step: Upload VDI 'CentOS-6.6-x86_64-minimal.iso' ==> xenserver-iso: PUT 'https://192.168.0.17/import_raw_vdi?session_id=OpaqueRef%3Ae2b24d54-c436-58f9-380e-5515178a758f&task d=OpaqueRef%3A01f2c92a-24de-4318-9562-b8ab92b74c2c&vdi=OpaqueRef%3Aa5a7b22b-bb17-436b-ac2d-1031e94046e8' ==> xenserver-iso: Step: Create Instance ==> xenserver-iso: Created instance '1e6d17ed-2d17-f9a7-bf13-b75709e92422' ==> xenserver-iso: Step: Start VM Paused ==> xenserver-iso: Unable to start VM with UUID '1e6d17ed-2d17-f9a7-bf13-b75709e92422': API Error: [NO_HOSTS_AVAILABLE] ==> xenserver-iso: Destroying VM ==> xenserver-iso: Destroying VDI ==> xenserver-iso: Destroyed VDI 'CentOS-6.6-x86_64-minimal.iso' ==> xenserver-iso: Deleting output directory... Build 'xenserver-iso' errored: Build was halted.

==> Some builds didn't complete successfully and had errors: --> xenserver-iso: Build was halted.

==> Builds finished but no artifacts were created.

C:\GO\src\github.com\xenserver\packer-builder-xenserver\examples>

The json file is pretty vanilla. Only changed the hostname/password from the sample json file.

Thanks.

suite800 commented 6 years ago

I have been also trying with XenServer 6.2, 7.1, and 7.3. All failed as well with different issues. When I tried with XenServer 6.5 without SP1, it gets stuck right after importing the image.

asotirov0 commented 6 years ago

Had the same issue. set the "keep_vm" : "always" then try to start the vm on the server itself and you will see the reason for the failure. in my case was non existing network name.

kirannhegde commented 4 years ago

Hello @suite800 Could you please provide a copy of your .json file? Also, is this reproducible easily?

Regards, Kiran Hegde

suite800 commented 4 years ago

@kirannhegde I have moved on to another life. I understand there's a long list of backlog, but it's not realistic that someone would have a copy of json file from 2 years ago.