samuf.blogg.se

Qemu kvm looking glass tutorial ubuntu
Qemu kvm looking glass tutorial ubuntu









qemu kvm looking glass tutorial ubuntu

Then replace the “” placeholder in the file above, with the content of “id_rsa.pub”. # written to /var/log/cloud-init.log, /var/log/messagesįinal_message: "The system is finally up, after $UPTIME seconds" # only cert auth via ssh (console access can still login) Create cloud-init configurationĬreate a file named “cloud_init.cfg” with the below content. This creates files named “id_rsa” and “id_rsa.pub”. ssh-keygen -t rsa -b 4096 -f id_rsa -C ctest1 -N "" -q cloud-init will embed the public side of the key into the running OS. In order to use ssh public/private key login later, we need to generate a keypair. Qemu-img info snapshot-centos7-cloudimg.qcow2 Create ssh keypair Qemu-img create -b ~/Downloads/CentOS-7-x86_64-GenericCloud.qcow2 -f qcow2 snapshot-centos7-cloudimg.qcow2 10G # original image is 8G, create snapshot and make it 10G We will also use this opportunity to increase the root filesystem from 8G to 10G. Download this 942Mb file to your “~/Downloads” directory.Ĭreate a snapshot so that we can branch from this disk image without affecting the parent. We will use the CentOS generic cloud image called “ CentOS-7-x86_64-GenericCloud.qcow2“.

qemu kvm looking glass tutorial ubuntu qemu kvm looking glass tutorial ubuntu qemu kvm looking glass tutorial ubuntu

PrerequisitesĪs a prerequisite for this article, you must install KVM and libvirt as described here.Īlso install additional packages needed to manage cloud-images: sudo apt-get install -y cloud-image-utils libosinfo-bin CentOS Cloud Image If you are instead looking for similar instructions for RHEL, see my other article. This article will step through testing a guest CentOS 7 cloud image on KVM, from an Ubuntu Host. The ability to quickly stand up a guest OS with cloud-init is most often associated with deployment of virtual machines in an IaaS like EC2 or Azure.īut cloud-init is not just for remote cloud providers, and using cloud-init for local images that can be quickly deployed in KVM works great for local development and testing.











Qemu kvm looking glass tutorial ubuntu