[PATCH] p2v: un-duplicate common dependencies
by Pino Toscano
Move all the dependencies with the same name in all the distributions to
a single list at the end.
There should be no change to the package list used to build the p2v ISO.
---
p2v/dependencies.m4 | 72 ++++++++++++++++-------------------------------------
1 file changed, 21 insertions(+), 51 deletions(-)
diff --git a/p2v/dependencies.m4 b/p2v/dependencies.m4
index 21541b4..e590f57 100644
--- a/p2v/dependencies.m4
+++ b/p2v/dependencies.m4
@@ -29,27 +29,12 @@ ifelse(REDHAT,1,
dnl Run as external programs by the p2v binary.
/usr/bin/ssh
/usr/bin/qemu-nbd
- gawk
- curl
- ethtool
- util-linux
which
- xterm
- pciutils
- lsscsi
- usbutils
dnl Generally useful tools to use within xterm
- less
vim-minimal
- dnl The hwdata package contains PCI IDs, used by virt-p2v to display
- dnl network vendor information (RHBZ#855059).
- hwdata
-
dnl Useful disk and diagnostic utilities.
- hdparm
- smartmontools
iscsi-initiator-utils
dnl X11 environment
@@ -81,20 +66,8 @@ ifelse(DEBIAN,1,
libdbus-1-3
openssh-client
qemu-utils
- gawk
- curl
- ethtool
- util-linux
debianutils
- xterm
- pciutils
- lsscsi
- usbutils
- less
vim-tiny
- hwdata
- hdparm
- smartmontools
open-iscsi
xorg
xserver-xorg-video-all
@@ -114,20 +87,8 @@ ifelse(ARCHLINUX,1,
dbus
openssh
qemu
- gawk
- curl
- ethtool
- util-linux
which
- xterm
- pciutils
- lsscsi
- usbutils
- less
vim-tiny
- hwdata
- hdparm
- smartmontools
open-iscsi
xorg-xinit
xorg-server
@@ -148,20 +109,8 @@ ifelse(SUSE,1,
libdbus-1-3
qemu-tools
openssh
- gawk
- curl
- ethtool
- util-linux
dnl /usr/bin/which is in util-linux on SUSE
- xterm
- pciutils
- lsscsi
- usbutils
- less
vim
- hwdata
- hdparm
- smartmontools
open-iscsi
xinit
xorg-x11-server
@@ -175,3 +124,24 @@ ifelse(SUSE,1,
libyui-qt
SuSEfirewall2
)
+
+dnl Run as external programs by the p2v binary.
+curl
+ethtool
+gawk
+lsscsi
+pciutils
+usbutils
+util-linux
+xterm
+
+dnl Generally useful tools to use within xterm
+less
+
+dnl The hwdata package contains PCI IDs, used by virt-p2v to display
+dnl network vendor information (RHBZ#855059).
+hwdata
+
+dnl Useful disk and diagnostic utilities.
+hdparm
+smartmontools
--
2.9.3
7 years, 8 months
[PATCH v2] v2v: -i libvirt: If <vcpu> is missing, calculate it from CPU topology.
by Richard W.M. Jones
---
v2v/parse_libvirt_xml.ml | 18 ++++++++++++++++--
v2v/test-v2v-print-source.expected | 2 +-
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/v2v/parse_libvirt_xml.ml b/v2v/parse_libvirt_xml.ml
index 6032c31..2dee274 100644
--- a/v2v/parse_libvirt_xml.ml
+++ b/v2v/parse_libvirt_xml.ml
@@ -50,7 +50,7 @@ let parse_libvirt_xml ?conn xml =
let xpathctx = Xml.xpath_new_context doc in
let xpath_string = xpath_string xpathctx
and xpath_int = xpath_int xpathctx
- and xpath_int_default = xpath_int_default xpathctx
+ (*and xpath_int_default = xpath_int_default xpathctx*)
and xpath_int64_default = xpath_int64_default xpathctx in
let hypervisor =
@@ -65,7 +65,6 @@ let parse_libvirt_xml ?conn xml =
| Some s -> s in
let memory = xpath_int64_default "/domain/memory/text()" (1024L *^ 1024L) in
let memory = memory *^ 1024L in
- let vcpu = xpath_int_default "/domain/vcpu/text()" 1 in
let cpu_vendor = xpath_string "/domain/cpu/vendor/text()" in
let cpu_model = xpath_string "/domain/cpu/model/text()" in
@@ -73,6 +72,21 @@ let parse_libvirt_xml ?conn xml =
let cpu_cores = xpath_int "/domain/cpu/topology/@cores" in
let cpu_threads = xpath_int "/domain/cpu/topology/@threads" in
+ (* Get the <vcpu> field from the input XML. If not set then
+ * try calculating it from the <cpu> <topology> node. If that's
+ * not set either, then assume 1 vCPU.
+ *)
+ let vcpu = xpath_int "/domain/vcpu/text()" in
+ let vcpu =
+ match vcpu, cpu_sockets, cpu_cores, cpu_threads with
+ | Some vcpu, _, _, _ -> vcpu
+ | None, None, None, None -> 1
+ | None, _, _, _ ->
+ let sockets = match cpu_sockets with None -> 1 | Some v -> v in
+ let cores = match cpu_cores with None -> 1 | Some v -> v in
+ let threads = match cpu_threads with None -> 1 | Some v -> v in
+ sockets * cores * threads in
+
let features =
let features = ref [] in
let obj = Xml.xpath_eval_expression xpathctx "/domain/features/*" in
diff --git a/v2v/test-v2v-print-source.expected b/v2v/test-v2v-print-source.expected
index 6e78aad..df40ec9 100644
--- a/v2v/test-v2v-print-source.expected
+++ b/v2v/test-v2v-print-source.expected
@@ -1,7 +1,7 @@
source name: windows
hypervisor type: kvm
memory: 1073741824 (bytes)
- nr vCPUs: 1
+ nr vCPUs: 64
CPU vendor: Intel
CPU model: Broadwell
CPU topology: sockets: 4 cores/socket: 8 threads/core: 2
--
2.10.2
7 years, 8 months
[PATCH 1/2] p2v: Free config struct before exit.
by Richard W.M. Jones
Memory leak found by valgrind.
---
p2v/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/p2v/main.c b/p2v/main.c
index e1a7550..7f1e1c0 100644
--- a/p2v/main.c
+++ b/p2v/main.c
@@ -260,6 +260,7 @@ main (int argc, char *argv[])
}
guestfs_int_free_string_list (cmdline);
+ free_config (config);
exit (EXIT_SUCCESS);
}
--
2.10.2
7 years, 8 months
[PATCH 0/4] Pass CPU vendor, model and topology from source to target.
by Richard W.M. Jones
This is tangentially related to:
https://bugzilla.redhat.com/show_bug.cgi?id=1372668
The problem in that bug is that we didn't pass the source CPU model
(Sandybridge in that case) through to the target RHV hypervisor. So
when the Windows guest booted on the target it gives an error about
CPU hardware being disconnected (although it otherwise boots and works
fine).
This patch series explores sending the CPU vendor, model and topology
from the source to the target, where supported. It turns out that RHV
doesn't seem to support this anyway, but other target hypervisors do.
Rich.
7 years, 8 months
[PATCH] p2v: Add awk as a dependency.
by Richard W.M. Jones
The code to parse /proc/cpuinfo runs awk, but it was not included as a
specific dependency so the parsing code might silently fail.
---
p2v/dependencies.m4 | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/p2v/dependencies.m4 b/p2v/dependencies.m4
index bd62d34..21541b4 100644
--- a/p2v/dependencies.m4
+++ b/p2v/dependencies.m4
@@ -29,6 +29,7 @@ ifelse(REDHAT,1,
dnl Run as external programs by the p2v binary.
/usr/bin/ssh
/usr/bin/qemu-nbd
+ gawk
curl
ethtool
util-linux
@@ -80,6 +81,7 @@ ifelse(DEBIAN,1,
libdbus-1-3
openssh-client
qemu-utils
+ gawk
curl
ethtool
util-linux
@@ -112,6 +114,7 @@ ifelse(ARCHLINUX,1,
dbus
openssh
qemu
+ gawk
curl
ethtool
util-linux
@@ -145,6 +148,7 @@ ifelse(SUSE,1,
libdbus-1-3
qemu-tools
openssh
+ gawk
curl
ethtool
util-linux
--
2.10.2
7 years, 8 months
[PATCH] v2v: -i libvirt: If <vcpu> is missing, calculate it from CPU topology.
by Richard W.M. Jones
---
v2v/parse_libvirt_xml.ml | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/v2v/parse_libvirt_xml.ml b/v2v/parse_libvirt_xml.ml
index 6032c31..fb895e4 100644
--- a/v2v/parse_libvirt_xml.ml
+++ b/v2v/parse_libvirt_xml.ml
@@ -50,7 +50,7 @@ let parse_libvirt_xml ?conn xml =
let xpathctx = Xml.xpath_new_context doc in
let xpath_string = xpath_string xpathctx
and xpath_int = xpath_int xpathctx
- and xpath_int_default = xpath_int_default xpathctx
+ (*and xpath_int_default = xpath_int_default xpathctx*)
and xpath_int64_default = xpath_int64_default xpathctx in
let hypervisor =
@@ -65,7 +65,6 @@ let parse_libvirt_xml ?conn xml =
| Some s -> s in
let memory = xpath_int64_default "/domain/memory/text()" (1024L *^ 1024L) in
let memory = memory *^ 1024L in
- let vcpu = xpath_int_default "/domain/vcpu/text()" 1 in
let cpu_vendor = xpath_string "/domain/cpu/vendor/text()" in
let cpu_model = xpath_string "/domain/cpu/model/text()" in
@@ -73,6 +72,21 @@ let parse_libvirt_xml ?conn xml =
let cpu_cores = xpath_int "/domain/cpu/topology/@cores" in
let cpu_threads = xpath_int "/domain/cpu/topology/@threads" in
+ (* Get the <vcpu> field from the input XML. If not set then
+ * try calculating it from the <cpu> <topology> node. If that's
+ * not set either, then assume 1 vCPU.
+ *)
+ let vcpu = xpath_int "/domain/vcpu/text()" in
+ let vcpu =
+ match vcpu, cpu_sockets, cpu_cores, cpu_threads with
+ | Some vcpu, _, _, _ -> vcpu
+ | None, None, None, None -> 1
+ | None, _, _, _ ->
+ let sockets = match cpu_sockets with None -> 1 | Some v -> v in
+ let cores = match cpu_cores with None -> 1 | Some v -> v in
+ let threads = match cpu_threads with None -> 1 | Some v -> v in
+ sockets * cores * threads in
+
let features =
let features = ref [] in
let obj = Xml.xpath_eval_expression xpathctx "/domain/features/*" in
--
2.10.2
7 years, 8 months
[PATCH] lib: direct: Don't ever use -no-kvm-pit-reinjection.
by Richard W.M. Jones
On qemu 1.1.2:
qemu-system-x86_64: -no-kvm-pit-reinjection: invalid option
Thanks: josv @ IRC
---
lib/launch-direct.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/lib/launch-direct.c b/lib/launch-direct.c
index efedf92..db9b9f3 100644
--- a/lib/launch-direct.c
+++ b/lib/launch-direct.c
@@ -414,10 +414,7 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
if (guestfs_int_qemu_supports (g, data->qemu_data, "-no-hpet")) {
ADD_CMDLINE ("-no-hpet");
}
- if (!guestfs_int_version_ge (&data->qemu_version, 1, 3, 0))
- ADD_CMDLINE ("-no-kvm-pit-reinjection");
- else {
- /* New non-deprecated way, added in qemu >= 1.3. */
+ if (guestfs_int_version_ge (&data->qemu_version, 1, 3, 0)) {
ADD_CMDLINE ("-global");
ADD_CMDLINE ("kvm-pit.lost_tick_policy=discard");
}
--
2.10.2
7 years, 8 months
virt-customize fail to inject firstboot script when running it from script.
by Keresztes Péter-Zoltán
Hello,
We have a nodejs app which is injecting first boot scripts using virt-customize however the exact same commands are working when triggered manually.
Here is the debug output of the commands
Regards,
Peter
[ 0.0] Examining the guest ...
libguestfs: trace: set_network true
libguestfs: trace: set_network = 0
libguestfs: trace: add_drive "/var/lib/vz/images/1041/vm-1041-disk-1.qcow2" "readonly:false" "protocol:file" "discard:besteffort"
libguestfs: trace: add_drive = 0
libguestfs: trace: launch
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: get_backend_setting "force_tcg"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: trace: get_sockdir
libguestfs: trace: get_sockdir = "/tmp"
libguestfs: trace: get_backend_setting "gdb"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: launch = 0
libguestfs: trace: inspect_os
libguestfs: trace: umount_all
libguestfs: trace: umount_all = 0
libguestfs: trace: list_filesystems
libguestfs: trace: feature_available "lvm2"
libguestfs: trace: internal_feature_available "lvm2"
libguestfs: trace: internal_feature_available = 0
libguestfs: trace: feature_available = 1
libguestfs: trace: feature_available "ldm"
libguestfs: trace: internal_feature_available "ldm"
libguestfs: trace: internal_feature_available = 1
libguestfs: trace: feature_available = 0
libguestfs: trace: list_devices
libguestfs: trace: list_devices = ["/dev/sda"]
libguestfs: trace: list_partitions
libguestfs: trace: list_partitions = ["/dev/sda1", "/dev/sda2"]
libguestfs: trace: list_md_devices
libguestfs: trace: list_md_devices = []
libguestfs: trace: part_to_dev "/dev/sda1"
libguestfs: trace: part_to_dev = "/dev/sda"
libguestfs: trace: part_to_dev "/dev/sda2"
libguestfs: trace: part_to_dev = "/dev/sda"
libguestfs: trace: vfs_type "/dev/sda1"
libguestfs: trace: vfs_type = "ext4"
libguestfs: trace: vfs_type "/dev/sda2"
libguestfs: trace: vfs_type = "ext4"
libguestfs: trace: lvs
libguestfs: trace: lvs = []
libguestfs: trace: list_filesystems = ["/dev/sda1", "ext4", "/dev/sda2", "ext4"]
libguestfs: trace: vfs_type "/dev/sda1"
libguestfs: trace: vfs_type = "ext4"
libguestfs: trace: internal_parse_mountable "/dev/sda1"
libguestfs: trace: internal_parse_mountable = <struct guestfs_internal_mountable = im_type: 0, im_device: /dev/sda1, im_volume: , >
libguestfs: trace: is_whole_device "/dev/sda1"
libguestfs: trace: is_whole_device = 0
libguestfs: trace: mount_ro "/dev/sda1" "/"
libguestfs: trace: mount_ro = 0
libguestfs: trace: part_to_dev "/dev/sda1"
libguestfs: trace: part_to_dev = "/dev/sda"
libguestfs: trace: device_index "/dev/sda"
libguestfs: trace: device_index = 0
libguestfs: trace: part_to_partnum "/dev/sda1"
libguestfs: trace: part_to_partnum = 1
libguestfs: trace: part_to_dev "/dev/sda1"
libguestfs: trace: part_to_dev = "/dev/sda"
libguestfs: trace: part_list "/dev/sda"
libguestfs: trace: part_list = <struct guestfs_partition_list(2) = [0]{part_num: 1, part_start: 1048576, part_end: 500170751, part_size: 499122176, } [1]{part_num: 2, part_start: 500170752, part_end: 10736369663, part_size: 10236198912, }>
libguestfs: trace: is_dir "/etc"
libguestfs: trace: is_dir = 0
libguestfs: trace: is_dir "/bin"
libguestfs: trace: is_dir = 0
libguestfs: trace: is_dir "/share"
libguestfs: trace: is_dir = 0
libguestfs: trace: is_file "/grub/menu.lst"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/grub/grub.conf"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/grub2/grub.cfg"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/hurd/console"
libguestfs: trace: is_file = 0
libguestfs: trace: is_dir "/log"
libguestfs: trace: is_dir = 0
libguestfs: trace: case_sensitive_path "/windows"
libguestfs: trace: case_sensitive_path = "/windows"
libguestfs: trace: case_sensitive_path "/windows/system32"
libguestfs: trace: case_sensitive_path = NULL (error)
libguestfs: trace: case_sensitive_path "/winnt"
libguestfs: trace: case_sensitive_path = "/winnt"
libguestfs: trace: case_sensitive_path "/winnt/system32"
libguestfs: trace:
case_sensitive_path = NULL (error)
libguestfs: trace:
case_sensitive_path "/win32"
libguestfs: trace: case_sensitive_path = "/win32"
libguestfs: trace: case_sensitive_path "/win32/system32"
libguestfs: trace: case_sensitive_path = NULL (error)
libguestfs: trace: case_sensitive_path "/win"
libguestfs: trace: case_sensitive_path = "/win"
libguestfs: trace: case_sensitive_path "/win/system32"
libguestfs: trace: case_sensitive_path = NULL (error)
libguestfs:
trace: case_sensitive_path "/reactos"
libguestfs: trace: case_sensitive_path = "/reactos"
libguestfs: trace: case_sensitive_path "/reactos/system32"
libguestfs: trace: case_sensitive_path = NULL (error)
libguestfs: trace: case_sensitive_path "/boot.ini"
libguestfs: trace: case_sensitive_path = "/boot.ini"
libguestfs: trace: is_file "/boot.ini"
libguestfs: trace: is_file = 0
libguestfs:
trace: case_sensitive_path "/System Volume Information"
libguestfs: trace: case_sensitive_path = "/System Volume Information"
libguestfs: trace: is_dir "/System Volume Information"
libguestfs: trace: is_dir = 0
libguestfs: trace:
case_sensitive_path "/System Volume Information"
libguestfs: trace: case_sensitive_path = "/System Volume Information"
libguestfs: trace: is_dir "/System Volume Information"
libguestfs: trace: is_dir = 0
libguestfs: trace: case_sensitive_path "/FDOS"
libguestfs: trace: case_sensitive_path = "/FDOS"
libguestfs: trace: is_dir "/FDOS"
libguestfs: trace: is_dir = 0
libguestfs: trace: umount_all
libguestfs: trace: umount_all = 0
libguestfs: trace: vfs_type "/dev/sda2"
libguestfs: trace: vfs_type = "ext4"
libguestfs: trace: internal_parse_mountable "/dev/sda2"
libguestfs: trace: internal_parse_mountable = <struct guestfs_internal_mountable = im_type: 0, im_device: /dev/sda2, im_volume: , >
libguestfs: trace: is_whole_device "/dev/sda2"
libguestfs: trace: is_whole_device = 0
libguestfs: trace: mount_ro "/dev/sda2" "/"
libguestfs: trace: mount_ro = 0
libguestfs: trace: part_to_dev "/dev/sda2"
libguestfs: trace: part_to_dev = "/dev/sda"
libguestfs: trace: device_index "/dev/sda"
libguestfs: trace: device_index = 0
libguestfs: trace: part_to_partnum "/dev/sda2"
libguestfs: trace: part_to_partnum = 2
libguestfs: trace: part_to_dev "/dev/sda2"
libguestfs: trace: part_to_dev = "/dev/sda"
libguestfs: trace: part_list "/dev/sda"
libguestfs: trace: part_list = <struct guestfs_partition_list(2) = [0]{part_num: 1, part_start: 1048576, part_end: 500170751, part_size: 499122176, } [1]{part_num: 2, part_start: 500170752, part_end: 10736369663, part_size: 10236198912, }>
libguestfs: trace: is_dir "/etc"
libguestfs: trace: is_dir = 1
libguestfs: trace: is_dir "/bin"
libguestfs: trace: is_dir = 1
libguestfs: trace: is_dir "/share"
libguestfs: trace: is_dir = 0
libguestfs: trace: is_file "/grub/menu.lst"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/grub/grub.conf"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/grub2/grub.cfg"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/etc/freebsd-update.conf"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/netbsd"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/bsd"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/hurd/console"
libguestfs: trace: is_file = 0
libguestfs:
trace: is_file "/service/vm"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/etc/fstab"
libguestfs: trace: is_file = 1
libguestfs: trace: is_file "/etc/os-release" "followsymlinks:true"
libguestfs: trace: is_file = 1
libguestfs: trace: filesize "/etc/os-release"
libguestfs: trace: filesize = 233
libguestfs: trace: read_lines "/etc/os-release"
libguestfs: trace: read_file "/etc/os-release"
libguestfs: trace: download "/etc/os-release" "/tmp/libguestfsTQwKl0/cat1"
libguestfs: trace: download = 0
libguestfs: trace: read_file = "PRETTY_NAME="Debian GNU/Linux 8 (jessie)"\x0aNAME="Debian GNU/Linux"\x0aVERSION_ID="8"\x0aVERSION="8 (jessie)"\x0aID=debian\x0aHOME_URL="http://www.debian.org/"\x0aSUPPORT_URL="http://www.debian.org/support/"\x0aBUG_REPORT_URL="https://bugs.debian.org/"\x0a"
libguestfs: trace: read_lines = ["PRETTY_NAME="Debian GNU/Linux 8 (jessie)"", "NAME="Debian GNU/Linux"", "VERSION_ID="8"", "VERSION="8 (jessie)"", "ID=debian", "HOME_URL="http://www.debian.org/"", "SUPPORT_URL="http://www.debian.org/support/"", "BUG_REPORT_URL="https://bugs.debian.org/""]
libguestfs: trace: is_file "/etc/lsb-release" "followsymlinks:true"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/etc/oracle-release" "followsymlinks:true"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/etc/centos-release" "followsymlinks:true"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/etc/altlinux-release" "followsymlinks:true"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/etc/redhat-release" "followsymlinks:true"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/etc/debian_version" "followsymlinks:true"
libguestfs: trace: is_file = 1
libguestfs: trace: filesize "/etc/debian_version"
libguestfs: trace: filesize = 4
libguestfs: trace: head_n 1 "/etc/debian_version"
libguestfs: trace: head_n = ["8.1"]
libguestfs: trace: is_file "/bin/bash" "followsymlinks:true"
libguestfs: trace: is_file = 1
libguestfs: trace: realpath "/bin/bash"
libguestfs: trace: realpath = "/bin/bash"
libguestfs: trace: file_architecture "/bin/bash"
libguestfs: trace: file "/bin/bash"
libguestfs: trace: file = "ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=a8ff57737fe60fba639d91d603253f4cdc6eb9f7, stripped"
libguestfs: trace: file_architecture = "x86_64"
libguestfs: trace: is_file "/etc/fstab" "followsymlinks:true"
libguestfs: trace: is_file = 1
libguestfs: trace: filesize "/etc/fstab"
libguestfs: trace: filesize = 665
libguestfs: trace: is_file "/etc/mdadm.conf" "followsymlinks:true"
libguestfs: trace: is_file = 0
libguestfs: trace: aug_init "/" 48
libguestfs: trace: aug_init = 0
libguestfs: trace: aug_rm "/augeas/load/*[ "/etc/fstab/" !~ regexp('^') + glob(incl) + regexp('/.*') and "/etc/mdadm.conf/" !~ regexp('^') + glob(incl) + regexp('/.*') ]"
libguestfs: trace: aug_rm = 1191
libguestfs: trace: aug_load
libguestfs: trace: aug_load = 0
libguestfs: trace: aug_match "/augeas/files//error"
libguestfs: trace: aug_match = []
libguestfs: trace: list_md_devices
libguestfs: trace: list_md_devices = []
libguestfs: trace: aug_match "/files/etc/fstab/*[label() != '#comment']"
libguestfs: trace: aug_match = ["/files/etc/fstab/1", "/files/etc/fstab/2", "/files/etc/fstab/3"]
libguestfs: trace: aug_get "/files/etc/fstab/1/spec"
libguestfs: trace: aug_get = "UUID=a1d1d2db-71f3-4354-95ba-fc582e84c26e"
libguestfs: trace: aug_get "/files/etc/fstab/1/file"
libguestfs: trace: aug_get = "/"
libguestfs: trace: findfs_uuid "a1d1d2db-71f3-4354-95ba-fc582e84c26e"
libguestfs: trace: findfs_uuid = "/dev/sda2"
libguestfs: trace: aug_get "/files/etc/fstab/1/vfstype"
libguestfs: trace: aug_get = "ext4"
libguestfs: trace: aug_get "/files/etc/fstab/2/spec"
libguestfs: trace: aug_get = "UUID=9b14f996-b8a0-4cdc-9dcc-946ebcd8fc5e"
libguestfs:
trace: aug_get "/files/etc/fstab/2/file"
libguestfs: trace: aug_get = "/boot"
libguestfs: trace: findfs_uuid "9b14f996-b8a0-4cdc-9dcc-946ebcd8fc5e"
libguestfs: trace: findfs_uuid = "/dev/sda1"
libguestfs: trace: aug_get "/files/etc/fstab/2/vfstype"
libguestfs: trace: aug_get = "ext4"
libguestfs: trace: aug_get "/files/etc/fstab/3/spec"
libguestfs: trace: aug_get = "/dev/sr0"
libguestfs: trace: aug_get "/files/etc/fstab/3/file"
libguestfs: trace: aug_get = "/media/cdrom0"
libguestfs: trace: aug_close
libguestfs: trace: aug_close = 0
libguestfs: trace: is_file "/etc/HOSTNAME"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/etc/hostname"
libguestfs: trace: is_file = 1
libguestfs: trace: filesize "/etc/hostname"
libguestfs: trace: filesize = 6
libguestfs: trace: head_n 1 "/etc/hostname"
libguestfs: trace: head_n = ["multi6"]
libguestfs: trace: umount_all
libguestfs: trace: umount_all = 0
libguestfs: trace: inspect_get_roots
libguestfs: trace: inspect_get_roots = ["/dev/sda2"]
libguestfs: trace: inspect_os = ["/dev/sda2"]
libguestfs: trace: inspect_get_mountpoints "/dev/sda2"
libguestfs: trace: inspect_get_mountpoints = ["/", "/dev/sda2", "/boot", "/dev/sda1"]
libguestfs: trace: mount "/dev/sda2" "/"
libguestfs: trace: mount = 0
libguestfs: trace: mount "/dev/sda1" "/boot"
libguestfs: trace: mount = 0
libguestfs: trace: inspect_get_arch "/dev/sda2"
libguestfs: trace: inspect_get_arch = "x86_64"
libguestfs: trace: inspect_get_type "/dev/sda2"
libguestfs: trace: inspect_get_type = "linux"
libguestfs: trace: is_dir "/tmp" "followsymlinks:true"
libguestfs: trace: is_dir = 1
libguestfs: trace: inspect_get_type "/dev/sda2"
libguestfs: trace: inspect_get_type = "linux"
libguestfs: trace: is_file "/var/lib/random-seed"
[ 3.4] Setting a random seed
libguestfs: trace: is_file = 0
libguestfs:
trace: is_file "/var/lib/systemd/random-seed"
libguestfs: trace: is_file = 1
libguestfs: trace: filesize "/var/lib/systemd/random-seed"
libguestfs: trace: filesize = 512
libguestfs: trace: truncate "/var/lib/systemd/random-seed"
libguestfs: trace: truncate = 0
libguestfs: trace: write_append "/var/lib/systemd/random-seed" "\x9e\x92\xa5\xae\xa3\x13\xb3Qt'\x1fn\x00\xd9\xf6\xcd\x1cYP\x14U\x1b\xfbc\xdd\xa2\x95\xd1\xdf\x0d\x94\xf7\xb8\xba$\x18z \xe2,\xd3\xd0u\xb9F\xd9\x87G\x8c\x16S\x90q\xf12(a\x89\xb1\xab\x8b\xd4\xd4M\xc4\xc6\xb0\x186\xe2A\x09\x99\xd1\xb8;\xee\x9b\xef\xee\x01co$\xfe\xf0I\xd5\x1a\xac{C&:y\xc8\xf2\xf5H\xe116\x97$\x02\xc9\xc0u\xcf7\x094\xb0SM\x8d\x0f\x0b\xc8\xf1\x1e\xae\xe0`\xbe\x87\x97\xc6\xf1\x07E\x99G\x1b\x89\x9c\x14\xfcx\xcd\xaf[[_\xc6%\x99:H\xba,4\xd4~\x0d\xb7\xf03<\xd5\x15\xef/\xa8T\xf6L\xee\xa9A\x8d\xa7\xc48r*\x0c\x9f\xde\x10/\xb0\x1a<@\xa8]2\x94{\xf0\x97S\xd6'\xc4\x1d\xff\xb5Y\x9bV\x0b`\x8d\x8d\xab\xd3\x02\x99z\xf3\x88\xff\xa1\xf7\x9et\xe3\xd0\xa9\xd9x\x19\xa4\x9c)P\x02z\xd7[K|f\x06-U%\x11\xf17\xedha\xb6\xf8f\x1b\xc5\x8fM\xab1;5"<truncated, original size 512 bytes>
libguestfs: trace: internal_write_append "/var/lib/systemd/random-seed" "\x9e\x92\xa5\xae\xa3\x13\xb3Qt'\x1fn\x00\xd9\xf6\xcd\x1cYP\x14U\x1b\xfbc\xdd\xa2\x95\xd1\xdf\x0d\x94\xf7\xb8\xba$\x18z \xe2,\xd3\xd0u\xb9F\xd9\x87G\x8c\x16S\x90q\xf12(a\x89\xb1\xab\x8b\xd4\xd4M\xc4\xc6\xb0\x186\xe2A\x09\x99\xd1\xb8;\xee\x9b\xef\xee\x01co$\xfe\xf0I\xd5\x1a\xac{C&:y\xc8\xf2\xf5H\xe116\x97$\x02\xc9\xc0u\xcf7\x094\xb0SM\x8d\x0f\x0b\xc8\xf1\x1e\xae\xe0`\xbe\x87\x97\xc6\xf1\x07E\x99G\x1b\x89\x9c\x14\xfcx\xcd\xaf[[_\xc6%\x99:H\xba,4\xd4~\x0d\xb7\xf03<\xd5\x15\xef/\xa8T\xf6L\xee\xa9A\x8d\xa7\xc48r*\x0c\x9f\xde\x10/\xb0\x1a<@\xa8]2\x94{\xf0\x97S\xd6'\xc4\x1d\xff\xb5Y\x9bV\x0b`\x8d\x8d\xab\xd3\x02\x99z\xf3\x88\xff\xa1\xf7\x9et\xe3\xd0\xa9\xd9x\x19\xa4\x9c)P\x02z\xd7[K|f\x06-U%\x11\xf17\xedha\xb6\xf8f\x1b\xc5\x8fM\xab1;5"<truncated, original size 512 bytes>
libguestfs: trace: internal_write_append = 0
libguestfs: trace: write_append = 0
libguestfs: trace: is_file "/var/lib/urandom/random-seed"
libguestfs: trace: is_file = 1
libguestfs: trace: filesize "/var/lib/urandom/random-seed"
libguestfs: trace: filesize = 512
libguestfs: trace: truncate "/var/lib/urandom/random-seed"
libguestfs: trace: truncate = 0
libguestfs: trace: write_append "/var/lib/urandom/random-seed" "\x87}\x96\x13\xa73\xd6\xc8\x7f\x93\xd0)\x1d\xcd\xf1\xab\xca?`[u\x80\x0b\xd4\xebIwC\xd2\x94\xfcm\xc9!\x0fj\x04\xe9\x92h\xdc\xf5\x07\xc3\xc5\xd4\xae\x1f\xff\xc9\xb0K%\x9f\xad\xff{Y\xbfT\xb2\x92\x0b\x03\xde<\xb2\xfe\xc7\xeb\x01\xb6\xd4!\xdb\xb1\x18\x1d6\xa9\xb9SO#\xae8\xb80\x1b|\xa4\xc3V\xda\x0e%\x81\xc1\x9a\xbfS\xa5\xeb\x94\xb9\xf0{\xe8 \xcb|\x00\xe8\xe2-\xfa\x87\x15\xbe\x96\xbb\xffW#\\x84\x83\x8c\x06C\xf9\xb7\xb9\xff!\x8c\x18\x17\xd92\x1a\xd6W\xc0\xab\x11\x04\x09G\xacG/\xd7\xe6g9\xd4\xbc\xa2gz\xee\x06s+\x8bn\xb9\xa0\x94&L\xec\x7f\xbde)\xaf\xfa\xd6kt\xa06R&\xd6+-$\x0b\xaa\xf7\xf2i?\x1bnl\x0f8\xb9Kx\x0d\xb3\xf4\x0d\xae\xe0\x8a\x19\x1f\x05d2)\x88\xdb/\x9f\x1a"\x9b \xfc\xcf\xf87\xa5\x82\x18\x1a\x0d\xbf\xc7X7\x17%F\xa3~\xa9\xba^\x80H\xea\x11\xd9\xce\xf0\x98\xd7V"<truncated, original size 512 bytes>
libguestfs: trace: internal_write_append "/var/lib/urandom/random-seed" "\x87}\x96\x13\xa73\xd6\xc8\x7f\x93\xd0)\x1d\xcd\xf1\xab\xca?`[u\x80\x0b\xd4\xebIwC\xd2\x94\xfcm\xc9!\x0fj\x04\xe9\x92h\xdc\xf5\x07\xc3\xc5\xd4\xae\x1f\xff\xc9\xb0K%\x9f\xad\xff{Y\xbfT\xb2\x92\x0b\x03\xde<\xb2\xfe\xc7\xeb\x01\xb6\xd4!\xdb\xb1\x18\x1d6\xa9\xb9SO#\xae8\xb80\x1b|\xa4\xc3V\xda\x0e%\x81\xc1\x9a\xbfS\xa5\xeb\x94\xb9\xf0{\xe8 \xcb|\x00\xe8\xe2-\xfa\x87\x15\xbe\x96\xbb\xffW#\\x84\x83\x8c\x06C\xf9\xb7\xb9\xff!\x8c\x18\x17\xd92\x1a\xd6W\xc0\xab\x11\x04\x09G\xacG/\xd7\xe6g9\xd4\xbc\xa2gz\xee\x06s+\x8bn\xb9\xa0\x94&L\xec\x7f\xbde)\xaf\xfa\xd6kt\xa06R&\xd6+-$\x0b\xaa\xf7\xf2i?\x1bnl\x0f8\xb9Kx\x0d\xb3\xf4\x0d\xae\xe0\x8a\x19\x1f\x05d2)\x88\xdb/\x9f\x1a"\x9b \xfc\xcf\xf87\xa5\x82\x18\x1a\x0d\xbf\xc7X7\x17%F\xa3~\xa9\xba^\x80H\xea\x11\xd9\xce\xf0\x98\xd7V"<truncated, original size 512 bytes>
libguestfs: trace: internal_write_append = 0
libguestfs: trace: write_append = 0
libguestfs: trace: is_file "/var/lib/misc/random-seed"
libguestfs: trace: is_file = 0
libguestfs: trace: is_file "/etc/random-seed"
libguestfs: trace: is_file = 0
libguestfs: trace: inspect_get_type "/dev/sda2"
libguestfs: trace: inspect_get_type = "linux"
libguestfs: trace: inspect_get_distro "/dev/sda2"
libguestfs: trace: inspect_get_distro = "debian"
libguestfs: trace: inspect_get_major_version "/dev/sda2"
libguestfs: trace: inspect_get_major_version = 8
libguestfs: trace: mkdir_p "/usr/lib/virt-sysprep"
[ 3.4] Installing firstboot script: /utilities/1041/startup.sh
libguestfs: trace: mkdir_p = 0
libguestfs: trace: mkdir_p "/usr/lib/virt-sysprep/scripts"
libguestfs: trace: mkdir_p = 0
libguestfs: trace: write "/usr/lib/virt-sysprep/firstboot.sh" "#!/bin/sh -\x0a\x0a### BEGIN INIT INFO\x0a# Provides: virt-sysprep\x0a# Required-Start: $null\x0a# Should-Start: $all\x0a# Required-Stop: $null\x0a# Should-Stop: $all\x0a# Default-Start: 2 3 5\x0a# Default-Stop: 0 1 6\x0a# Short-Description: Start sc"<truncated, original size 1099 bytes>
libguestfs: trace: internal_write "/usr/lib/virt-sysprep/firstboot.sh" "#!/bin/sh -\x0a\x0a### BEGIN INIT INFO\x0a# Provides: virt-sysprep\x0a# Required-Start: $null\x0a# Should-Start: $all\x0a# Required-Stop: $null\x0a# Should-Stop: $all\x0a# Default-Start: 2 3 5\x0a# Default-Stop: 0 1 6\x0a# Short-Description: Start sc"<truncated, original size 1099 bytes>
libguestfs: trace: internal_write = 0
libguestfs: trace: write = 0
libguestfs: trace: chmod 493 "/usr/lib/virt-sysprep/firstboot.sh"
libguestfs: trace: chmod = 0
libguestfs: trace: is_dir "/etc/systemd/system"
libguestfs: trace: is_dir = 1
libguestfs: trace: mkdir_p "/usr/lib/systemd/system"
libguestfs: trace: mkdir_p = 0
libguestfs: trace: write "/usr/lib/systemd/system/guestfs-firstboot.service" "[Unit]\x0aDescription=libguestfs firstboot service\x0aAfter=network.target\x0aBefore=prefdm.service\x0a\x0a[Service]\x0aType=oneshot\x0aExecStart=/usr/lib/virt-sysprep/firstboot.sh start\x0aRemainAfterExit=yes\x0aStandardOutput=journal+console\x0aStandardError=inherit\x0a\x0a[Install]\x0aWanted"<truncated, original size 274 bytes>
libguestfs: trace: internal_write "/usr/lib/systemd/system/guestfs-firstboot.service" "[Unit]\x0aDescription=libguestfs firstboot service\x0aAfter=network.target\x0aBefore=prefdm.service\x0a\x0a[Service]\x0aType=oneshot\x0aExecStart=/usr/lib/virt-sysprep/firstboot.sh start\x0aRemainAfterExit=yes\x0aStandardOutput=journal+console\x0aStandardError=inherit\x0a\x0a[Install]\x0aWanted"<truncated, original size 274 bytes>
libguestfs: trace: internal_write = 0
libguestfs: trace: write = 0
libguestfs: trace: mkdir_p "/etc/systemd/system/default.target.wants"
libguestfs: trace: mkdir_p = 0
libguestfs: trace: ln_sf "/usr/lib/systemd/system/guestfs-firstboot.service" "/etc/systemd/system/default.target.wants"
libguestfs: trace: ln_sf = 0
libguestfs: trace: is_file "/usr/lib/systemd/system/firstboot.service"
libguestfs: trace: is_file = 0
libguestfs: trace: is_dir "/etc/rc.d"
libguestfs: trace: is_dir = 0
libguestfs: trace: is_dir "/etc/init.d"
libguestfs: trace: is_dir = 1
libguestfs: trace: mkdir_p "/etc/init.d"
libguestfs: trace: mkdir_p = 0
libguestfs: trace: mkdir_p "/etc/rc2.d"
libguestfs: trace: mkdir_p = 0
libguestfs: trace: mkdir_p "/etc/rc3.d"
libguestfs: trace: mkdir_p = 0
libguestfs: trace: mkdir_p "/etc/rc5.d"
libguestfs: trace: mkdir_p = 0
libguestfs: trace: ln_sf "/usr/lib/virt-sysprep/firstboot.sh" "/etc/init.d/guestfs-firstboot"
libguestfs: trace: ln_sf = 0
libguestfs: trace: ln_sf "../init.d/guestfs-firstboot" "/etc/rc2.d/S99guestfs-firstboot"
libguestfs: trace: ln_sf = 0
libguestfs: trace: ln_sf "../init.d/guestfs-firstboot" "/etc/rc3.d/S99guestfs-firstboot"
libguestfs: trace: ln_sf = 0
libguestfs: trace: ln_sf "../init.d/guestfs-firstboot" "/etc/rc5.d/S99guestfs-firstboot"
libguestfs: trace: ln_sf = 0
libguestfs: trace: rm_f "/etc/init.d/virt-sysprep-firstboot"
libguestfs: trace: rm_f = 0
libguestfs: trace: rm_f "/etc/rc2.d/S99virt-sysprep-firstboot"
libguestfs: trace: rm_f = 0
libguestfs: trace: rm_f "/etc/rc3.d/S99virt-sysprep-firstboot"
libguestfs: trace: rm_f = 0
libguestfs: trace: rm_f "/etc/rc5.d/S99virt-sysprep-firstboot"
libguestfs: trace: rm_f = 0
libguestfs: trace: write "/usr/lib/virt-sysprep/scripts/0001--utilities-1041-startup-sh" "#!/bin/bash\x0d\x0aecho "This is another startup script test" | tee -a /etc/issue\x0d\x0aecho "This is another startup script test" | tee -a /etc/issue.net\x0d\x0aecho "This is a motd startup test" | tee -a /etc/motd"
libguestfs: trace: internal_write "/usr/lib/virt-sysprep/scripts/0001--utilities-1041-startup-sh" "#!/bin/bash\x0d\x0aecho "This is another startup script test" | tee -a /etc/issue\x0d\x0aecho "This is another startup script test" | tee -a /etc/issue.net\x0d\x0aecho "This is a motd startup test" | tee -a /etc/motd"
libguestfs: trace: internal_write = 0
libguestfs: trace:
write = 0
libguestfs: trace: chmod 493 "/usr/lib/virt-sysprep/scripts/0001--utilities-1041-startup-sh"
libguestfs: trace: chmod = 0
libguestfs: trace: debug "sh" "fuser -k /sysroot"
libguestfs: trace: debug = NULL (error)
libguestfs: trace: ping_daemon
libguestfs: trace: ping_daemon = 0
libguestfs: trace: umount_all
libguestfs: trace: umount_all = 0
libguestfs: trace: shutdown
libguestfs: trace: internal_autosync
[ 3.4] Finishing off
libguestfs: trace: internal_autosync = 0
libguestfs: trace: shutdown = 0
libguestfs: trace: close
0
Startup Script Exec - virt-customize -x -a /var/lib/vz/images/1041/vm-1041-disk-1.qcow2 --firstboot=/utilities/1041/startup.sh
Startup Script stdout - [ 0.0] Examining the guest ...
[ 3.4] Setting a random seed
[ 3.4] Installing firstboot script: /utilities/1041/startup.sh
[ 3.4] Finishing off
7 years, 8 months
[PATCH 2/2] v2v: bootloaders: look for device.map also in /boot/grub (Grub2)
by Pino Toscano
On Debian-based systems, Grub2 is in /boot/grub (as already known after
commit 03b9f2b967c4c61a5acda6a3802317be109d213e), so make sure
device.map is changed even in this situation.
---
v2v/linux_bootloaders.ml | 1 +
1 file changed, 1 insertion(+)
diff --git a/v2v/linux_bootloaders.ml b/v2v/linux_bootloaders.ml
index 6582970..061d945 100644
--- a/v2v/linux_bootloaders.ml
+++ b/v2v/linux_bootloaders.ml
@@ -266,6 +266,7 @@ object (self)
"/files/etc/default/grub/GRUB_CMDLINE_LINUX";
"/files/etc/default/grub/GRUB_CMDLINE_LINUX_DEFAULT";
"/files/boot/grub2/device.map/*[label() != \"#comment\"]";
+ "/files/boot/grub/device.map/*[label() != \"#comment\"]";
]
method list_kernels =
--
2.9.3
7 years, 8 months
[PATCH 1/2] v2v: OVF: add Debian and Ubuntu osinfo variants
by Pino Toscano
Unfortunately, there are very few osinfo types available for Debian and
Ubuntu, so make sure to use them only when the version is enough, and
use the higher version available also for any following version.
---
v2v/OVF.ml | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/v2v/OVF.ml b/v2v/OVF.ml
index 0e09d29..1f838f5 100644
--- a/v2v/OVF.ml
+++ b/v2v/OVF.ml
@@ -105,6 +105,26 @@ and get_ostype = function
i_arch = "ppc64" | "ppc64le" } ->
"sles_11_ppc64"
+ (* Only Debian 7 is available, so use it for any 7+ version. *)
+ | { i_type = "linux"; i_distro = "debian"; i_major_version = v }
+ when v >= 7 ->
+ "debian_7"
+
+ (* Only Ubuntu 12.04 to 14.04 are available, so use them starting
+ * from 12.04, and 14.04 for anything after it.
+ *)
+ | { i_type = "linux"; i_distro = "ubuntu"; i_major_version = v;
+ i_arch = "ppc64" | "ppc64le" } when v >= 14 ->
+ "ubuntu_14_04_ppc64"
+
+ | { i_type = "linux"; i_distro = "ubuntu"; i_major_version = v }
+ when v >= 14 ->
+ "ubuntu_14_04"
+
+ | { i_type = "linux"; i_distro = "ubuntu"; i_major_version = maj;
+ i_minor_version = min } when maj >= 12 ->
+ sprintf "ubuntu_%d_%02d" maj min
+
| { i_type = "linux" } -> "OtherLinux"
| { i_type = "windows"; i_major_version = 5; i_minor_version = 1 } ->
--
2.9.3
7 years, 8 months