Editing
KVM
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Installatie Debian domU == De installatie van een virtuele machine verloopt op de Debian manier via een netinstall. virt-install haalt alle code, inclusief de netboot van de debian repository, in geval van Webhuis via een apt-cacher proxy vanwege de installatie van meerdere machines. * netinstall * generatie xml van de virtuele machine install * start van de install van de virtuele machine * voortzetting van de installatie via een vnc-console * generatie xml van de virtuele machine * start van de virtuele machine Eerst zoekt virt-install de netinstall: De Mirror van Webhuis bevat de voor de netboot benodigde bestanden. De MANIFEST file staat in: http:mirror.webhuis.nl/debian/dists/squeeze/main/installer-amd64/current/images. De installatie bestanden initrd.gz en linux staan in: http:mirror.webhuis.nl/debian/dists/squeeze/main/installer-amd64/current/images/netboot/debian-installer/amd64 Verversen van deze bestanden gaat met: wget http://mirrors.nl.kernel.org/debian/dists/squeeze/main/installer-amd64/current/images/MANIFEST wget http://mirrors.nl.kernel.org/debian/dists/squeeze/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux wget http://mirrors.nl.kernel.org/debian/dists/squeeze/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz <pre> root@dom0-123:~# virt-install --connect qemu:///system -n cfengine3 -r 256 --vcpus=2 --disk path=/dev/dev-kvm/cfengine3 \ -l http://ftp.nl.debian.org/debian/dists/squeeze/main/installer-amd64 os-type linux \ --os-variant debiansqueeze --accelerate --network=bridge:br1 --hvm --vnc --force --debug </pre> De installatie met virt-install is vrij intelligent. Het draait om het vinden van de informatie om de installatie te starten. Na enige meldingen van de software die zijn weg zoekt in het archief vindt virt-install de voor de installatie belangrijke bestanden, het is zelfs een netinstall: <pre> Wed, 26 Jan 2011 08:55:50 DEBUG Fetching URI: http://ftp.nl.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/MANIFEST Wed, 26 Jan 2011 08:55:50 DEBUG Saved file to /var/lib/libvirt/boot/virtinst-MANIFEST.gBEjKl Retrieving file MANIFEST... | 3.3 kB 00:00 ... Wed, 26 Jan 2011 08:55:50 DEBUG Detected a Debian distro Wed, 26 Jan 2011 08:55:50 DEBUG Fetching URI: http://ftp.nl.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux Wed, 26 Jan 2011 08:56:02 DEBUG Saved file to /var/lib/libvirt/boot/virtinst-linux.aW2jsK=======================- ] 176 kB/s | 2.2 MB 00:00 ETA Retrieving file linux... | 4.6 MB 00:11 ... Wed, 26 Jan 2011 08:56:02 DEBUG Fetching URI: http://ftp.nl.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz Wed, 26 Jan 2011 08:56:34 DEBUG Saved file to /var/lib/libvirt/boot/virtinst-initrd.gz.724oyj=====================-] 210 kB/s | 6.4 MB 00:00 ETA Retrieving file initrd.gz... | 13 MB 00:31 ... </pre> === De xml van de virtuele machine install === <pre> Wed, 26 Jan 2011 08:56:34 DEBUG Generated install XML: <domain type='kvm'> <name>cfengine3</name> <currentMemory>262144</currentMemory> <memory>262144</memory> <uuid>8c6c8c04-de68-eab9-fe18-e77b4b69b543</uuid> <os> <type arch='x86_64'>hvm</type> <kernel>/var/lib/libvirt/boot/virtinst-linux.aW2jsK</kernel> <initrd>/var/lib/libvirt/boot/virtinst-initrd.gz.724oyj</initrd> <cmdline>method=http://ftp.nl.debian.org/debian/dists/squeeze/main/installer-amd64</cmdline> </os> <features> <acpi/><apic/><pae/> </features> <clock offset="utc"/> <on_poweroff>destroy</on_poweroff> <on_reboot>destroy</on_reboot> <on_crash>destroy</on_crash> <vcpu>2</vcpu> <devices> <emulator>/usr/bin/kvm</emulator> <disk type='block' device='disk'> <driver name='qemu'/> <source dev='/dev/dev-kvm/cfengine3'/> <target dev='vda' bus='virtio'/> </disk> <interface type='bridge'> <source bridge='br1'/> <mac address='52:54:00:48:30:e6'/> <model type='virtio'/> </interface> <input type='tablet' bus='usb'/> <graphics type='vnc' port='-1' keymap='en-us'/> <console type='pty'/> <video> <model type='cirrus'/> </video> </devices> </domain> </pre> === De xml van de virtuele machine=== <pre> Creating domain... | 0 B 00:00 Wed, 26 Jan 2011 08:56:34 DEBUG Started guest, looking to see if it is running Wed, 26 Jan 2011 08:56:34 DEBUG Launching console callback Wed, 26 Jan 2011 08:56:34 DEBUG Generated boot XML: <domain type='kvm'> <name>cfengine3</name> <currentMemory>262144</currentMemory> <memory>262144</memory> <uuid>8c6549c04-de48-e5b9-fe12-e7596869b543</uuid> <os> <type arch='x86_64'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/><apic/><pae/> </features> <clock offset="utc"/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <vcpu>2</vcpu> <devices> <emulator>/usr/bin/kvm</emulator> <disk type='block' device='disk'> <driver name='qemu'/> <source dev='/dev/dev-kvm/cfengine3'/> <target dev='vda' bus='virtio'/> </disk> <interface type='bridge'> <source bridge='br1'/> <mac address='52:54:00:23:40:6e'/> <model type='virtio'/> </interface> <input type='tablet' bus='usb'/> <graphics type='vnc' port='-1' keymap='en-us'/> <console type='pty'/> <video> <model type='cirrus'/> </video> </devices> </domain> </pre> De installatie is gestart en virt-install heeft de melding het console niet te kunnen openen. virt-install geeft aan dat de rest van de installatie via een console. <pre> Cannot open display: Run 'virt-viewer --help' to see a full list of available command line options Wed, 26 Jan 2011 08:56:35 DEBUG Removing /var/lib/libvirt/boot/virtinst-linux.aW2jsK Wed, 26 Jan 2011 08:56:35 DEBUG Removing /var/lib/libvirt/boot/virtinst-initrd.gz.724oyj Wed, 26 Jan 2011 08:56:37 DEBUG Domain state after install: 1 Domain installation still in progress. You can reconnect to the console to complete the installation process. root@dom0-148:~# </pre> === Openen van een console === Het openen van het console verloop via twee stappen. * Met de grafische optie inloggen op de host * vnc starten op de console <pre> martin@dell:~$ ssh -Y 10.99.99.99 Enter passphrase for key '/home/martin/.ssh/key': Linux dom0-123 2.6.32-5-amd64 #1 SMP Wed Jan 12 03:40:32 UTC 2011 x86_64 Last login: Wed Jan 26 13:46:08 2011 from 10.68.71.149 martin@dom0-123:~$ xvnc4viewer localhost:5900 </pre> De vnc console is verre van ideaal, maar wel werkbaar en is tenslotte maar een enkele keer nodig. De machine funcitoneert pas na een handmatige start.
Summary:
Please note that all contributions to Webhuis wiki are considered to be released under the GNU Free Documentation License 1.3 or later (see
Project:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Voorpagina
Cobol and PostgreSQL
PostgreSQL
CFEngine
Proxmox
Webhuis Kennisbank
Basale infra
Webhuis bouwstenen
Webhuis configuratie
Webhuis Infra
Webhuis Support
Webhuis Raspberry
Opzet Applicaties
Business Applicaties
Community portal
Current events
Recent changes
Random page
Help
sitesupport
Tools
What links here
Related changes
Special pages
Page information