SlideShare a Scribd company logo
1 of 5
Download to read offline
Startup Guide for KVM on CentOS 6 « Techno Crazy                http://balvinder.wordpress.com/2011/08/29/startup-guide-for-kvm-on-c...




         Techno Crazy
         Simplifying Server Aidministration

                Home
                About



         Home > Uncategorized > Startup Guide for KVM on CentOS 6

         Startup Guide for KVM on CentOS 6
         August 29, 2011 balrawat Leave a comment Go to comments

         These instructions are very specific to CentOS 6.

         For this I assume you have setup your server using the “Minimal” option when installing CentOS 6. You
         must also have the Virtualization features enabled for your CPU. This is done in your host’s BIOS.

         Optionally you can skip the first section, Installing KVM, if you check all 4 “Virtualization” software
         categories during the install.

         Installing KVM
         If you choose the “Minimal” option during CentOS 6 then this step is necessary. To get the full set of tools
         there are 4 software groups to install…

                Virtualization
                Virtualization Client
                Virtualization Platform
                Virtualization Tools

         To install run

         yum groupinstall “Virtualization*”
         dejavu-lgc-sans-fonts is necessary or all the fonts in virt-manager will show as squares

         yum install dejavu-lgc-sans-fonts
         Once the install is finished verify that the KVM kernel module is loaded.

         lsmod | grep kvm
         You should see either kvm_intel or kvm_amd depending on your host’s CPU manufacturer.

         At this point I chose to reboot the server. This allows services to be started and udev rules for KVM to be
         applied. This will also allow dbus to create the machine-id file, otherwise you would see something like
         the below when running virt-manager

         # virt-manager
         Xlib: extension “RANDR” missing on display “localhost:10.0″.
         process 1869: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to
         open “/var/lib/dbus/machine-id”: No such file or directory
         See the manual page for dbus-uuidgen to correct this issue.
         D-Bus not built with -rdynamic so unable to print a backtrace


1 de 5                                                                                                               17/11/2011 09:49
Startup Guide for KVM on CentOS 6 « Techno Crazy                 http://balvinder.wordpress.com/2011/08/29/startup-guide-for-kvm-on-c...


         Aborted
         If you receive that D-Bus error and would prefer not to restart then run this command to generate the
         necessary machine-id file

         dbus-uuidgen > /var/lib/dbus/machine-id

         Final configuration steps
         The server I run KVM on is headless, but I still like using virt-manager. So we must install the necessary
         tools to do X11 forwarding through SSH.

         yum install xorg-x11-xauth

         # If you plan to use VNC to connect to the virtual machine’s console locally
         yum install tigervnc
         Now when you connect through SSH be sure to pass the -X flag to enable X11 forwarding.

         Optional: Using an alternate location for VM images with SELinux
         With SELinux enabled, special steps must be taken to change the default VM store from /var/lib/libvirt
         /images. My particular server I choose to keep all images and ISOs for VMs under /vmstore. The steps
         below give your new store the correct security context for SELinux.

         # this package is necessary to run semanage
         yum install policycoreutils-python

         semanage fcontext -a -t virt_image_t “/vmstore(/.*)?”
         restorecon -R /vmstore
         To activate this store you must open virt-manager, select your host, then do Edit-> Host Details. Under the
         Storage tab you can add your new storage volume.

         Optional : Network Bridging for Virtual Machines
         If you wish for your virtual machines to be accessible remotely then you must use network bridging to
         share your host’s network interface with the virtual machines. The setup requires linking one of your
         host’s physical interfaces with a bridge device. First copy your physical interface’s ifcfg file to create the
         new bridge device, named br0.

         cp /etc/sysconfig/networking-scripts/ifcfg-eth0 /etc/sysconfig/networking-scripts/ifcfg-br0
         Modify ifcfg-br0 to have the IP information in ifcfg-eth0 and remove, or comment out, that information in
         ifcfg-eth0. Below are examples of ifcfg-eth0 and ifcfg-br0. The highlighted lines are important.

         /etc/sysconfig/networking-scripts/ifcfg-eth0

         DEVICE=eth0
         HWADDR=00:18:8B:58:07:3B
         ONBOOT=yes
         BRIDGE=br0

         /etc/sysconfig/networking-scripts/ifcfg-br0

         DEVICE=br0
         TYPE=Bridge
         BOOTPROTO=static
         ONBOOT=yes
         IPADDR=10.1.0.3
         NETMASK=255.255.255.0
         Once those two files are configured restart the network service

         service network restart


