Hi all!

I have a problem with packer processing Windows Server 2016 image
My source is an OVF file.
My configuration for packer looks like this

{
  "variables": {
    "vm_name": "Win2016-Server",
    "output_dir": "output-box",
    "ovf_path": "/path/to/files/server.ovf"
  },
  "builders": [
    {
      "vm_name": "WindowsServer2016",
      "source_path": "{{user `ovf_path`}}",
      "type": "virtualbox-ovf",
      "communicator": "winrm",
      "winrm_username": "user",
      "winrm_password": "pass",
      "headless": "true",
      "winrm_port": "55985",
      "winrm_timeout": "5h",
      "shutdown_timeout": "1h",
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer 
Shutdown\"",
      "vboxmanage": [
        [ "modifyvm", "{{.Name}}", "--memory", "8192" ],
        [ "modifyvm", "{{.Name}}", "--cpus", "1" ],
        [ "modifyvm", "{{.Name}}", "--chipset", "piix3" ],
        [ "modifyvm", "{{.Name}}", "--natpf1", "winrm,tcp,,55985,,5985"],
        [ "modifyvm", "{{.Name}}", "--ioapic", "on" ],
        [ "modifyvm", "{{.Name}}", "--pae", "on" ],
        [ "modifyvm", "{{.Name}}", "--nestedpaging", "on" ],
        [ "modifyvm", "{{.Name}}", "--paravirtprovider", "kvm" ],
        [ "modifyvm", "{{.Name}}", "--cpuexecutioncap", "50" ],
        [ "modifyvm", "{{.Name}}", "--vram", "64" ],
        [ "modifyvm", "{{.Name}}", "--nic1", "nat"],
        [ "modifyvm", "{{.Name}}", "--nictype1", "82540EM"],
        [ "modifyvm", "{{.Name}}", "--cableconnected1", "on"],
        [ "modifyvm", "{{.Name}}", "--nicpromisc1", "allow-all"],
        [ "modifyvm", "{{.Name}}", "--ostype", "Windows2016_64" ]
      ]
    }
  ],
  "post-processors": [
    {
      "type": "vagrant",
      "output": "{{user `output_dir`}}/{{user `vm_name`}}.box",
      "keep_input_artifact": false
    }
  ]
}

When I am running this configuration I end up with Windows server 
complaining about:

"Your PC/Device needs to be repaired This 64-bit application couldn't load 
because your PC doesn't have a 64-bit processor. If you're using Windows To 
Go, make sure that your USB device has a version of Windows that's 
compatible with the PC that you're trying to use"

When I then access this machine in VirtualBox i can shut down it, change 
type of OS (to Windows2012_64 for example but other 64bit types are ok as 
well) and start it again. At this time Windows does not complain at all and 
starts without any problem

I tried to provide other options to packer for ostype (Windows2016_64, 
Windows2012_64, Other_64 etc.) but without change in behaviour.

Am I missing any important part of configuration for packer here. or is 
this bug of some kind?

I am using packer .1.3.3 and virtualbox 5.2.6

Any suggestions much appreciated. 

Regards,
Michał

-- 


Your privacy is important to us. That is why we have taken appropriate 
measures to ensure the data you provide to us is kept secure. To learn more 
about how we process your personal information, how we comply with 
applicable data protection laws, and care for the security and privacy of 
your personal data, please review our Privacy Policy 
<https://www.motorolasolutions.com/en_us/about/privacy-policy.html#privacystatement>.
 
If you have any questions related to data protection and compliance with 
applicable laws, please contact us at our Security Operations Center at 
1-302-444-9838 or mail us at: 

Attention: Privacy Compliance Program, P.O. 
Box 59263, Schaumburg, IL USA, 60159-0263

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/7cd5af04-2566-42d9-bc2d-c2db4090323c%40googlegroups.com.

Reply via email to