Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2021-07-15 00:29:54
Size: 246
Editor: ThomasChung
Comment: initial edit
Revision 6 as of 2021-07-15 01:18:54
Size: 1288
Editor: ThomasChung
Comment:
Deletions are marked like this. Additions are marked like this.
Line 13: Line 13:
== Download Cloud Image == == Download the latest Debian 10 cloud image in qcow2 format ==

{{{
$ curl -L -O https://cloud.debian.org/images/cloud/buster/latest/debian-10-genericcloud-amd64.qcow2
$ du -sh *.qcow2
223M debian-10-genericcloud-amd64.qcow2
}}}

== Reset root password on cloud image ==
You can ignore warning

You system might not have install '''virt-customize'''

To install '''virt-customize''':
{{{
$ sudo apt update
$ sudo apt install libguestfs-tools
$ which virt-customize
/usr/bin/virt-customize
}}}

To reset root password with '''virt-customize''':
{{{
$ virt-customize -a debian-10-genericcloud-amd64.qcow2 --root-password password:debian
[ 0.0] Examining the guest ...
[ 22.9] Setting a random seed
virt-customize: warning: random seed could not be set for this type of
guest
[ 23.0] Setting the machine ID in /etc/machine-id
[ 23.0] Setting passwords
[ 26.9] Finishing off
}}}

== Copy cloud image to images directory for libvirt ==

{{{
$ sudo cp debian-10-genericcloud-amd64.qcow2 /var/lib/libvirt/images/d10c.qcow2
}}}

How to import Cloud Image to Virtual Machines on Debian 10

THIS IS A WORK-IN-PROGRESS.

YOU MAY BE EXPECTED TO SEE A CONSTANT CHANGES FOR NEXT FEW HOURS.

Download the latest Debian 10 cloud image in qcow2 format

$ curl -L -O https://cloud.debian.org/images/cloud/buster/latest/debian-10-genericcloud-amd64.qcow2
$ du -sh *.qcow2
223M    debian-10-genericcloud-amd64.qcow2

Reset root password on cloud image

You can ignore warning

You system might not have install virt-customize

To install virt-customize:

$ sudo apt update
$ sudo apt install libguestfs-tools
$ which virt-customize
/usr/bin/virt-customize

To reset root password with virt-customize:

$ virt-customize -a debian-10-genericcloud-amd64.qcow2 --root-password password:debian
[   0.0] Examining the guest ...
[  22.9] Setting a random seed
virt-customize: warning: random seed could not be set for this type of
guest
[  23.0] Setting the machine ID in /etc/machine-id
[  23.0] Setting passwords
[  26.9] Finishing off

Copy cloud image to images directory for libvirt

$ sudo cp debian-10-genericcloud-amd64.qcow2 /var/lib/libvirt/images/d10c.qcow2