Comments (20)
I am also able to replicate. It appears this particular image is not getting instantiated the same way Debian 9 is. The SSH host keys aren't created, which explains the Connection Reset error. Additionally, the debian
user doesn't seem to exist on the image after boot.
@meffie Did you run into this as well, or had to make any changes to get Debian 10 to work?
from kvm-install-vm.
I normally use a set of pregenerated ssh keys. Maybe that's why I did not see this issue?
$ cat .kivrc
PUBKEY=/home/mmeffie/.ssh/mmeffie-sna2.pub
BRIDGE=vlbr0
$ kvm-install-vm create -t debian10 deb10
- Copying cloud image (debian-10-openstack-amd64.qcow2) ... OK
- Generating ISO for cloud-init ... OK
- Creating storage pool ... OK
- Installing the domain ... OK
- Cleaning up cloud-init files ... OK
- MAC address: 52:54:00:22:e8:1e
- Waiting for domain to get an IP address ... OK
- Checking for 192.168.123.35 in known_hosts file
- No entries found for 192.168.123.35
- SSH to deb10: 'ssh [email protected]' or 'ssh debian@deb10'
- Console at spice://localhost:5912
- DONE
$ ssh [email protected] uname -a
The authenticity of host '192.168.123.35 (192.168.123.35)' can't be established.
ED25519 key fingerprint is SHA256:osD0R96TFO61S71rj4idqrEWCx64qWYyU0DCgaC71dk.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.123.35' (ED25519) to the list of known hosts.
Linux deb10 4.19.0-8-cloud-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux
$ ssh [email protected] id
uid=1001(debian) gid=1001(debian) groups=1001(debian),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),111(netdev)
from kvm-install-vm.
I removed my PUBKEY setting, and created default keys, but it still works for me. My host kvm is ubuntu18.04, could that matter?
$ cat ~/.kivrc
BRIDGE=vlbr0
$ kvm-install-vm create -t debian10 deb10b
ERR: Please generate an SSH keypair using 'ssh-keygen -t rsa' or specify one with the -k flag.
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
<snip>
$ kvm-install-vm create -t debian10 deb10b
- Copying cloud image (debian-10-openstack-amd64.qcow2) ... OK
- Generating ISO for cloud-init ... OK
- Creating storage pool ... OK
- Installing the domain ... OK
- Cleaning up cloud-init files ... OK
- MAC address: 52:54:00:bd:4b:cc
- Waiting for domain to get an IP address ... OK
- Checking for 192.168.123.127 in known_hosts file
- No entries found for 192.168.123.127
- SSH to deb10b: 'ssh [email protected]' or 'ssh debian@deb10b'
- Console at spice://localhost:5913
- DONE
$ ssh [email protected]
The authenticity of host '192.168.123.127 (192.168.123.127)' can't be established.
ED25519 key fingerprint is SHA256:M1I5qzrCMxB5OwT6Rlvm/RDFIdWCWdCGFmpncBaqrjI.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.123.127' (ED25519) to the list of known hosts.
Linux deb10b 4.19.0-8-cloud-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64
<snip>
$ cat /etc/debian_version
10.3
from kvm-install-vm.
Asking a colleague to try to reproduce .
from kvm-install-vm.
I'm having the same issue. Debian9 works, Debian10 fails. Looking at my dnslog, both are getting an IP address, however the Debian10 doesn't have the ssh port open.
This is on a gentoo system using kvm.
No .kivrc
Fresh "copy" of kvm-install-vm
./kvm-install-vm -v -b br0 -t debian10 deb10 << "fails"
./kvm-install-vm -v -b br0 -t debian9 deb9 << "works"
from kvm-install-vm.
Hmm, shouldn't there at least be a cloud-init message in the boot log?
from kvm-install-vm.
Actually - the ssh port is open. it's being reset..
from kvm-install-vm.
It shouldn't have anything to do with ssh. Cloud-init works with a virtual cdrom drive with the configuration in it.
from kvm-install-vm.
Looks like my cached copy of the image was from March 28. Maybe the upstream image changed
since then?
-rw-rw-r-- 1 mmeffie mmeffie 587613696 Mar 28 12:50 debian-10-openstack-amd64.qcow2
from kvm-install-vm.
Downloaded the most recent image and it still works for me. Strange. cloud-init runs and everything seems fine.
from kvm-install-vm.
Seems also weird on Ubuntu 20.04. Will try Ubuntu 18.04 tomorrow. (Debian 9 is also working fine on this Ubuntu 20.04 setup)
ubuntu@focal0:~/kvm-install-vm$ ./kvm-install-vm create -t debian10 foo
[WARNING] foo already exists. Do you want to overwrite foo [y/N]? y
- Destroying foo domain ... OK
- Undefining foo domain ... OK
- Deleting foo files ... OK
- Destroying foo storage pool ... OK
- Copying cloud image (debian-10-openstack-amd64.qcow2) ... OK
- Generating ISO for cloud-init ... OK
- Creating storage pool ... OK
- Installing the domain ... OK
- Cleaning up cloud-init files ... OK
- MAC address: 52:54:00:a6:ba:e8
- Waiting for domain to get an IP address ... OK
- Checking for 192.168.123.42 in known_hosts file
- No entries found for 192.168.123.42
- SSH to foo: 'ssh [email protected]' or 'ssh debian@foo'
- Console at spice://localhost:5900
- DONE
ubuntu@focal0:~/kvm-install-vm$ ssh [email protected]
Connection reset by 192.168.123.42 port 22
from kvm-install-vm.
So this works under xen (with a gentoo dom0), but is failing on a gentoo kvm system. On the kvm system debian 9 works. Looking at the logs it appears that cloud-init is never kicking in.
I've captured console logs (added a --console pty,log.file=... to the virt-install).
I'll continue to look at this tomorrow
from kvm-install-vm.
Ok, I think I found the "issue". This hacky change "fixes" it berkutta@762d00d
I don't know why this fixes it. But I can reproduce this issue on ubuntu20.04 hosts (ubuntu18.04 hots work fine). The issue is also reproducible on Arch Linux.
from kvm-install-vm.
from kvm-install-vm.
Confirm that the "hacky" change works for deb10 on gentoo/kvm.
Installing deb10 on a xen host continues to work as well.
from kvm-install-vm.
The root cause for all this trouble could be that newer libvirt versions use SATA for ejectable media instead of IDE. (Saw this difference when comparing the VM config between what virt-install generatres on ubuntu18.04 and ubuntu20.04).
from kvm-install-vm.
Ok, I think I found the "issue". This hacky change "fixes" it berkutta@762d00d
Confirming that this commit fixes the issue on Debian 10 host.
from kvm-install-vm.
Thanks everyone for testing this fix! @berkutta would you like to submit a PR?
from kvm-install-vm.
sure, PR is ready, did clean up the code.
from kvm-install-vm.
Closed by #59
from kvm-install-vm.
Related Issues (20)
- Share a directory from host machine to vm HOT 2
- No need to remove cloud-init HOT 4
- No static network options? HOT 5
- License? HOT 4
- possible CoreOS? HOT 3
- ubuntu1804 cannot boot HOT 8
- cloud-init user-data example
- Amazon Linux 2 doesn't boot if disk resized HOT 1
- Network config alternative HOT 3
- cloud init custom user-data script not picked up HOT 4
- How to get root on created instance HOT 1
- "kvm-install-vm delete" doesn't work if the VM has snapshots
- Add support to custom list of distros HOT 2
- missing function detach-disk
- Unused var SOURCE in attach-disk
- Could not create domain with virt-install HOT 2
- Adding Rocky Linux HOT 4
- How to add Bridge1 Network Adaptor to Existing VM
- start created vm upon reboot HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kvm-install-vm.