Skip to content

Instantly share code, notes, and snippets.

@mattconnolly
Created September 5, 2013 00:27
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattconnolly/6444557 to your computer and use it in GitHub Desktop.
Save mattconnolly/6444557 to your computer and use it in GitHub Desktop.
Using zonecfg to set qemu_extra_opts in SmartOS
# zonecfg -z <uuid>
# add attr
# set name=qemu-extra-opts
# set type=string
# set value="LXNtcCBjcHVzPTEsY29yZXM9NCx0aHJlYWRzPTI="
# end
# commit
# exit
Then reboot the machine. The value is the base64 encoded string that will be added to the qemu-kvm options. The above is "-smp cpus=1,cores=4,threads=2", which plays nice with Windows which for some stupid reason only supports 2 cpus.
@AlainODea
Copy link

Nice. Are you using echo "...the actual qemu opts..." | openssl base64 to do the conversion, or something else?

@limepanda
Copy link

new Buffer("-smp cpus=1,cores=4,threads=2").toString('base64')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment