summaryrefslogtreecommitdiffstats
path: root/images/guest-aux
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2010-11-16 17:37:30 +0000
committerRichard W.M. Jones <rjones@redhat.com>2010-11-16 18:36:33 +0000
commitfcc631dedb894379cde01af563df3f6a364db7cb (patch)
tree41d8d1184c9e086d1d322538a6a5bc488cf897c3 /images/guest-aux
parent9becb385b78eddb9b3817c6accaa6cdb3db0b5af (diff)
downloadlibguestfs-fcc631dedb894379cde01af563df3f6a364db7cb.tar.gz
libguestfs-fcc631dedb894379cde01af563df3f6a364db7cb.tar.xz
libguestfs-fcc631dedb894379cde01af563df3f6a364db7cb.zip
images: Make phony Windows image for testing.
Diffstat (limited to 'images/guest-aux')
-rwxr-xr-ximages/guest-aux/make-windows-img.sh54
-rwxr-xr-ximages/guest-aux/minimal-hivebin0 -> 8192 bytes
-rwxr-xr-ximages/guest-aux/windows-softwarebin0 -> 12288 bytes
-rw-r--r--images/guest-aux/windows-software.reg32
-rwxr-xr-ximages/guest-aux/windows-systembin0 -> 12288 bytes
-rw-r--r--images/guest-aux/windows-system.reg8
6 files changed, 94 insertions, 0 deletions
diff --git a/images/guest-aux/make-windows-img.sh b/images/guest-aux/make-windows-img.sh
new file mode 100755
index 00000000..5a0cd6de
--- /dev/null
+++ b/images/guest-aux/make-windows-img.sh
@@ -0,0 +1,54 @@
+#!/bin/bash -
+# libguestfs
+# Copyright (C) 2010 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+# Make a Windows image which is enough to fool the inspection heuristics.
+
+export LANG=C
+set -e
+
+# Create a disk image.
+../fish/guestfish <<'EOF'
+sparse windows.img.tmp 512M
+run
+
+# Format the disk.
+part-init /dev/sda mbr
+part-add /dev/sda p 64 524287
+part-add /dev/sda p 524288 -64
+
+# Phony boot loader filesystem.
+mkfs ntfs /dev/sda1
+
+# Phony root filesystem.
+mkfs ntfs /dev/sda2
+
+# Enough to fool inspection API.
+mount-options "" /dev/sda2 /
+mkdir-p /Windows/System32/Config
+
+upload guest-aux/windows-software /Windows/System32/Config/SOFTWARE
+upload guest-aux/windows-system /Windows/System32/Config/SYSTEM
+
+upload bin-win32.exe /Windows/System32/cmd.exe
+
+mkdir "/Program Files"
+touch /autoexec.bat
+
+EOF
+
+mv windows.img.tmp windows.img
diff --git a/images/guest-aux/minimal-hive b/images/guest-aux/minimal-hive
new file mode 100755
index 00000000..3f4ee58c
--- /dev/null
+++ b/images/guest-aux/minimal-hive
Binary files differ
diff --git a/images/guest-aux/windows-software b/images/guest-aux/windows-software
new file mode 100755
index 00000000..1091c13e
--- /dev/null
+++ b/images/guest-aux/windows-software
Binary files differ
diff --git a/images/guest-aux/windows-software.reg b/images/guest-aux/windows-software.reg
new file mode 100644
index 00000000..984cbe42
--- /dev/null
+++ b/images/guest-aux/windows-software.reg
@@ -0,0 +1,32 @@
+[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft]
+
+[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT]
+
+[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
+"ProductName"=str(1):"Microsoft Windows 7 Phony Edition"
+"CurrentVersion"=str(1):"6.1"
+
+[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows]
+
+[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion]
+
+[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall]
+
+[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\test1]
+"DisplayName"=str(1):"Test1 is not real software"
+"URLInfoAbout"=str(1):"http://libguestfs.org/"
+"DisplayVersion"=str(1):"1.2.3"
+"VersionMajor"=dword:00000001
+"VersionMinor"=dword:00000002
+
+[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\test2]
+"DisplayName"=str(1):"Test2 is not real software"
+"URLInfoAbout"=str(1):"http://libguestfs.org/"
+"DisplayVersion"=str(1):"1.2.4"
+"Comments"=str(1):"Longer description about phony test2 software"
+
+[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\test3]
+"DisplayName"=str(1):"Test3 is not real software"
+"DisplayVersion"=str(1):"1.2.5"
+"Publisher"=str(1):"Red Hat Inc."
+"InstallLocation"=str(1):"C:\\Program Files\\Red Hat\\test3"
diff --git a/images/guest-aux/windows-system b/images/guest-aux/windows-system
new file mode 100755
index 00000000..7d935b02
--- /dev/null
+++ b/images/guest-aux/windows-system
Binary files differ
diff --git a/images/guest-aux/windows-system.reg b/images/guest-aux/windows-system.reg
new file mode 100644
index 00000000..87ae7796
--- /dev/null
+++ b/images/guest-aux/windows-system.reg
@@ -0,0 +1,8 @@
+[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001]
+
+[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services]
+
+[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip]
+
+[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters]
+"Hostname"=str(1):"windows.invalid"