hashicorp / packer

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
http://www.packer.io
Other
15.04k stars 3.32k forks source link

win 2016 set host-passthrough ? #7394

Closed meteorlad closed 5 years ago

meteorlad commented 5 years ago

Describe:

I used packer to install the blue screen of win 2016. Therefore, I conducted debugging through virt-install and found that the "-- CPU host-passthrough" parameter should be added. So how do I use the " --CPU host-passthrough" model in packer?

The virt-install complete command:

virt-install --name server2016 --memory 4096 --vcpus sockets=1,cores=2,threads=2 --disk device=cdrom,path=/opt/SW_DVD9_Win_Svr_STD_Core_and_DataCtr_Core_2016_64Bit_ChnSimp_-3_MLF_X21-30349.ISO --disk device=cdrom,path=/opt/virtio-win-1.9.6.iso  --disk path=/cloud/images/win2k1611-os.qcow2,size=20,bus=virtio --network bridge=br-a246cb9427d7,model=virtio --noautoconsole --accelerate --hvm --graphics vnc,listen=0.0.0.0,port=20007 --video vga --input tablet,bus=usb --cpu host-passthrough

Key parameter "-- CPU host-passthrough"

Env:

SwampDragons commented 5 years ago

You probably need to set it via qemu-args: https://www.packer.io/docs/builders/qemu.html#qemuargs

ghost commented 4 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.