- VMWare Fusion 11.5 on macOS Catalina
- Guest OS: CentOS 8.2
- GitHub Enterprise Server 2.20.10
- Make sure that the Guest OS has
- more than 100GB of disk space (/home)
- 2 CPU cores / 16GB memory
Install qemu-kvm and libvirt tools:
sudo yum install qemu-kvm libvirt virt-install virt-manager libvirt-client virt-viewer
We use /home/kvm
as the working directory in this example. Download the qcow2 disk image here.
If you want to SSH into the VM before management console starts up, add your ssh pubkey to the GHES image by running the following command:
virt-sysprep -a /home/kvm/github-enterprise-2.20.10.qcow2 --ssh-inject admin:file:/home/lowply/id_ed25519.pub
virt-install \
--hvm \
--name GitHubEnterprise \
--vcpus 2 \
--memory 16384 \
--network default \
--controller type=scsi,model=virtio-scsi \
--os-variant debian9 \
--disk /home/kvm/github-enterprise-2.20.10.qcow2,size=100,format=qcow2 \
--disk path=/home/kvm/data.qcow2,size=100,format=qcow2 \
--import
virsh list
virsh list --all
virsh shutdown GitHubEnterprise
virsh destroy GitHubEnterprise
virsh undefine GitHubEnterprise
virsh screenshot GitHubEnterprise --file /tmp/screeenshot.ppm
From your laptop:
ssh vm -- sudo virsh screenshot GitHubEnterprise --file /tmp/screeenshot.ppm && scp vm:/tmp/screeenshot.ppm .
virsh shutdown GitHubEnterprise
virsh start GitHubEnterprise
You don't have to bind mac address and IP address in the virsh net-edit default
, DHCP will take care of it.
virsh dumpxml GitHubEnterprise
virsh domifaddr GitHubEnterprise
virsh net-list
virsh net-edit default
virsh net-destroy default
virsh net-start default
virsh net-undefine default
virsh net-dumpxml default