Difference between revisions of "DomU-gen"

From PostgreSQL_wiki
Jump to: navigation, search
Line 7: Line 7:
 
--network=bridge:br0 --hvm --vnc --debug --extra-args
 
--network=bridge:br0 --hvm --vnc --debug --extra-args
 
"auto=true preseed/url=http://mirror.webhuis.nl/webhuis-preseed-noswap-squeeze.cfg
 
"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"
+
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>
 
</pre>
   

Revision as of 15:23, 25 September 2012

Gestandaardiseerd genereren van virtuele machines.

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"

lvextend --extents +100%FREE /dev/vg-root-install/root

post install

Host

    <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>

boot met init=/bin/bash mount -rw -o remount / mkdir /hotv mv home opt tmp var -> hotv ln -s /hotv/var /var allemaal

Guest

  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/

Terug naar: Webhuis bouwstenen