2 de 5                                                                                                                17/11/2011 09:49
Startup Guide for KVM on CentOS 6 « Techno Crazy                http://balvinder.wordpress.com/2011/08/29/startup-guide-for-kvm-on-c...


         Optional: Managing libvirt with standard user account
         Beginning in CentOS 6 access to managing libvirt is handled by [http://wiki.libvirt.org
         /page/SSHPolicyKitSetup PolicyKit]. It’s always a good practice to do your daily administration tasks as
         some user besides root, and using PolicyKit you can give access to libvirt functions to a standard account.

         First we create the necessary config file to define the access controls. The file must begin with a numeric
         value and have the .pkla extension.

         vim /etc/polkit-1/localauthority/50-local.d/50-libvirt-remote-access.pkla
         Here’s an example of the file I used to give access to a single user. Be sure to put your desired username
         in place of username on the highlighted line.

         [libvirt Management Access]
         Identity=unix-user:username
         Action=org.libvirt.unix.manage
         ResultAny=yes
         ResultInactive=yes
         ResultActive=yes
         You can optionally replace Identity=unix-user:username with Identity=unix-group:groupname to allow
         access to a group of users.

         Finally restart the libvirtd daemon to apply your changes.

         /etc/init.d/libvirtd restart

         Creating the first virtual machine
         You are now ready to create your virtual machines.

         Create the virtual disk
         With the version of virt-manager shipped with CentOS 6 you cannot create qcow2 images from within the
         GUI. If you wish to create your new VM with a qcow2 format virtual disk you must do so from the
         command line, or see the next section for RPMs to upgrade virt-manager.

         qemu-img create -f qcow2 CentOS-6.0-x86_64-Template.qcow2 20G
         NOTE: Replace the filename “CentOS-6.0-x86_64-Template” with your desired name, and also replace
         “20G” with the desired max size of the virtual disk.

         Now when creating your virtual machine select to use an existing virtual disk.




         Share this:




3 de 5                                                                                                               17/11/2011 09:49
Startup Guide for KVM on CentOS 6 « Techno Crazy                               http://balvinder.wordpress.com/2011/08/29/startup-guide-for-kvm-on-c...




         Like this:                          Be the first to like this post.

         Categories: Uncategorized
         Comments (0) Trackbacks (0) Leave a comment Trackback

             1. No comments yet.

             1. No trackbacks yet.



         Leave a Reply




           Fill in your details below or click an icon to log in:




             Notify me of follow-up comments via email.                                                                Post Comment



         SQL Server point in time recovery Crazy Commands
         RSS feed

                Google
                Youdao
                Xian Guo
                Zhua Xia
                My Yahoo!
                newsgator
                Bloglines
                iNezha

         Calendar
             August 2011
          M T W T F S S
          1 2 3 4 5 6 7
          8 9 10 11 12 13 14
          « May     Sep »


4 de 5                                                                                                                              17/11/2011 09:49
Startup Guide for KVM on CentOS 6 « Techno Crazy                http://balvinder.wordpress.com/2011/08/29/startup-guide-for-kvm-on-c...



          M T W T F S S
          15 16 17 18 19 20 21
          22 23 24 25 26 27 28
          29 30 31
          « May       Sep »

         Archives

                September 2011 (1)
                August 2011 (1)
                May 2011 (1)
                April 2011 (1)
                March 2011 (4)

         Recent Posts
                SQL Server point in time recovery
                Startup Guide for KVM on CentOS 6
                Crazy Commands
                How to install NTOP on CentOS 5.5 64bits
                How to Block the Amazon AWS EC2 crawlers

         Email Subscription
         Enter your email address to subscribe to this blog and receive notifications of new posts by email.

         Join 1 other follower




         Top WordPress
         Copyright © 2009-2011 Techno Crazy
         Blog at WordPress.com. Theme: INove by NeoEase.




