On Sun, Apr 17, 2016 at 01:52:41AM +0200, Mario Gummies wrote: > 16.04.2016, 21:40, "Geert Stappers" <stappers@stappers.nl>: > > > > Back to the original challenge. > > I think it is an interresting problem. It is the wish to do > > > > virt-install -name $freshVM --more --parameters --and --options > > ssh $freshVM > > > > So one command creates a fresh virtual machine > > and upon the next command is it possible to SSH into the fresh VM. > > > > Tricky part is that virt-install default uses DHCP stuff, > > which means some kind of random factor. ssh goes to a host, > > there you don't want a random factor. > > > > > > For the original poster. I think the problem is not in the preseed file, > > it is in how the whole chain should be mixed. > > > > > > Thing that _might_ work is adding in the host /etc/hosts a line like > > > > 192.168.122.6 virtdebstable3 > > > > The idea is that libvirt uses the dnsmasq programm for DHCP server to VMs. > > When that dnsmasq sees a DHCP request with hostname virtdebstable3 > > it _might_ assign 192.168.122.6 because that info is in /etc/hosts. > > The ssh programm on the host surely reads /etc/hosts for the address > > of virtdebstable3. > > > > -in the meanwhile did another test, see Test 3, which is plain text and without dhcp: > Test 3:(failed___too, same as Test0) > virt-install --connect=qemu:///system --location=http:// > ftp.us.debian.org/debian/dists/stable/main/installer\-i386 --initrd- > inject=$HOME/Downloads/preseed.cfg --extra-args="netcfg/ > get_ipaddress=192.168.122.2 netcfg/get_netmask=255.255.255.0 netcfg/ > get_gateway=192.168.122.1 netcfg/get_nameservers=192.168.122.1 > netcfg/disable_dhcp=true" --name virtdebstable6 --ram=512 -- > disk=pool=default,size=5,format=qcow2,bus=virtio --network > network=default --hvm --accelerate --vnc > preseed.cfg > http://paste.ubuntu.com/15883394/ > Questions from here: > With every preseed command line I got the same screenshot result. A common > problem of all seems to be that there is no eth0 interface in the guest > available (instead their is a ens3 interface available) in the guest after > (preseed) installation. > -What went wrong? The assumption that it would be easy as stacking toy blocks :-) > -Which part of the debian-installer is responsible for setting up the network > interfaces in the guest, one might ask. > -If one can not proceed with virt-install, do you think, it is worth to try it > with plain qemu preseed and better chances? > > Any hints are welcome. > Tia When I have done my own testing I will come back on this. This message is to tell that I think that mixing virt-install and preseeding can be done. Groeten Geert Stappers -- Leven en laten leven
Attachment:
signature.asc
Description: Digital signature