kvm image disck qcow2 Apply for: debian, linux…
qemu-img create -f qcow2 windows-master.qcow2 10G
Install OS on that image.
qemu-system-x86_64 -hda windows-master.qcow2 -m 512 -boot d -cdrom /home/user/isos/en_winxp_pro_with_sp2.iso
qemu-img create -b windows-master.qcow2 -f qcow2 windows-clone.qcow2
This working image have the same virtual size as the base image. The actual size is small because the working image only contain the difference to the base image from the time it is created.
qemu-img info windows-clone.qcow2
image: windows-clone.qcow2 file format: qcow2 virtual size: 10G (10737418240 bytes) disk size: 56K cluster_size: 4096 backing file: windows-master.qcow2 (actual path: windows-master.qcow2)
Multiple working images can share the same base image.
Merging working image with based image to create a new indipendent base image.
qemu-img convert windows-clone.qcow2 –O qcow2 windows-marketing.qcow2
* This need more study * Create cow new image with convert.
qemu-img convert -O qcow2 -B master-windows2003-base.qcow2 master-windows2003.qcow2 final.qcow2
$ virt-customize -a bionic-server-cloudimg-amd64.img --root-password password:coolpass
$ ssh-keygen -f atomic_rsa
Generating public/private rsa key pair.
<truncating output>
$ cat atomic_rsa.pub
$ vim meta-data
instance-id: Atomic01
local-hostname: atomic-host-001
$ vim user-data
#cloud-config
password: redhat
chpasswd: { expire: False }
ssh_pwauth: True
ssh_authorized_keys:
- ... ssh-rsa new public key here user@host ...
$ genisoimage -output atomic01-cidata.iso -volid cidata -joliet -rock user-data meta-data
spice already supported from Fed 15.
yum install kvm yum install virt-manager libvirt libvirt-python python-virtinst
yum install spice-client
Check enable_nat.sh for correct ethernet name (em1 vs eth0)
The VM will be configured with ip, MAC, bridge in NAT mode…
Edit the followings:
Open VNC connection
Login with root:r4o9o9t5
user dev:dev
auto eth0
iface eth0 inet static
address 192.168.0.7
netmask 255.255.255.0
gateway 192.168.0.254
Then restart network
/etc/init.d/networking restart or ifdown ethx ifup ethx
Now that Lenny has been archived, you will need to update your /etc/apt/sources.list file. It should now look like this:
deb http://archive.debian.org/debian lenny main deb http://archive.debian.org/debian-security lenny/updates main deb http://archive.debian.org/debian-volatile lenny/volatile main deb http://archive.debian.org/backports.org lenny-backports main
Attention
Causes problem when debian guests download large file from internet. Disable tcpwindowscaling on host machine.
net.ipv4.tcp_window_scaling=0" sysctl -w net.ipv4.tcp_window_scaling=0