5 de 5                                                                                                               17/11/2011 09:49

More Related Content

What's hot

DCUS17 : Docker networking deep dive
DCUS17 : Docker networking deep diveDCUS17 : Docker networking deep dive
DCUS17 : Docker networking deep diveMadhu Venugopal
 
CoreOS introduction - Johann Romefort
CoreOS introduction - Johann RomefortCoreOS introduction - Johann Romefort
CoreOS introduction - Johann RomefortStylight
 
Breaking the RpiDocker challenge
Breaking the RpiDocker challenge Breaking the RpiDocker challenge
Breaking the RpiDocker challenge Nicolas De Loof
 
Docker Container: isolation and security
Docker Container: isolation and securityDocker Container: isolation and security
Docker Container: isolation and security宇 傅
 
Container Monitoring with Sysdig
Container Monitoring with SysdigContainer Monitoring with Sysdig
Container Monitoring with SysdigSreenivas Makam
 
LinuxKit Swarm Nodes
LinuxKit Swarm NodesLinuxKit Swarm Nodes
LinuxKit Swarm NodesMoby Project
 
IP Virtual Server(IPVS) 101
IP Virtual Server(IPVS) 101IP Virtual Server(IPVS) 101
IP Virtual Server(IPVS) 101HungWei Chiu
 
Containerd: Building a Container Supervisor by Michael Crosby
Containerd: Building a Container Supervisor by Michael CrosbyContainerd: Building a Container Supervisor by Michael Crosby
Containerd: Building a Container Supervisor by Michael CrosbyDocker, Inc.
 
What Have Syscalls Done for you Lately?
What Have Syscalls Done for you Lately?What Have Syscalls Done for you Lately?
What Have Syscalls Done for you Lately?Docker, Inc.
 
