2,187
edits
m (→Auto Start: Minor update) |
(→Create Server (no GUI): Updated) |
||
Line 43: | Line 43: | ||
=== Create Server (no GUI) === | === Create Server (no GUI) === | ||
Update | Update <code>location</code> path to reflect where your install ISO is located, and the <code>disk</code> path for where VM disk files are intended to be. | ||
The <code>--extra-args "console=ttyS0"</code> option allows a local console to be accessed from the host machine (to allow OS install etc before the VM is on a network), though note that it can't be used with <code>--cdrom</code>, so <code>--location</code> has been used instead. | The <code>--extra-args "console=ttyS0"</code> option allows a local console to be accessed from the host machine (to allow OS install etc before the VM is on a network), though note that it can't be used with <code>--cdrom</code>, so <code>--location</code> has been used instead. Note that where installing Ubuntu guests v22.04 and upwards the kernel and initrd paths on the ISO need to be specified with the ISO location. | ||
<pre> | <pre> | ||
virt-install \ | virt-install \ | ||
--virt-type=kvm \ | --virt-type=kvm \ | ||
--name | --name ubuntu22-vm \ | ||
--ram | --ram 2048 \ | ||
--vcpus=1 \ | --vcpus=1 \ | ||
--os-variant=ubuntu16.04 \ | --os-variant=ubuntu16.04 \ | ||
--network=bridge=br0,model=virtio \ | --network=bridge=br0,model=virtio \ | ||
--graphics none \ | --graphics none \ | ||
--disk path=/mnt/md0/kvm/vm/ | --disk path=/mnt/md0/kvm/vm/ubuntu22-vm.img,size=20,bus=virtio \ | ||
--extra-args "console=ttyS0" \ | --extra-args "console=ttyS0" \ | ||
--location | --location ubuntu-22.04-live-server-amd64.iso,kernel=casper/vmlinuz,initrd=casper/initrd | ||
</pre> | </pre> | ||