Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to setup a basic CentOS virtual machine with libvirt


I would like to install a CentOS 6.5 virtual machine on my machine, only with command line tools and basic networking capabilities, i.e a way to have http and ssh connections between the host (Fedora 19) and the CentOS guest.

Being still quite noobish to the nix world, I experienced some trouble.

I first did an unsuccessful attempt to install virtualbox.

I then found this page on the wiki : /wiki/Getting_started_with_virtualization?rd=Virtualization_Quick_Start#Using_virtualization_on_Fedora

(can't post full links for the moment)

I followed the instructions, installed the packages needed (libvirt ...), and enabled virtualization in my BIOS. I installed my VM from the iso CentOS-6.5-x86_64-minimal.iso (with virt-install --prompt )

While the installation went all right, if I halt the VM I absolutely don't know how to restart it. The webpage I used apparently doesn't mention it, and having a look at virsh or virt-manager manual was not yielding help for me (but maybe because I don't know how to read it properly)

the virsh list doesn't show anything but an empty list. i tried to find the machine I created using find / -name name_of_vm_as_prompted_during_virt-install and found nothing

besides, while my guest is running, no network interface is there (except lo), despite the wiki stating that there should be a basic networking interface created by default that would allow me to have connection between guest and host. However on my host I have

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet  netmask  broadcast
        ether 8e:3d:7c:b3:44:bf  txqueuelen 0  (Ethernet)

which, I guess, should be encouraging.

My knowledge on VM is quite limited and so is my understanding of networking.

My questions : 1) How to access my created but closed VM 2) How to set up the basic network capabilities 3) since I have 2 questions, should I split them into two separate threads ?