Editing
DomU-gen
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!
Webhuis heeft zich ten doel gesteld alle virtuele machines op gelijksoortige wijze voort te brengen. Elke machine heeft: * RootVG op raid device kvm-root * SwapVG op kvm-swap * DataVG op raid device kvm-data = Gestandaardiseerd genereren van virtuele machines = Webhuis genereert machines met scripts die virt-install aanroepen dat de configuratie van een zogenaamde preseed file haalt. Het genereren met een preseed file kent enige beperkingen. Zo is het Webhuis tot op de dag van dit schrijven nog niet gelukt om de virtuele machines in een keer op de verschillende fysieke volumes te krijgen, zodat een post-install nodig is om dit recht te trekken. == Installatie domU == <pre> virt-install --connect qemu:///system -n test-kvm -r 256 --vcpu=1 \ --disk path=/dev/mapper/kvm150--data-data--lv--install \ -l http://mirror.webhuis.nl/debian/dists/squeeze/main/installer-amd64 \ os-type linux --os-variant debiansqueeze --accelerate \ --network=bridge:br0 --hvm --vnc --debug --extra-args "auto=true preseed/url=http://mirror.webhuis.nl/webhuis-preseed-noswap-squeeze.cfg netcfg/disable_dhcp=true netcfg/get_ipaddress=10.22.23.167 netcfg/get_netmask=255.255.255.224 netcfg/get_gateway=10.22.23.161 netcfg/get_nameservers=10.22.23.187 hostname=test-kvm.webhuis.nl" </pre> == post install == * Verwijder swap uit fstab van de guest * shutdown * create guest * guest komt op check * shutdown mount -o remount,rw / lvextend --extents +100%FREE /dev/vg-root-install/root /dev/mapper/vg--root--install-swap_1 none swap sw 0 0 verwijder de symlink /dev/mapper/vg--root--install-swap_1 voeg toe aan fstab: /dev/vdb1 none swap sw 0 0 /dev/vdc1 /hotv ext3 defaults 0 2 mkdir /hotv mount -a in xvncviewer telinit 1 mv home opt tmp var -> /hotv ln -s -> hotv * opnemen in beheer: configurations, cfengine, nagios == Host == <pre> <disk type='block' device='disk'> <driver name='qemu' type='raw'/> <source dev='/dev/mapper/kvm150--swap-test--kvm'/> <target dev='vdb' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </disk> <disk type='block' device='disk'> <driver name='qemu' type='raw'/> <source dev='/dev/mapper/kvm150--data-support--svn--dvg'/> <target dev='vdc' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </disk> </pre> * http://www.grymoire.com/Unix/Sed.html * http://www.linuxforums.org/forum/programming-scripting/120613-need-script-fdisk-command.html * https://www.linux.com/learn/docs/ldp/681-Partition * http://www.linuxforums.org/forum/programming-scripting/111746-how-write-shell-script-partition-usb-pen-drive-using-fdisk-cmd.html * http://stackoverflow.com/questions/5410757/sed-delete-a-line-containing-a-specific-string * boot met init=/bin/bash mount -rw -o remount / mkdir /hotv mv home opt tmp var -> hotv ln -s /hotv/var /var allemaal == Guest == 1 fdisk -l 2 top 3 fdisk -l 4 fdisk /dev/vda 5 ls -al /dev/mapper/ 6 df -h 7 top 8 df -h 9 swapoff 10 vi /etc/fstab 11 lvdisplay 12 swapoff /dev/vg-root-install/swap_1 13 lvremove /dev/vg-root-install/swap_1 14 lvdisplay 15 lvextend -l +100%FREE root 16 lvextend -l +100%FREE /dev/vg-root-install/root 17 pvscan 18 fdisk /dev/vdb 19 mkswap /dev/vdb1 20 vi /etc/fstab 21 mount -a 22 top 23 swapon 24 swapon /dev/vdb1 25 top 26 fdisk /dev/vdc 27 mkfs.ext3 /dev/vdc1 28 mkdir /hotv 29 cd /hotv 30 mkdir home opt tmp var 31 ls -al 98 vgcreate data /dev/vdc1 99 lvcreate -l +100%FREE -n htv data 100 lvdisplay 101 mount -t ext3 /dev/data/htv /mnt/ 102 mkfs.ext3 /dev/data/htv 103 mount -t ext3 /dev/data/htv /mnt/ == Ombouwen klassieke KVM LVM machine == <pre> Disk /dev/vda: 8589 MB, 8589934592 bytes 16 heads, 63 sectors/track, 16644 cylinders Units = cylinders of 1008 * 512 = 516096 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00081a09 Device Boot Start End Blocks Id System /dev/vda1 3 15651 7886848 83 Linux Partition 1 does not end on cylinder boundary. /dev/vda2 15653 16643 498689 5 Extended Partition 2 does not end on cylinder boundary. /dev/vda5 15653 16643 498688 82 Linux swap / Solaris </pre> <hr/> Terug naar: [[Webhuis bouwstenen]]
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