m (→virsch) |
|||
Line 46: | Line 46: | ||
Source: [[http://www.mail-archive.com/kvm@vger.kernel.org/msg10099.html|using KVM w/o dnsmasq on CentOS 5.2 X64]]. | Source: [[http://www.mail-archive.com/kvm@vger.kernel.org/msg10099.html|using KVM w/o dnsmasq on CentOS 5.2 X64]]. | ||
The following didn't cut it, it simply prevented the DomU in starting, due to the missing 'default' network... | |||
# virsh net-destroy default | # virsh net-destroy default | ||
# virsh net-autostart --disable default | # virsh net-autostart --disable default | ||
# virsh net-autostart default | |||
# | |||
virsh net-dumpxml default | |||
<pre> | |||
<network> | |||
<name>default</name> | |||
<uuid>4eb269bb-b949-49ae-95b1-6e281b634c47</uuid> | |||
<forward mode='route'/> | |||
<bridge name='virbr0' stp='on' delay='0' /> | |||
<ip address='192.168.122.1' netmask='255.255.255.0'> | |||
<dhcp> | |||
<range start='192.168.122.2' end='192.168.122.254' /> | |||
</dhcp> | |||
</ip> | |||
</network> | |||
</pre> | |||
== Administration == | == Administration == |
Revision as of 19:50, 5 October 2010
Virtualization short cuts for noobs
Introduction
Purpose
Scope
Acronyms, descriptions
References
- http://www.linux-kvm.org/page/Documents
- KVM documentation page.
- http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge
- description of the linux bridge implementation.
- http://en.gentoo-wiki.com/wiki/Bridging_Network_Interfaces
- http://en.gentoo-wiki.com/wiki/KVM#Networking_2
- Shows direct and indirect bridging.
- http://blog.loftninjas.org/2008/08/18/using-attach-interface-with-libvirt-and-qemukvm-on-ubuntu/
- about attach-interface.
- http://tjworld.net/wiki/Linux/Ubuntu/VirtualMachinesWithVDENetworking
- Virtual Machines With VDE Networking
- http://www.mythicalbeast.co.uk/linux/dnsmasq_howto.html
- HOWTO for dnsmasq
Open issues
- how to pin Dom0
- How do we pin Dom0 to a specific CPU?
Operating Environment
Which packages you need in order to run virtualization.
Storage
- File based
- LVM Based
- NFS based
- iSCSI
Network
Network configuration needs.
- Bridging
- Direct
- NAT
- NAT/Route
Get direct bridging
Source: [KVM w/o dnsmasq on CentOS 5.2 X64].
The following didn't cut it, it simply prevented the DomU in starting, due to the missing 'default' network...
- virsh net-destroy default
- virsh net-autostart --disable default
- virsh net-autostart default
virsh net-dumpxml default
<network> <name>default</name> <uuid>4eb269bb-b949-49ae-95b1-6e281b634c47</uuid> <forward mode='route'/> <bridge name='virbr0' stp='on' delay='0' /> <ip address='192.168.122.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.122.2' end='192.168.122.254' /> </dhcp> </ip> </network>
Administration
virsch
virsh help lists the supported commands.
See also [28. Managing guests with virsh]
Virsh operations commands of interest
- console
- get access to the console in the DomU.
- destroy
- as if you pulled the power cord, preferably use 'shutdown'.
- reboot
- reboot the domain.
- shutdown
- shutdown the domain.
- undefine
- remove all references to the domain. (Note; not sure if it is actually *all*).
- dumpxml
- list
- List the active domains. Use '--all' to include the the inactive containers to the list.
Virsh network commands of interest
- domifstat
- interface statistics.
- virsh domifstat z3 vif7.0
- attach-interface
- attach a network interface.
- virsh attach-interface z3 bridge eth1 --target eth1 --mac xx:xx:xx:xx:xx:xx
- net-edit
- For an description of the xml structure see: [XML format]
- net-list
- list networks.
virt-install
virt-mananger
remote management
Creating DomUs
Creating a CentOS 5.5 DomU
source:NFS, storage:LVM network:bridge;4
virt-install -p --name=z4 --ram=512 --vcpus=1 --disk path=/dev/loom/z4 --os-type=linux
--os-variant=rhel5 --location=nfs:192.168.42.132:/exports/isos/centos55 -x
"ks=nfs:192.168.42.132:/exports/ks/anaconda-ks.cfg ip=192.168.42.31 netmask=255.255.255.0
gateway=192.168.42.132 dns=192.168.42.32"