Re: [packer] Skip shutdown
I'm using vmware-iso builder and would like to use the machine for other operations without power on again. *Example:* Step 1: Building Debian server and installing an app using ansible provision. Step 2: Run automation scripts and tests against above provisioned machine. Regards Vallinayagam.K On Wednesday, 7 March 2018 22:52:06 UTC+5:30, Rickard von Essen wrote: > > No in general it's not. Which builder do you use and what's the reason for > this? > > On Mar 7, 2018 17:02, "valli nayagam" <vall...@gmail.com > > wrote: > > Hi All > > Is it possible to skip the shutdown operation after build and provisioning > the machine? > > I'm not sure whether my understanding is valid, but looking for some > answers. > > Thanks in advance. > > Regards > Vallinayagam. K > > -- > 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 packer-tool...@googlegroups.com . > To view this discussion on the web visit > https://groups.google.com/d/msgid/packer-tool/19e1a8e4-95d8-446b-bc09-432fdce5e3ba%40googlegroups.com > > <https://groups.google.com/d/msgid/packer-tool/19e1a8e4-95d8-446b-bc09-432fdce5e3ba%40googlegroups.com?utm_medium=email_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > > -- 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 packer-tool+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/3ff6adc6-04c6-4795-a9f7-ee7747cab193%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[packer] Skip shutdown
Hi All Is it possible to skip the shutdown operation after build and provisioning the machine? I'm not sure whether my understanding is valid, but looking for some answers. Thanks in advance. Regards Vallinayagam. K -- 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 packer-tool+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/19e1a8e4-95d8-446b-bc09-432fdce5e3ba%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [packer] Cannot get preseed file - How to enable bridged mode in virtualbox-iso
Uploaded the files here -> https://github.com/vallikkv/packer.git Thanks in advance Valli On Saturday, 2 December 2017 21:05:56 UTC+5:30, Alvaro Miranda Aguilera wrote: > > hello > > Can you put all in a github repo and share a link? > > Will be easier to test in that way. > > Alvaro > -- 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 packer-tool+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/6a4168ea-2bcb-40fa-8403-4eadec963b0b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [packer] Cannot get preseed file - How to enable bridged mode in virtualbox-iso
Thanks for the answer, But the VM doesn't take the ip address 192.168.0.130 which is given in the preseed and json file. <https://lh3.googleusercontent.com/-0zE-BxZxerY/WhpVhj58KoI/BqU/HUMFP988b7ERT0FXQXb9EUUvTib4UofnACLcBGAs/s1600/address.PNG> On Sunday, 26 November 2017 10:36:20 UTC+5:30, Rickard von Essen wrote: > > You (at least) have to add "ssh_host": "192.168.0.130". > > On 26 November 2017 at 05:15, valli nayagam <vall...@gmail.com > > wrote: > >> Hi, Its working once I change the network type. Now I'm trying to set the >> static ip address for the Debian VM but its not working. Installation was >> completed successfuilly and statictally given ip address is not getting >> assigned >> >> Please have a look of json and preseed changes and help me on this topic >> >> Template: >> >> "builders": [ >> { >> "type": "virtualbox-iso", >> "boot_command": [ >> "", >> "install ", >> "preseed/url=http://192.168.0.105:8080/preseed-deb9.cfg ", >> "debian-installer=en_US ", >> "auto ", >> "locale=en_US ", >> "kbd-chooser/method=us ", >> "d-i netcfg/disable_autoconfig boolean true ", >> "d-i netcfg/disable_dhcp true ", >> "d-i netcfg/confirm_static=true ", >> "d-i netcfg/dhcp_options select Configure network manually ", >> "d-i netcfg/get_ipaddress string 192.168.0.130 ", >> "d-i netcfg/get_netmask string 255.255.255.0 ", >> "d-i netcfg/get_gateway string 192.168.0.1 ", >> "d-i netcfg/get_nameservers string 192.168.0.1 ", >> "d-i netcfg/confirm_static boolean true ", >> "netcfg/get_hostname={{ .Name }} ", >> "netcfg/get_domain=testing.com ", >> "fb=false ", >> "debconf/frontend=noninteractive ", >> "console-setup/ask_detect=false ", >> "console-keymaps-at/keymap=us ", >> "keyboard-configuration/xkb-keymap=us ", >> "" >> ], >> "boot_wait": "10s", >> "disk_size": 45536, >> "guest_os_type": "Debian_64", >> "http_directory": "http", >>"iso_checksum": "a6e3743a6df3e69851fd5a3e7f6f1466", >> "iso_checksum_type": "md5", >> "iso_url": >> "file:///../resources/operatingSystem_ISO/debian-9.2.1-amd64-DVD-1.iso", >> "vm_name": "Testmachine", >> "ssh_username": "viewpoint", >> "ssh_password": "user", >> "ssh_port": 22, >> "ssh_wait_timeout": "1s", >> "shutdown_command": "echo 'halt -p' > shutdown.sh; echo >> 'vagrant'|sudo -S bash 'shutdown.sh'", >> "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", >> "virtualbox_version_file": ".vbox_version", >> "vboxmanage": [ >> ["modifyvm", "{{.Name}}", "--memory", "512"], >> ["modifyvm", "{{.Name}}", "--cpus", "1"], >> ["modifyvm", "{{.Name}}", "--nic1", "bridged"], >> ["modifyvm", "{{.Name}}", "--bridgeadapter1", "TP-LINK Wireless USB >> Adapter"], >> ["modifyvm", "{{.Name}}", "--vrde", "on"] >> ] >> } >> ] >> } >> >> Preseed changes: >> >> >> # netcfg will choose an interface that has link if possible. This makes it >> # skip displaying a list if there is more than one interface. >> d-i netcfg/choose_interface select auto >> >> # To pick a particular interface instead: >> #d-i netcfg/choose_interface select enp0s3 >> >> # To set a different link detection timeout (default is 3 seconds). >> # Values are interpreted as seconds. >> #d-i netcfg/link_detection_timeout string 10 >> >> # If you have a slow dhcp server and the installer times out waiting for >> # it, this might be useful. >> #d-i netcfg/dhcp_timeout string 60 >> #d-i netcfg/dhcpv6_timeout string 60 >> >>
Re: [packer] Cannot get preseed file - How to enable bridged mode in virtualbox-iso
Hi, Its working once I change the network type. Now I'm trying to set the static ip address for the Debian VM but its not working. Installation was completed successfuilly and statictally given ip address is not getting assigned Please have a look of json and preseed changes and help me on this topic Template: "builders": [ { "type": "virtualbox-iso", "boot_command": [ "", "install ", "preseed/url=http://192.168.0.105:8080/preseed-deb9.cfg ", "debian-installer=en_US ", "auto ", "locale=en_US ", "kbd-chooser/method=us ", "d-i netcfg/disable_autoconfig boolean true ", "d-i netcfg/disable_dhcp true ", "d-i netcfg/confirm_static=true ", "d-i netcfg/dhcp_options select Configure network manually ", "d-i netcfg/get_ipaddress string 192.168.0.130 ", "d-i netcfg/get_netmask string 255.255.255.0 ", "d-i netcfg/get_gateway string 192.168.0.1 ", "d-i netcfg/get_nameservers string 192.168.0.1 ", "d-i netcfg/confirm_static boolean true ", "netcfg/get_hostname={{ .Name }} ", "netcfg/get_domain=testing.com ", "fb=false ", "debconf/frontend=noninteractive ", "console-setup/ask_detect=false ", "console-keymaps-at/keymap=us ", "keyboard-configuration/xkb-keymap=us ", "" ], "boot_wait": "10s", "disk_size": 45536, "guest_os_type": "Debian_64", "http_directory": "http", "iso_checksum": "a6e3743a6df3e69851fd5a3e7f6f1466", "iso_checksum_type": "md5", "iso_url": "file:///../resources/operatingSystem_ISO/debian-9.2.1-amd64-DVD-1.iso", "vm_name": "Testmachine", "ssh_username": "viewpoint", "ssh_password": "user", "ssh_port": 22, "ssh_wait_timeout": "1s", "shutdown_command": "echo 'halt -p' > shutdown.sh; echo 'vagrant'|sudo -S bash 'shutdown.sh'", "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", "virtualbox_version_file": ".vbox_version", "vboxmanage": [ ["modifyvm", "{{.Name}}", "--memory", "512"], ["modifyvm", "{{.Name}}", "--cpus", "1"], ["modifyvm", "{{.Name}}", "--nic1", "bridged"], ["modifyvm", "{{.Name}}", "--bridgeadapter1", "TP-LINK Wireless USB Adapter"], ["modifyvm", "{{.Name}}", "--vrde", "on"] ] } ] } Preseed changes: # netcfg will choose an interface that has link if possible. This makes it # skip displaying a list if there is more than one interface. d-i netcfg/choose_interface select auto # To pick a particular interface instead: #d-i netcfg/choose_interface select enp0s3 # To set a different link detection timeout (default is 3 seconds). # Values are interpreted as seconds. #d-i netcfg/link_detection_timeout string 10 # If you have a slow dhcp server and the installer times out waiting for # it, this might be useful. #d-i netcfg/dhcp_timeout string 60 #d-i netcfg/dhcpv6_timeout string 60 # If you prefer to configure the network manually, uncomment this line and # the static network configuration below. d-i netcfg/disable_autoconfig boolean true d-i netcfg/disable_dhcp true d-i netcfg/confirm_static=true # If you want the preconfiguration file to work on systems both with and # without a dhcp server, uncomment these lines and the static network # configuration below. d-i netcfg/dhcp_failed note d-i netcfg/dhcp_options select Configure network manually # Static network configuration. # # IPv4 example d-i netcfg/get_ipaddress string 192.168.0.130 d-i netcfg/get_netmask string 255.255.255.0 d-i netcfg/get_gateway string 192.168.0.1 d-i netcfg/get_nameservers string 192.168.0.1 d-i netcfg/confirm_static boolean true Thanks in advance Valli On Sunday, 26 November 2017 01:40:14 UTC+5:30, Rickard von Essen wrote: > > If you don't change the network type it should work with the example in > the docs. Get that working first and then change the network type only if > you really need to. > > On Nov 25, 2017 21:00, "valli nayagam" <vall...@gmail.com > > wrote: > >> Because the machine boots with Network as "Nat" and may be because of >> that the pressed.file is not accessible for the VM >&g
[packer] Cannot get preseed file - How to enable bridged mode in virtualbox-iso
Hello everyone, I'm newbie to packer, I'm trying to install debian os in virtualbox. But it looks network is not connected with host machine and failed to retrieve the preseed file. Json file: { "variables":{ "hostname": "testmachine", "packerhost": "192.168.0.5", "ip": "192.168.0.125", "netmask": "255.255.255.0", "gateway": "192.168.0.1", "domain": "test.net", "nameservers": "192.168.0.1", "language_country": "en_US", "keyboard": "en" }, "builders": [ { "type": "virtualbox-iso", "guest_os_type": "Ubuntu_64", "iso_url": "file:///../resources/operatingSystem_ISO/debian-9.2.1-amd64-DVD-1.iso", "iso_checksum": "a6e3743a6df3e69851fd5a3e7f6f1466", "iso_checksum_type": "md5", "http_directory": "http", "http_port_min": "9001", "http_port_max": "9001", "ssh_username": "packer", "ssh_password": "packer", "shutdown_command": "echo 'packer' | sudo -S shutdown -P now", "vboxmanage": [ [ "modifyvm", "{{.Name}}", "--memory", "2048" ], [ "modifyvm", "{{.Name}}", "--vram", "36" ], [ "modifyvm", "{{.Name}}", "--cpus", "2" ], [ "modifyvm", "{{.Name}}", "--hardwareuuid", "02f110e7-369a-4bbc-bbe6-6f0b6864ccb6" ], [ "modifyvm", "{{.Name}}", "--nic0","bridged"] ], "boot_command": [ "", "install ", "preseed/url=http://192.168.0.105:8080/preseed-deb9.cfg ", "hostname={{user `hostname`}} ", "netcfg/disable_autoconfig=true ", "netcfg/get_domain={{user `domain`}} ", "netcfg/confirm_static=true ", "netcfg/get_ipaddress={{user `ip`}} ", "netcfg/get_netmask={{user `netmask`}} ", "netcfg/get_gateway={{user `gateway`}} ", "netcfg/get_nameservers={{user `nameservers`}} ", "debian-installer={{user `language_country`}} auto locale={{user `language_country`}} ", "keyboard-configuration/xkb-keymap={{user `keyboard`}} ", "fb=false ", "debconf/frontend=noninteractive ", "console-setup/ask_detect=false ", "" ] }] So, I tried to add a nic card to vbox but it failed with error H:\VMWare_Installation\packer>packer build -on-error=abort packer-test-valli.json virtualbox-iso output will be in this color. ==> virtualbox-iso: Downloading or copying Guest additions virtualbox-iso: Downloading or copying: file:///C:/Program%20Files/Oracle/VirtualBox/VBoxGuestAdditions.iso ==> virtualbox-iso: Downloading or copying ISO virtualbox-iso: Downloading or copying: file:///H:/VMWare_Installation/resources/operatingSystem_ISO/debian-9.2.1-amd64-DVD-1.iso ==> virtualbox-iso: Starting HTTP server on port 9001 ==> virtualbox-iso: Creating virtual machine... ==> virtualbox-iso: Creating hard drive... ==> virtualbox-iso: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 2376) ==> virtualbox-iso: Executing custom VBoxManage commands... virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1511636150 --memory 2048 virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1511636150 --vram 36 virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1511636150 --cpus 2 virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1511636150 --hardwareuuid 02f110e7-369a-4bbc-bbe6-6f0b6864ccb6 virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1511636150 --nic0 bridged ==> virtualbox-iso: Error executing command: VBoxManage error: VBoxManage.exe: error: Invalid NIC number 0 ==> virtualbox-iso: Step "StepVBoxManage" failed, aborting... Build 'virtualbox-iso' errored: unexpected EOF ==> Some builds didn't complete successfully and had errors: --> virtualbox-iso: unexpected EOF ==> Builds finished but no artifacts were created. What's the problem and how to retrive the preseed file? -- 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 packer-tool+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/f372f4af-7c34-40e1-976d-5105834d575f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[packer] Clarification in packer json file with Virtualbox as builder and V-Sphere as Post-processor?
Hi All, I'm newbie to Packer. Before start trying the packer, i have some basic doubts. It would be helpful if someone clarifies the same. *Requirement:* My requirement is to automatically install Operating system (Debian/Ubuntu) using ISO image with some additional packages in Virtualbox and export it to ESXI using V-Sphere. *My Question:* To achieve my requirement, Can I create packer json file with *Virtualbox--ISO* *as builder* and *vsphere as postprocessor *or any challenges in this? Regards Vallinayagam.K -- 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 packer-tool+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/94434a59-661c-4665-aabd-5d83e02f66ff%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.