[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: locked out after preseed install, libvirt virt-install



Thanks Geert,
-you maid a good or excellent resume.
-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?
-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
 
 
 
 
 
16.04.2016, 21:40, "Geert Stappers" <stappers@stappers.nl>:

On Sat, Apr 16, 2016 at 06:34:16PM +0200, Mario Gummies wrote:

 Hello everybody,

 Was looking after "the guest controlled by a ssh connection." - out-of-box
 Here the problem about virt-install and d-i is explained and worked on and with all details:
https://qemuburopointdpkg.wordpress.com/2016/04/14/status-quo-locked-out-after-preseed/


Which ends with: 'I want to have straight ssh key access from the host.'

Advice/request: change
https://qemuburopointdpkg.files.wordpress.com/2016/04/guest_internet_if_after_install.png?w=300&h=268
 into
https://qemuburopointdpkg.files.wordpress.com/2016/04/guest_internet_if_after_install.png?w=600&h=536

And after that picture is the blog posting unpleasent to read,
IMHO too much "Dumping URLs here, because had a hard time on finding those URLs".


Excuse. I work in that post. In the buttom part I append now found urls with comments and tests with results. 

 

 

 Did mainly three tests.
 -The first and the third with a preseed file failed: broken network.
 -The second without preseeding (according to a virt-install supporter) brought a network as a expected, so
 this stated, that indeed the preseed.cfg is culprit.
 Chose different compilations of "d-i netcfg/.*", but none matched the default manual installation of the
 second test.
 How might I achieve this?
 Who can help me, how to proceed preseeding?
 What is wrong with my preseed.cfg?
 Tia for any tip.


Take a walk around the lake.
Other whatever gives your brain a refocus opportunity.


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.



 this is my first post in this mailing list.


Welcome. FWIW, plain text is preferred.


Groeten
Geert Stappers

--
Leven en laten leven

 


Reply to: