Eu estou tentando automatizar o uso do virt-install + preseed, o ubuntu12.04 vm com o kvm.
Eu preciso que os vms sejam hospedados em volumes lvm específicos que eu criei para cada um.
Quando executo o script, obtenho: ERRO Um tamanho deve ser especificado para discos inexistentes.
Este é o meu arquivo install.sh.
Meu
#!/bin/bash
sudo virt-install \
--name=test \
--connect=qemu:///system \
--ram=1024 \
--vcpus=2 \
--os-variant=ubuntuprecise \
--hvm \
--virt-type=kvm \
--network=bridge:br0 \
--location=http://mirrors.usc.edu/pub/linux/distributions/ubuntu/dists/precise /main/installer-amd64/ \
--file=test.img \
--graphics vnc,port=5901,password=test,listen=0.0.0.0,keymap=ja \
--disk path=/dev/VG/testing,size=9.7 \
--extra-args="auto=true priority=critical initrd=/install/initrd.gz preseed/file=preseed.cfg" \
Este é o meu arquivo preseed.cfg (provavelmente haverá erros neste arquivo, mesmo que o debconf esteja ok, mas eu não consigo ir tão longe):
d-i debian-installer/locale string en
d-i console-keymaps-at/keymap select en
d-i netcfg/get_nameservers string 8.8.8.8
d-i netcfg/get_ipaddress string 192.168.0.20
d-i netcfg/get_netmask string 255.255.255.0
d-i netcfg/get_gateway string 192.168.0.1
d-i netcfg/choose_interface select eth0
d-i netcfg/disable_dhcp boolean true
d-i netcfg/dhcp_options select Configure network manually
d-i netcfg/confirm_static boolean true
d-i netcfg/get_hostname string test
d-i netcfg/get_hostname seen false
d-i netcfg/get_domain string ymotongpoo.local
d-i mirror/protocol string http
d-i mirror/country string manual
d-i mirror/http/hostname string archive.ubuntu.com
d-i mirror/http/directory string /ubuntu
d-i mirror/http/proxy string
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Athens
d-i clock-setup/ntp boolean true
d-i partman-auto/disk string /dev/vda
d-i partman-lvm/devide_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-auto/method string regular
d-i partman-lvm/confirm boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select atomic
d-i partman/default_filesystem string ext4
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i passwd/root-login boolean false
d-i passwd/user-fullname string bob
d-i passwd/username string bob
d-i passwd/user-password-crypted password $1$R00dFhRl$7zb6nzVUMbrBT5pchDkJl.
d-i user-setup/allow-password-weak boolean true
tasksel tasksel/first multiselect standard
d-i pkgsel/include string openssh-server
d-i pkgsel/upgrade select safe-upgrade
d-i pkgsel/language-packs multiselect en, ja
d-i pkgsel/update-policy select none
d-i pkgsel/updatedb boolean false
popularity-contest popularity-contest/participate boolean false
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i finish-install/reboot_in_progress note