[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus
[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus
[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with PrometheusOpenStack Korea Community
 
CoreOS @Codetalks Hamburg
CoreOS @Codetalks HamburgCoreOS @Codetalks Hamburg
CoreOS @Codetalks HamburgTimo Derstappen
 
iptables and Kubernetes
iptables and Kubernetesiptables and Kubernetes
iptables and KubernetesHungWei Chiu
 
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleRobert Reiz
 
Devoxx 2016: A Developer's Guide to OCI and runC
Devoxx 2016: A Developer's Guide to OCI and runCDevoxx 2016: A Developer's Guide to OCI and runC
Devoxx 2016: A Developer's Guide to OCI and runCPhil Estes
 
Chaos Engineering for Docker
Chaos Engineering for DockerChaos Engineering for Docker
Chaos Engineering for DockerAlexei Ledenev
 

What's hot (20)

DCUS17 : Docker networking deep dive
DCUS17 : Docker networking deep diveDCUS17 : Docker networking deep dive
DCUS17 : Docker networking deep dive
 
CoreOS introduction - Johann Romefort
CoreOS introduction - Johann RomefortCoreOS introduction - Johann Romefort
CoreOS introduction - Johann Romefort
 
Breaking the RpiDocker challenge
Breaking the RpiDocker challenge Breaking the RpiDocker challenge
Breaking the RpiDocker challenge
 
Containers in the Cloud
Containers in the CloudContainers in the Cloud
Containers in the Cloud
 
CoreOS Intro
CoreOS IntroCoreOS Intro
CoreOS Intro
 
CoreOS Overview
CoreOS OverviewCoreOS Overview
CoreOS Overview
 
Docker Container: isolation and security
Docker Container: isolation and securityDocker Container: isolation and security
Docker Container: isolation and security
 
Container Monitoring with Sysdig
Container Monitoring with SysdigContainer Monitoring with Sysdig
Container Monitoring with Sysdig
 
LinuxKit Swarm Nodes
LinuxKit Swarm NodesLinuxKit Swarm Nodes
LinuxKit Swarm Nodes
 
IP Virtual Server(IPVS) 101
IP Virtual Server(IPVS) 101IP Virtual Server(IPVS) 101
IP Virtual Server(IPVS) 101
 
Containerd: Building a Container Supervisor by Michael Crosby
Containerd: Building a Container Supervisor by Michael CrosbyContainerd: Building a Container Supervisor by Michael Crosby
Containerd: Building a Container Supervisor by Michael Crosby
 
What Have Syscalls Done for you Lately?
What Have Syscalls Done for you Lately?What Have Syscalls Done for you Lately?
What Have Syscalls Done for you Lately?
 
Docker internals
Docker internalsDocker internals
Docker internals
 
[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus
[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus
[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus
 
CoreOS @Codetalks Hamburg
CoreOS @Codetalks HamburgCoreOS @Codetalks Hamburg
CoreOS @Codetalks Hamburg
 
iptables and Kubernetes
iptables and Kubernetesiptables and Kubernetes
iptables and Kubernetes
 
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & Ansible
 
Devoxx 2016: A Developer's Guide to OCI and runC
Devoxx 2016: A Developer's Guide to OCI and runCDevoxx 2016: A Developer's Guide to OCI and runC
Devoxx 2016: A Developer's Guide to OCI and runC
 
Wcat
WcatWcat
Wcat
 
Chaos Engineering for Docker
Chaos Engineering for DockerChaos Engineering for Docker
Chaos Engineering for Docker
 

Viewers also liked

Viewers also liked (9)

Alterar memória kvm virtual machine
Alterar memória kvm virtual machineAlterar memória kvm virtual machine
Alterar memória kvm virtual machine
 
Heart
HeartHeart
Heart
 
Comando kvm terminal
Comando kvm terminalComando kvm terminal
Comando kvm terminal
 
Final proyect
Final proyectFinal proyect
Final proyect
 
Client Orientation
Client OrientationClient Orientation
Client Orientation
 
Cardiovascular system
Cardiovascular systemCardiovascular system
Cardiovascular system
 
Cardiovascular system
Cardiovascular systemCardiovascular system
Cardiovascular system
 
Ingles autobigrafia2
Ingles autobigrafia2Ingles autobigrafia2
Ingles autobigrafia2
 
Instalando e configurando o serviço snmpd no red hat 5.3 cent_os
Instalando e configurando o serviço snmpd no red hat 5.3   cent_osInstalando e configurando o serviço snmpd no red hat 5.3   cent_os
Instalando e configurando o serviço snmpd no red hat 5.3 cent_os
 

Similar to Startup guide for kvm on cent os 6

Krenel Based Virtual Machine In Centos7
Krenel Based Virtual Machine In Centos7Krenel Based Virtual Machine In Centos7
Krenel Based Virtual Machine In Centos7a_ratra
 
Kvm virtualization in_rhel_7
Kvm virtualization in_rhel_7Kvm virtualization in_rhel_7
Kvm virtualization in_rhel_7Urgen Sherpa
 
kubernetes - minikube - getting started
kubernetes - minikube - getting startedkubernetes - minikube - getting started
kubernetes - minikube - getting startedMunish Mehta
 
Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Carlos Eduardo
 
Install a micro k8s single node cluster of kubernetes on windows 10
Install a micro k8s single node cluster of kubernetes on windows 10Install a micro k8s single node cluster of kubernetes on windows 10
Install a micro k8s single node cluster of kubernetes on windows 10Lợi Dương
 
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)Ruoshi Ling
 
Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0guest72e8c1
 
Running virtual box from the linux command line
Running virtual box from the linux command lineRunning virtual box from the linux command line
Running virtual box from the linux command lineEric Javier Espino Man
 
Ci For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or GalCi For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or GalChad Woolley
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefMatt Ray
 
Unikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOSUnikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOSDocker, Inc.
 
Practical Introduction To Linux
Practical Introduction To LinuxPractical Introduction To Linux
Practical Introduction To LinuxZeeshan Rizvi
 
Unikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library HypervisorUnikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library HypervisorAnil Madhavapeddy
 
Open Source Virtualization Hacks
Open Source Virtualization HacksOpen Source Virtualization Hacks
Open Source Virtualization HacksNiel Bornstein
 
Linux On V Mware ESXi
Linux On V Mware ESXiLinux On V Mware ESXi
Linux On V Mware ESXiMasafumi Ohta
 
the NML project
the NML projectthe NML project
the NML projectLei Yang
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetesWilliam Stewart
 
3. configuring a compute node for nfv
3. configuring a compute node for nfv3. configuring a compute node for nfv
3. configuring a compute node for nfvvideos
 

Similar to Startup guide for kvm on cent os 6 (20)

Krenel Based Virtual Machine In Centos7
Krenel Based Virtual Machine In Centos7Krenel Based Virtual Machine In Centos7
Krenel Based Virtual Machine In Centos7
 
Kvm virtualization in_rhel_7
Kvm virtualization in_rhel_7Kvm virtualization in_rhel_7
Kvm virtualization in_rhel_7
 
kubernetes - minikube - getting started
kubernetes - minikube - getting startedkubernetes - minikube - getting started
kubernetes - minikube - getting started
 
Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5
 
Proxmox for DevOps
Proxmox for DevOpsProxmox for DevOps
Proxmox for DevOps
 
Install a micro k8s single node cluster of kubernetes on windows 10
Install a micro k8s single node cluster of kubernetes on windows 10Install a micro k8s single node cluster of kubernetes on windows 10
Install a micro k8s single node cluster of kubernetes on windows 10
 
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
 
RMLL / LSM 2009
RMLL / LSM 2009RMLL / LSM 2009
RMLL / LSM 2009
 
Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0
 
Running virtual box from the linux command line
Running virtual box from the linux command lineRunning virtual box from the linux command line
Running virtual box from the linux command line
 
Ci For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or GalCi For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or Gal
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and Chef
 
Unikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOSUnikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOS
 
Practical Introduction To Linux
Practical Introduction To LinuxPractical Introduction To Linux
Practical Introduction To Linux
 
Unikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library HypervisorUnikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library Hypervisor
 
Open Source Virtualization Hacks
Open Source Virtualization HacksOpen Source Virtualization Hacks
Open Source Virtualization Hacks
 
Linux On V Mware ESXi
Linux On V Mware ESXiLinux On V Mware ESXi
Linux On V Mware ESXi
 
the NML project
the NML projectthe NML project
the NML project
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetes
 
3. configuring a compute node for nfv
3. configuring a compute node for nfv3. configuring a compute node for nfv
3. configuring a compute node for nfv
 

More from Carlos Eduardo

Criando plugin para o Nagios em Shell Script _ Nagios
Criando plugin para o Nagios em Shell Script _ NagiosCriando plugin para o Nagios em Shell Script _ Nagios
Criando plugin para o Nagios em Shell Script _ NagiosCarlos Eduardo
 
Iptables bridging and firewalling
Iptables bridging and firewallingIptables bridging and firewalling
Iptables bridging and firewallingCarlos Eduardo
 
Alterar nome do_domínio–rendom_win-2008_e_2003
Alterar nome do_domínio–rendom_win-2008_e_2003Alterar nome do_domínio–rendom_win-2008_e_2003
Alterar nome do_domínio–rendom_win-2008_e_2003Carlos Eduardo
 
Configuração dns memorial descritivo
Configuração dns   memorial descritivoConfiguração dns   memorial descritivo
Configuração dns memorial descritivoCarlos Eduardo
 
Additional resources repositories_rpm_forge - centos wiki
Additional resources repositories_rpm_forge - centos wikiAdditional resources repositories_rpm_forge - centos wiki
Additional resources repositories_rpm_forge - centos wikiCarlos Eduardo
 
Postfix amavisd connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...
Postfix amavisd   connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...Postfix amavisd   connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...
Postfix amavisd connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...Carlos Eduardo
 
Migrate linux user password to postfix vmail database
Migrate linux user password to postfix vmail databaseMigrate linux user password to postfix vmail database
Migrate linux user password to postfix vmail databaseCarlos Eduardo
 
Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...
Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...
Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...Carlos Eduardo
 
Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10
Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10
Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10Carlos Eduardo
 
Exploit access root to kernel 2.6.32 2.6.36 privilege escalation exploit
Exploit access root to kernel 2.6.32 2.6.36   privilege escalation exploitExploit access root to kernel 2.6.32 2.6.36   privilege escalation exploit
Exploit access root to kernel 2.6.32 2.6.36 privilege escalation exploitCarlos Eduardo
 
How to root phones or tablets running android 2.3 gingerbread jailbreak an...
How to root phones or tablets running android 2.3 gingerbread    jailbreak an...How to root phones or tablets running android 2.3 gingerbread    jailbreak an...
How to root phones or tablets running android 2.3 gingerbread jailbreak an...Carlos Eduardo
 
Compartilhamento no samba com permissão de grupo
Compartilhamento no samba com permissão de grupoCompartilhamento no samba com permissão de grupo
Compartilhamento no samba com permissão de grupoCarlos Eduardo
 
Converting parallels or vm ware to virtual box
Converting parallels or vm ware to virtual boxConverting parallels or vm ware to virtual box
Converting parallels or vm ware to virtual boxCarlos Eduardo
 
Instalando rrd tool-no-centos-5-usando-yum
Instalando rrd tool-no-centos-5-usando-yumInstalando rrd tool-no-centos-5-usando-yum
Instalando rrd tool-no-centos-5-usando-yumCarlos Eduardo
 
Como criar um repositório Ubuntu
Como criar um repositório UbuntuComo criar um repositório Ubuntu
Como criar um repositório UbuntuCarlos Eduardo
 
Backup Incremental auto - Windows Server 2008
Backup Incremental auto - Windows Server 2008Backup Incremental auto - Windows Server 2008
Backup Incremental auto - Windows Server 2008Carlos Eduardo
 

More from Carlos Eduardo (20)

Criando plugin para o Nagios em Shell Script _ Nagios
Criando plugin para o Nagios em Shell Script _ NagiosCriando plugin para o Nagios em Shell Script _ Nagios
Criando plugin para o Nagios em Shell Script _ Nagios
 
Iptables bridging and firewalling
Iptables bridging and firewallingIptables bridging and firewalling
Iptables bridging and firewalling
 
Alterar nome do_domínio–rendom_win-2008_e_2003
Alterar nome do_domínio–rendom_win-2008_e_2003Alterar nome do_domínio–rendom_win-2008_e_2003
Alterar nome do_domínio–rendom_win-2008_e_2003
 
Configuração dns memorial descritivo
Configuração dns   memorial descritivoConfiguração dns   memorial descritivo
Configuração dns memorial descritivo
 
Additional resources repositories_rpm_forge - centos wiki
Additional resources repositories_rpm_forge - centos wikiAdditional resources repositories_rpm_forge - centos wiki
Additional resources repositories_rpm_forge - centos wiki
 
Postfix amavisd connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...
Postfix amavisd   connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...Postfix amavisd   connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...
Postfix amavisd connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...
 
Migrate linux user password to postfix vmail database
Migrate linux user password to postfix vmail databaseMigrate linux user password to postfix vmail database
Migrate linux user password to postfix vmail database
 
Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...
Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...
Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...
 
Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10
Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10
Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10
 
Exploit access root to kernel 2.6.32 2.6.36 privilege escalation exploit
Exploit access root to kernel 2.6.32 2.6.36   privilege escalation exploitExploit access root to kernel 2.6.32 2.6.36   privilege escalation exploit
Exploit access root to kernel 2.6.32 2.6.36 privilege escalation exploit
 
How to root phones or tablets running android 2.3 gingerbread jailbreak an...
How to root phones or tablets running android 2.3 gingerbread    jailbreak an...How to root phones or tablets running android 2.3 gingerbread    jailbreak an...
How to root phones or tablets running android 2.3 gingerbread jailbreak an...
 
Compartilhamento no samba com permissão de grupo
Compartilhamento no samba com permissão de grupoCompartilhamento no samba com permissão de grupo
Compartilhamento no samba com permissão de grupo
 
Canivete shell
Canivete shellCanivete shell
Canivete shell
 
Lsof
LsofLsof
Lsof
 
Converting parallels or vm ware to virtual box
Converting parallels or vm ware to virtual boxConverting parallels or vm ware to virtual box
Converting parallels or vm ware to virtual box
 
Instalação geo ip
Instalação geo ipInstalação geo ip
Instalação geo ip
 
Otimizando seu Squid
Otimizando seu SquidOtimizando seu Squid
Otimizando seu Squid
 
Instalando rrd tool-no-centos-5-usando-yum
Instalando rrd tool-no-centos-5-usando-yumInstalando rrd tool-no-centos-5-usando-yum
Instalando rrd tool-no-centos-5-usando-yum
 
Como criar um repositório Ubuntu
Como criar um repositório UbuntuComo criar um repositório Ubuntu
Como criar um repositório Ubuntu
 
Backup Incremental auto - Windows Server 2008
Backup Incremental auto - Windows Server 2008Backup Incremental auto - Windows Server 2008
Backup Incremental auto - Windows Server 2008
 

Recently uploaded

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 

Recently uploaded (20)

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 

Startup guide for kvm on cent os 6

  • 1. Startup Guide for KVM on CentOS 6 « Techno Crazy http://balvinder.wordpress.com/2011/08/29/startup-guide-for-kvm-on-c... Techno Crazy Simplifying Server Aidministration Home About Home > Uncategorized > Startup Guide for KVM on CentOS 6 Startup Guide for KVM on CentOS 6 August 29, 2011 balrawat Leave a comment Go to comments These instructions are very specific to CentOS 6. For this I assume you have setup your server using the “Minimal” option when installing CentOS 6. You must also have the Virtualization features enabled for your CPU. This is done in your host’s BIOS. Optionally you can skip the first section, Installing KVM, if you check all 4 “Virtualization” software categories during the install. Installing KVM If you choose the “Minimal” option during CentOS 6 then this step is necessary. To get the full set of tools there are 4 software groups to install… Virtualization Virtualization Client Virtualization Platform Virtualization Tools To install run yum groupinstall “Virtualization*” dejavu-lgc-sans-fonts is necessary or all the fonts in virt-manager will show as squares yum install dejavu-lgc-sans-fonts Once the install is finished verify that the KVM kernel module is loaded. lsmod | grep kvm You should see either kvm_intel or kvm_amd depending on your host’s CPU manufacturer. At this point I chose to reboot the server. This allows services to be started and udev rules for KVM to be applied. This will also allow dbus to create the machine-id file, otherwise you would see something like the below when running virt-manager # virt-manager Xlib: extension “RANDR” missing on display “localhost:10.0″. process 1869: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open “/var/lib/dbus/machine-id”: No such file or directory See the manual page for dbus-uuidgen to correct this issue. D-Bus not built with -rdynamic so unable to print a backtrace 1 de 5 17/11/2011 09:49
  • 2. Startup Guide for KVM on CentOS 6 « Techno Crazy http://balvinder.wordpress.com/2011/08/29/startup-guide-for-kvm-on-c... Aborted If you receive that D-Bus error and would prefer not to restart then run this command to generate the necessary machine-id file dbus-uuidgen > /var/lib/dbus/machine-id Final configuration steps The server I run KVM on is headless, but I still like using virt-manager. So we must install the necessary tools to do X11 forwarding through SSH. yum install xorg-x11-xauth # If you plan to use VNC to connect to the virtual machine’s console locally yum install tigervnc Now when you connect through SSH be sure to pass the -X flag to enable X11 forwarding. Optional: Using an alternate location for VM images with SELinux With SELinux enabled, special steps must be taken to change the default VM store from /var/lib/libvirt /images. My particular server I choose to keep all images and ISOs for VMs under /vmstore. The steps below give your new store the correct security context for SELinux. # this package is necessary to run semanage yum install policycoreutils-python semanage fcontext -a -t virt_image_t “/vmstore(/.*)?” restorecon -R /vmstore To activate this store you must open virt-manager, select your host, then do Edit-> Host Details. Under the Storage tab you can add your new storage volume. Optional : Network Bridging for Virtual Machines If you wish for your virtual machines to be accessible remotely then you must use network bridging to share your host’s network interface with the virtual machines. The setup requires linking one of your host’s physical interfaces with a bridge device. First copy your physical interface’s ifcfg file to create the new bridge device, named br0. cp /etc/sysconfig/networking-scripts/ifcfg-eth0 /etc/sysconfig/networking-scripts/ifcfg-br0 Modify ifcfg-br0 to have the IP information in ifcfg-eth0 and remove, or comment out, that information in ifcfg-eth0. Below are examples of ifcfg-eth0 and ifcfg-br0. The highlighted lines are important. /etc/sysconfig/networking-scripts/ifcfg-eth0 DEVICE=eth0 HWADDR=00:18:8B:58:07:3B ONBOOT=yes BRIDGE=br0 /etc/sysconfig/networking-scripts/ifcfg-br0 DEVICE=br0 TYPE=Bridge BOOTPROTO=static ONBOOT=yes IPADDR=10.1.0.3 NETMASK=255.255.255.0 Once those two files are configured restart the network service service network restart 2 de 5 17/11/2011 09:49
  • 3. Startup Guide for KVM on CentOS 6 « Techno Crazy http://balvinder.wordpress.com/2011/08/29/startup-guide-for-kvm-on-c... Optional: Managing libvirt with standard user account Beginning in CentOS 6 access to managing libvirt is handled by [http://wiki.libvirt.org /page/SSHPolicyKitSetup PolicyKit]. It’s always a good practice to do your daily administration tasks as some user besides root, and using PolicyKit you can give access to libvirt functions to a standard account. First we create the necessary config file to define the access controls. The file must begin with a numeric value and have the .pkla extension. vim /etc/polkit-1/localauthority/50-local.d/50-libvirt-remote-access.pkla Here’s an example of the file I used to give access to a single user. Be sure to put your desired username in place of username on the highlighted line. [libvirt Management Access] Identity=unix-user:username Action=org.libvirt.unix.manage ResultAny=yes ResultInactive=yes ResultActive=yes You can optionally replace Identity=unix-user:username with Identity=unix-group:groupname to allow access to a group of users. Finally restart the libvirtd daemon to apply your changes. /etc/init.d/libvirtd restart Creating the first virtual machine You are now ready to create your virtual machines. Create the virtual disk With the version of virt-manager shipped with CentOS 6 you cannot create qcow2 images from within the GUI. If you wish to create your new VM with a qcow2 format virtual disk you must do so from the command line, or see the next section for RPMs to upgrade virt-manager. qemu-img create -f qcow2 CentOS-6.0-x86_64-Template.qcow2 20G NOTE: Replace the filename “CentOS-6.0-x86_64-Template” with your desired name, and also replace “20G” with the desired max size of the virtual disk. Now when creating your virtual machine select to use an existing virtual disk. Share this: 3 de 5 17/11/2011 09:49
  • 4. Startup Guide for KVM on CentOS 6 « Techno Crazy http://balvinder.wordpress.com/2011/08/29/startup-guide-for-kvm-on-c... Like this: Be the first to like this post. Categories: Uncategorized Comments (0) Trackbacks (0) Leave a comment Trackback 1. No comments yet. 1. No trackbacks yet. Leave a Reply Fill in your details below or click an icon to log in: Notify me of follow-up comments via email. Post Comment SQL Server point in time recovery Crazy Commands RSS feed Google Youdao Xian Guo Zhua Xia My Yahoo! newsgator Bloglines iNezha Calendar August 2011 M T W T F S S 1 2 3 4 5 6 7 8 9 10 11 12 13 14 « May Sep » 4 de 5 17/11/2011 09:49
  • 5. Startup Guide for KVM on CentOS 6 « Techno Crazy http://balvinder.wordpress.com/2011/08/29/startup-guide-for-kvm-on-c... M T W T F S S 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 « May Sep » Archives September 2011 (1) August 2011 (1) May 2011 (1) April 2011 (1) March 2011 (4) Recent Posts SQL Server point in time recovery Startup Guide for KVM on CentOS 6 Crazy Commands How to install NTOP on CentOS 5.5 64bits How to Block the Amazon AWS EC2 crawlers Email Subscription Enter your email address to subscribe to this blog and receive notifications of new posts by email. Join 1 other follower Top WordPress Copyright © 2009-2011 Techno Crazy Blog at WordPress.com. Theme: INove by NeoEase. 5 de 5 17/11/2011 09:49