From 64c93fc5101a2a9b51a49d6be6ab4183f73ae7b6 Mon Sep 17 00:00:00 2001 From: Rafal Wojtczuk Date: Fri, 17 Sep 2010 18:08:12 +0200 Subject: [PATCH 1/5] Add cleanup_image script --- README | 4 ++++ cleanup_image | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 cleanup_image diff --git a/README b/README index f3aa9f2..dd9dea0 100644 --- a/README +++ b/README @@ -27,6 +27,10 @@ of Qubes-specific rpms to install you want to use (e.g. qubes-gui-vm, etc). # ./qubeize_image +3a) You should remove yum cached files, and override unused block with +zeroes, via +# ./cleanup_image qubeized_images/name-root.img + 4) Make sure the symlinks in vm_kernels_XXX/ point to correct kernel and initramfs files you want to use for the template: diff --git a/cleanup_image b/cleanup_image new file mode 100755 index 0000000..ec17beb --- /dev/null +++ b/cleanup_image @@ -0,0 +1,26 @@ +#!/bin/sh + +IMG=$1 + +if ! [ $# -eq 1 ]; then + echo "usage $0 " + exit 1 +fi + + +if ! [ -f $IMG ]; then + echo $IMG does not exist + exit 1 +fi +ls -als $IMG +mount -o loop,offset=$((63*512)) $IMG mnt || exit 1 +INSTALLDIR=`pwd`/mnt/ +yum clean packages --installroot=$INSTALLDIR +dd if=/dev/zero of=mnt/fillme bs=1M +sync +rm mnt/fillme +umount mnt +cp --sparse=always $IMG $IMG.new +mv $IMG.new $IMG +ls -als $IMG + From f960d4728b0cb0f66dca8b57ba087c68b3b1b885 Mon Sep 17 00:00:00 2001 From: Rafal Wojtczuk Date: Mon, 20 Sep 2010 11:28:19 +0200 Subject: [PATCH 2/5] Add NetworkManager-gnome to netvm packages list --- clean_images/packages-netvm.list | 1 + 1 file changed, 1 insertion(+) diff --git a/clean_images/packages-netvm.list b/clean_images/packages-netvm.list index 9f5b33e..6298679 100644 --- a/clean_images/packages-netvm.list +++ b/clean_images/packages-netvm.list @@ -7,3 +7,4 @@ kdebse xterm bridge-utils stalonetray +NetworkManager-gnome From cf73b30404988f2620c8f4d0c6b12aeef8ff9a83 Mon Sep 17 00:00:00 2001 From: Rafal Wojtczuk Date: Mon, 20 Sep 2010 11:34:33 +0200 Subject: [PATCH 3/5] Use %VMNAME% in the menu exec line --- netvm/apps.templates/show_tray.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netvm/apps.templates/show_tray.desktop b/netvm/apps.templates/show_tray.desktop index e5a81ac..b54fe54 100644 --- a/netvm/apps.templates/show_tray.desktop +++ b/netvm/apps.templates/show_tray.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Type=Application -Exec=(qvm-run -q --tray -a --user=root netvm "stalonetray --background white --geometry 100x40" && qvm-run -q netvm --user=root "/usr/bin/nm-applet &") +Exec=(qvm-run -q --tray -a --user=root %VMNAME% "stalonetray --background white --geometry 100x40" && qvm-run -q %VMNAME% --user=root "/usr/bin/nm-applet &") Icon=%VMDIR%/icon.png Name=%VMNAME%: Show Tray Categories=System From 62c7ae3ba1ee580557bde2b8df77030394e97272 Mon Sep 17 00:00:00 2001 From: Rafal Wojtczuk Date: Mon, 20 Sep 2010 11:35:09 +0200 Subject: [PATCH 4/5] Corrected stalone tray invocation If works better on F13 without "--geometry" parameter. --- netvm/apps.templates/show_tray.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netvm/apps.templates/show_tray.desktop b/netvm/apps.templates/show_tray.desktop index b54fe54..a3b25d9 100644 --- a/netvm/apps.templates/show_tray.desktop +++ b/netvm/apps.templates/show_tray.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Type=Application -Exec=(qvm-run -q --tray -a --user=root %VMNAME% "stalonetray --background white --geometry 100x40" && qvm-run -q %VMNAME% --user=root "/usr/bin/nm-applet &") +Exec=(qvm-run -q --tray -a --user=root %VMNAME% "stalonetray --background white" && qvm-run -q %VMNAME% --user=root "/usr/bin/nm-applet &") Icon=%VMDIR%/icon.png Name=%VMNAME%: Show Tray Categories=System From d27940ada9c941d3999ce54c1bf0fa078f32f8ef Mon Sep 17 00:00:00 2001 From: Rafal Wojtczuk Date: Mon, 20 Sep 2010 11:38:58 +0200 Subject: [PATCH 5/5] Added swiotlb=force to netvm cmdline --- vm_conf_files/netvm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm_conf_files/netvm.conf b/vm_conf_files/netvm.conf index cac110d..adc5d45 100644 --- a/vm_conf_files/netvm.conf +++ b/vm_conf_files/netvm.conf @@ -4,7 +4,7 @@ kernel="/var/lib/qubes/servicevms/%NETVMNAME%/kernels/vmlinuz" ramdisk="/var/lib/qubes/servicevms/%NETVMNAME%/kernels/initramfs" -extra="ro nomodeset xencons=hvc rd_NO_PLYMOUTH 3 pci=nomsi" +extra="ro nomodeset xencons=hvc swiotlb=force rd_NO_PLYMOUTH 3 pci=nomsi" root="/dev/mapper/dmroot" memory = 200