Created
April 21, 2021 05:07
-
-
Save sudachi0114/dab2e6652e0e6895fb3fb405be01258f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# please set $VM_NAME | |
virt-install \ | |
--name ${VM_NAME} \ | |
--ram 8192 \ | |
--disk path=/var/kvm/images/${VM_NAME}.img,size=100 \ | |
--vcpus 4 \ | |
--os-type linux \ | |
--os-variant ubuntu18.04 \ | |
--network bridge=br0 \ | |
--graphics vnc,port=5901,listen=0.0.0.0,keymap=ja,password=vnc \ | |
--noautoconsole \ | |
--console pty,target_type=serial \ | |
--cdrom=/var/kvm/iso/ubuntu-18.04.5-live-server-amd64.iso \ | |
--host-device 01:00.0 \ | |
--features kvm_hidden=on \ | |
--machine q35 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment