Skip to content

Instantly share code, notes, and snippets.

@sudachi0114
Last active April 21, 2021 05:08
Show Gist options
  • Save sudachi0114/65a562eebffb3a68cc93b9739a8bd1d0 to your computer and use it in GitHub Desktop.
Save sudachi0114/65a562eebffb3a68cc93b9739a8bd1d0 to your computer and use it in GitHub Desktop.
shell script for create kvm
#!/bin/bash
virt-install \
--name ${VM_NAME} \
--ram 4096 \
--disk path=/var/kvm/images/${VM_NAME}.img,size=30 \
--vcpus 2 \
--os-type linux \
--os-variant ubuntu18.04 \
--network bridge=br0 \
--graphics none \
--console pty,target_type=serial \
--location 'http://jp.archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/' \
--extra-args 'console=ttyS0,115200n8 serial'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment