[PATCH 0/4] v2v: more control over device types
by Roman Kagan
The decision on which device type to use for disks, network and video
cards on output used to be taken deep inside the converting functions.
This is not always desirable. In particular, there are scenarios when
this decision is made before the convertion takes place. E.g. in
in-place mode, the decisions are taken and the output VM configuration
is created outside of v2v tool.
This patchset adds support for such scenarios. Specifically,
- the input configuration parsers are taught to extract network and
video device models in addition to storage controllers
- the converting functions are taught to take the requested device types
into consideration
- the main routine in in-place mode takes the relevant data from the
input VM and passes it to the converter
The copying mode may eventually also profit from this patchset by taking
command-line options for controlling device types, but this isn't
included here.
Roman Kagan (4):
v2v: collect source network and video adapter types
v2v: introduce requested guestcaps type
v2v: take requested caps into account when converting
v2v: in-place: request caps based on source config
test-data/phony-guests/guests.xml.in | 8 +++
v2v/convert_linux.ml | 49 +++++++++++----
v2v/convert_windows.ml | 4 +-
v2v/input_disk.ml | 2 +
v2v/input_libvirtxml.ml | 32 ++++++++++
v2v/input_ova.ml | 2 +
v2v/modules_list.ml | 3 +-
v2v/modules_list.mli | 3 +-
v2v/test-v2v-i-ova-formats.expected | 1 +
v2v/test-v2v-i-ova-gz.expected | 1 +
v2v/test-v2v-i-ova-two-disks.expected | 1 +
v2v/test-v2v-print-source.sh | 4 +-
v2v/types.ml | 73 +++++++++++++++++++----
v2v/types.mli | 17 +++++-
v2v/v2v.ml | 58 +++++++++++++++++-
v2v/windows_virtio.ml | 108 ++++++++++++++++++++++++----------
v2v/windows_virtio.mli | 8 ++-
17 files changed, 309 insertions(+), 65 deletions(-)
--
2.5.0
8 years, 9 months
"guestmount --rw" fails but "guestmount --ro" succeeds on Ubuntu 14.04
by Vadaseri Vadaseri
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
guestmount --ro -a agent-disk1.vmdk -i /mnt/vmdk --> Works fine
guestmount --rw -a agent-disk1.vmdk -i /mnt/vmdk
libguestfs: error: appliance closed the connection unexpectedly.
This usually means the libguestfs appliance crashed.
See http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs
for information about how to debug libguestfs and report bugs.
libguestfs: error: guestfs_launch failed.
This usually means the libguestfs appliance failed to start or crashed.
See http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs
or run 'libguestfs-test-tool' and post the *complete* output into a
bug report or message to the libguestfs mailing list.
root@ip-10-10-10-237:/home/ubuntu#
root@ip-10-10-10-237:/home/ubuntu# libguestfs-test-tool
************************************************************
* IMPORTANT NOTICE
*
* When reporting bugs, include the COMPLETE, UNEDITED
* output below in your bug report.
*
************************************************************
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SELinux: sh: 1: getenforce: not found
guestfs_get_append: (null)
guestfs_get_backend: direct
guestfs_get_autosync: 1
guestfs_get_cachedir: /var/tmp
guestfs_get_direct: 0
guestfs_get_hv: /usr/bin/qemu-system-x86_64
guestfs_get_memsize: 500
guestfs_get_network: 0
guestfs_get_path: /usr/lib/guestfs
guestfs_get_pgroup: 0
guestfs_get_program: libguestfs-test-tool
guestfs_get_recovery_proc: 1
guestfs_get_selinux: 0
guestfs_get_smp: 1
guestfs_get_tmpdir: /tmp
guestfs_get_trace: 0
guestfs_get_verbose: 1
host_cpu: x86_64
Launching appliance, timeout set to 600 seconds.
libguestfs: launch: program=libguestfs-test-tool
libguestfs: launch: version=1.24.5
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/tmp/libguestfskEpWec
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: command: run: /usr/bin/supermin-helper
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ -f checksum
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib/guestfs/supermin.d
supermin helper [00000ms] whitelist = (not specified)
supermin helper [00000ms] host_cpu = x86_64
supermin helper [00000ms] dtb_wildcard = (not specified)
supermin helper [00000ms] inputs:
supermin helper [00000ms] inputs[0] = /usr/lib/guestfs/supermin.d
supermin helper [00000ms] outputs:
supermin helper [00000ms] kernel = (none)
supermin helper [00000ms] dtb = (none)
supermin helper [00000ms] initrd = (none)
supermin helper [00000ms] appliance = (none)
checking modpath /lib/modules/3.13.0-74-generic is a directory
picked kernel vmlinuz-3.13.0-74-generic
supermin helper [00000ms] finished creating kernel
supermin helper [00001ms] visiting /usr/lib/guestfs/supermin.d
supermin helper [00001ms] visiting /usr/lib/guestfs/supermin.d/base.img
supermin helper [00001ms] visiting /usr/lib/guestfs/supermin.d/daemon.img.gz
supermin helper [00001ms] visiting /usr/lib/guestfs/supermin.d/hostfiles
supermin helper [00024ms] visiting /usr/lib/guestfs/supermin.d/init.img
supermin helper [00024ms] visiting /usr/lib/guestfs/supermin.d/udev-rules.img
supermin helper [00024ms] adding kernel modules
supermin helper [00074ms] finished creating appliance
libguestfs: checksum of existing appliance:
1e65adc8888c1deda2f34979f59b7cc96da3117296359a179975fa525a1daf96
libguestfs: [00076ms] begin testing qemu features
libguestfs: command: run: /usr/bin/qemu-system-x86_64
libguestfs: command: run: \ -nographic
libguestfs: command: run: \ -help
libguestfs: command: run: /usr/bin/qemu-system-x86_64
libguestfs: command: run: \ -nographic
libguestfs: command: run: \ -version
libguestfs: qemu version 2.0
libguestfs: command: run: /usr/bin/qemu-system-x86_64
libguestfs: command: run: \ -nographic
libguestfs: command: run: \ -machine accel=kvm:tcg
libguestfs: command: run: \ -device ?
libguestfs: [00168ms] finished testing qemu features
libguestfs: is_openable: /dev/kvm: No such file or directory
libguestfs: command: run: dmesg | grep -Eoh 'lpj=[[:digit:]]+'
libguestfs: read_lpj_from_dmesg: calculated lpj=9976312
[00181ms] /usr/bin/qemu-system-x86_64 \
-global virtio-blk-pci.scsi=off \
-nodefconfig \
-enable-fips \
-nodefaults \
-nographic \
-machine accel=kvm:tcg \
-m 500 \
-no-reboot \
-rtc driftfix=slew \
-no-hpet \
-no-kvm-pit-reinjection \
-kernel /var/tmp/.guestfs-0/kernel.2867 \
-initrd /var/tmp/.guestfs-0/initrd.2867 \
-device virtio-scsi-pci,id=scsi \
-drive file=/tmp/libguestfskEpWec/scratch.1,cache=unsafe,format=raw,id=hd0,if=none
\
-device scsi-hd,drive=hd0 \
-drive file=/var/tmp/.guestfs-0/root.2867,snapshot=on,id=appliance,cache=unsafe,if=none
\
-device scsi-hd,drive=appliance \
-device virtio-serial-pci \
-serial stdio \
-device sga \
-chardev socket,path=/tmp/libguestfskEpWec/guestfsd.sock,id=channel0 \
-device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
-append 'panic=1 console=ttyS0 udevtimeout=600 no_timer_check
lpj=9976312 acpi=off printk.time=1 cgroup_disable=memory root=/dev/sdb
selinux=0 guestfs_verbose=1 TERM=xterm-256color'
Warning: option deprecated, use lost_tick_policy property of kvm-pit instead.
Could not access KVM kernel module: No such file or directory
failed to initialize KVM: No such file or directory
Back to tcg accelerator.
Could not open option rom 'sgabios.bin': No such file or directory
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.13.0-74-generic (buildd@lcy01-07) (gcc
version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #118-Ubuntu SMP Thu Dec 17
22:52:10 UTC 2015 (Ubuntu 3.13.0-74.118-generic 3.13.11-ckt30)
[ 0.000000] Command line: panic=1 console=ttyS0 udevtimeout=600
no_timer_check lpj=9976312 acpi=off printk.time=1
cgroup_disable=memory root=/dev/sdb selinux=0 guestfs_verbose=1
TERM=xterm-256color
[ .000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001f3fdfff] usable
[ 0.000000] BIOS-e820: [mem 0x000000001f3fe000-0x000000001f3fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] SMBIOS 2.4 present.
[ 0.000000] No AGP bridge found
[ 0.000000] e820: last_pfn = 0x1f3fe max_arch_pfn = 0x400000000
[ 0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[ 0.000000] found SMP MP-table at [mem 0x000f0b10-0x000f0b1f]
mapped at [ffff8800000f0b10]
[ 0.000000] Scanning 1 areas for low memory corruption
[ 0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff]
[ 0.000000] init_memory_mapping: [mem 0x1f000000-0x1f1fffff]
[ 0.000000] init_memory_mapping: [mem 0x1c000000-0x1effffff]
[ 0.000000] init_memory_mapping: [mem 0x00100000-0x1bffffff]
[ 0.000000] init_memory_mapping: [mem 0x1f200000-0x1f3fdfff]
[ 0.000000] RAMDISK: [mem 0x1f27c000-0x1f3eefff]
[ 0.000000] No NUMA configuration found
[ 0.000000] Faking a node at [mem 0x0000000000000000-0x000000001f3fdfff]
[ 0.000000] Initmem setup node 0 [mem 0x00000000-0x1f3fdfff]
[ 0.000000] NODE_DATA [mem 0x1f3f9000-0x1f3fdfff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x00001000-0x00ffffff]
[ 0.000000] DMA32 [mem 0x01000000-0xffffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00001000-0x0009efff]
[ 0.000000] node 0: [mem 0x00100000-0x1f3fdfff]
[ 0.000000] SFI: Simple Firmware Interface v0.81 http://simplefirmware.org
[ 0.000000] Intel MultiProcessor Specification v1.4
[ 0.000000] MPTABLE: OEM ID: BOCHSCPU
[ 0.000000] MPTABLE: Product ID: 0.1
[ 0.000000] MPTABLE: APIC at: 0xFEE00000
[ 0.000000] Processor #0 (Bootup-CPU)
[ 0.000000] IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23
[ 0.000000] Processors: 1
[ 0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[ 0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
[ 0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000effff]
[ 0.000000] PM: Registered nosave memory: [mem 0x00f0000-0x000fffff]
[ 0.000000] e820: [mem 0x1f400000-0xfffbffff] available for PCI devices
[ 0.000000] Booting paravirtualized kernel on bare hardware
[ 0.000000] setup_percpu: NR_CPUS:256 nr_cpumask_bits:256
nr_cpu_ids:1 nr_node_ids:1
[ 0.000000] PERCPU: Embedded 27 pages/cpu @ffff88001f000000 s81536
r8192 d20864 u2097152
[ 0.000000] Built 1 zonelists in Node order, mobility grouping on.
Total pages: 125879
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: panic=1 console=ttyS0
udevtimeout=600 no_timer_check lpj=9976312 acpi=off printk.time=1
cgroup_disable=memory root=/dev/sdb selinux=0 guestfs_verbose=1
TERM=xterm-256color
[ 0.000000] Disabling memory control group subsystem
[ 0.000000] PID hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.000000] Checking apertue...
[ 0.000000] No AGP bridge found
[ 0.000000] Memory: 485196K/511600K available (7399K kernel code,
1146K rwdata, 3416K rodata, 1336K init, 1448K bss, 26404K reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] \tRCU dyntick-idle grace-period acceleration is enabled.
[ 0.000000] \tRCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=1.
[ 0.000000] \tOffload RCU callbacks from all CPUs
[ 0.000000] \tOffload RCU callbacks from CPUs: 0.
[ 0.000000] NR_IRQS:16640 nr_irqs:256 16
[ 0.000000] Console: colour *CGA 80x25
[ 0.000000] console [ttyS0] enabled
[ 0.000000] tsc: Fast TSC calibration failed
[ 0.000000] tsc: Unable to calibrate against PIT
[ 0.000000] tsc: No reference (HPET/PMTIMER) available
[ 0.000000] tsc: Marking TSC unstable due to could not calculate TSC khz
[ 0.028000] Calibrating delay loop (skipped) preset value.. 4988.15
BogoMIPS (lpj=9976312)
[ 0.028000] pid_max: default: 32768 minimum: 301
[ 0.028000] Security Framework initialized
[ 0.032000] AppArmor: AppArmor initialized
[ 0.032000] Yama: becoming mindful.
[ 0.040000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.044000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
[ 0.044000] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.044000] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.064000] Initializing cgroup subsys memory
[ 0.064000] Initializing cgroup subsys devices
[ 0.064000] Initializing cgroup subsys freezer
[ 0.064000] Initializing cgroup subsys blkio
[ 0.064000] Initializing cgroup subsys perf_event
[ 0.064000] Initializing cgroup subsys hugetlb
[ 0.068000] mce: CPU supports 10 MCE banks
[ 0.068000] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
[ 0.068000] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0
[ 0.068000] tlb_flushall_shift: -1
[ 0.484000] Freeing SMP alternatives memory: 32K (ffffffff81e6e000
- ffffffff81e76000)
[ 0.500000] ftrace: allocating 28598 entries in 112 pages
[ 0.624000] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 0.624000] smpboot: CPU0: AMD QEMU Virtual CPU version 2.0.0 (fam:
06, model: 06, stepping: 03)
[ 0.768000] APIC timer disabled due to verification failure
[ 0.772000] Performance Events: Broken PMU hardware detected, using
software events only.
[ 0.772000] Failed to access perfctr msr (MSR c0010004 is 0)
[ 0.804000] x86: Booted up 1 node, 1 CPUs
[ 0.804000] smpboot: Total of 1 processors activated (4988.15 BogoMIPS)
[ 0.816000] NMI watchdog: disabled (cpu0): hardware events not enabled
[ 0.824000] devtmpfs: initialized
[ 0.852000] EVM: security.selinux
[ 0.852000] EVM: security.SMACK64
[ 0.852000] EVM: security.ima
[ 0.852000] EVM: security.capability
[ 0.872000] pinctrl core: initialized pinctrl subsystem
[ 0.876000] regulator-dummy: no parameters
[ 0.876000] RTC time: 2:31:00, date: 02/27/16
[ 0.884000] NET: Registered protocol family 16
[ 0.888000] cpuidle: using governor ladder
[ 0.888000] cpuidle: using governor menu
[ 0.896000] PCI: Using configuration type 1 for base access
[ 0.924000] bio: create slab <bio-0> at 0
[ 0.928000] ACPI: Interpreter disabled.
[ 0.936000] vgaarb: loaded
[ 0.940000] SCSI subsystem initialized
[ 0.944000] usbcore: registered new interface driver usbfs
[ 0.944000] usbcore: registered new interface driver hub
[ 0.944000] usbcore: registered new device driver usb
[ 0.948000] PCI: Probing PCI hardware
[ 0.948000] PCI host bridge to bus 0000:00
[ 0.948000] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 0.952000] pci_bus 0000:00: root bus resource [mem 0x00000000-0xffffffffff]
[ 0.952000] pci_bus 0000:00: No busn resource found for root bus,
will use [bus 00-ff]
[ 0.964000] pci 0000:00:01.3: quirk: [io 0xb000-0xb03f] claimed by
PIIX4 ACPI
[ 0.964000] pci 0000:00:01.3: quirk: [io 0xb100-0xb10f] claimed by PIIX4 SMB
[ 0.984000] pci 0000:00:01.0: PIIX/ICH IRQ router [8086:7000]
[ 0.996000] NetLabel: Initializing
[ 0.996000] NetLabel: domain hash size = 128
[ 0.996000] NetLabel: protocols = UNLABELED CIPSOv4
[ 0.996000] NetLabel: unlabeled traffic allowed by default
[ 1.000000] Switched to clocksource refined-jiffies
[ 1.168010] AppArmor: AppArmor Filesystem Enabled
[ 1.168010] pnp: PnP ACPI: disabled
[ 1.204012] NET: Registered protocol family 2
[ 1.216013] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[ 1.216013] TCP bind hash table entries: 4096 (order: 4, 65536 bytes)
[ 1.216013] TCP: Hash tables configured (established 4096 bind 4096)
[ 1.216013] TCP: reno registered
[ 1.216013] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 1.216013] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 1.220013] NET: Registered protocol family 1
[ 1.220013] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[ 1.220013] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[ 1.220013] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[ 1.232014] Trying to unpack rootfs image as initramfs...
[ 1.256016] Freeing initrd memory: 1484K (ffff88001f27c000 -
ffff88001f3ef000)
[ 1.264016] platform rtc_cmos: registered platform RTC device (no
PNP device found)
[ 1.264016] microcode: AMD CPU family 0x6 not supported
[ 1.264016] Scanning for low memory corruption every 60 seconds
[ 1.268016] Initialise system trusted keyring
[ 1.272017] audit: initializing netlink socket (disabled)
[ 1.272017] type=2000 audit(1456540260.272:1): initialized
[ 1.412025] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[ 1.436027] zbud: loaded
[ 1.436027] VFS: Disk quotas dquot_6.5.2
[ 1.436027] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 1.456028] fuse init (API version 7.22)
[ 1.456028] msgmni has been set to 950
[ 1.456028] Key type big_key registered
[ 1.468029] Key type asymmetric registered
[ 1.468029] Asymmetric key parser 'x509' registered
[ 1.472029] Block layer SCSI generic (bsg) driver version 0.4
loaded (major 252)
[ 1.472029] io scheduler noop registered
[ 1.472029] io scheduler deadline registered (default)
[ 1.472029] io scheduler cfq registered
[ 1.480030] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[ 1.480030] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[ 1.480030] ipmi message handler version 39.2
[ 1.484030] virtio-pci 0000:00:02.0: PCI->APIC IRQ transform: INT A -> IRQ 34
[ 1.484030] virtio-pci 0000:00:03.0: PCI->APIC IRQ transform: INT A -> IRQ 35
[ 1.488030] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled
[ 1.496031] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud =
115200) is a 16550A
[ 1.540033] Linux agpgart interface v0.103
[ 1.568035] brd: module loaded
[ 1.580036] loop: module loaded
[ 1.592037] scsi0 : ata_piix
[ 1.592037] scsi1 : ata_piix
[ 1.592037] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc060 irq 14
[ 1.592037] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc068 irq 15
[ 1.608038] libphy: Fixed MDIO Bus: probed
[ 1.608038] tun: Universal TUN/TAP device driver, 1.6
[ 1.608038] tun: (C) 1999-2004 Max Krasnyansky <maxk(a)qualcomm.com>
[ 1.608038] PPP generic driver version 2.4.2
[ 1.616038] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.616038] ehci-pci: EHCI PCI platform driver
[ 1.616038] ehci-platform: EHCI generic platform driver
[ 1.616038] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.616038] ohci-pci: OHCI PCI platform driver
[ 1.620038] ohci-platform: OHCI generic platform driver
[ 1.620038] uhci_hcd: USB Universal Host Controller Interface driver
[ 1.620038] i8042: PNP: No PS/2 controller found. Probing ports directly.
[ 1.632039] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 1.632039] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 1.632039] mousedev: PS/2 mouse device common for all mice
[ 1.640040] input: AT Translated Set 2 keyboard as
/devices/platform/i8042/serio0/input/input0
[ 1.644040] rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0
[ 1.644040] rtc_cmos rtc_cmos: alarms up to one day, 114 bytes nvram
[ 1.644040] device-mapper: uevent: version 1.0.3
[ 1.652040] device-mapper: ioctl: 4.27.0-ioctl (2013-10-30)
initialised: dm-devel(a)redhat.com
[ 1.652040] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.656041] TCP: cubic registered
[ 1.656041] NET: Registered protocol family 10
[ 1.668041] NET: Registered protocol family 17
[ 1.668041] Key type dns_resolver registered
[ 1.672042] Loading compiled-in X.509 certificates
[ 1.688043] Loaded X.509 cert 'Magrathea: Glacier signing key:
148a253ccef5e29b7f508a4cfe5dc10e721c821c'
[ 1.688043] registered taskstats version 1
[ 1.704044] Key type trusted registered
[ 1.712044] Key type encrypted registered
[ 1.712044] AppArmor: AppArmor sha1 policy hashing enabled
[ 1.712044] IMA: No TPM chip found, activating TPM-bypass!
[ 1.716044] regulator-dummy: incomplete constraints, leaving on
[ 1.716044] Magic number: 4:690:511
[ 1.716044] pci 0000:00:01.3: hash matches
[ 1.720045] rtc_cmos rtc_cmos: setting system clock to 2016-02-27
02:31:02 UTC (1456540262)
[ 1.724045] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[ 1.724045] EDD information not available.
[ 1.800050] Freeing unused kernel memory: 1336K (ffffffff81d20000 -
ffffffff81e6e000)
[ 1.804050] Write protecting the kernel read-only data: 12288k
[ 1.808050] Freeing unused kernel memory: 780K (ffff88000173d000 -
ffff880001800000)
[ 1.824051] Freeing unused kernel memory: 680K (ffff880001b56000 -
ffff880001c00000)
supermin: mounting /proc
supermin: uptime: 1.90 0.64
supermin: ext2 mini initrd starting up: 4.1.6 zlib xz
supermin: cmdline: panic=1 console=ttyS0 udevtimeout=600
no_timer_check lpj=9976312 acpi=off printk.time=1
cgroup_disable=memory root=/dev/sdb selinux=0 guestfs_verbose=1
TERM=xterm-256color
supermin: mounting /sys
supermin: internal insmod megaraid_mm.ko
[ 1.948059] megaraid cmm: 2.20.2.7 (Release Date: Sun Jul 16
00:01:03 EST 2006)
supermin: internal insmod megaraid_mbox.ko
[ 1.972060] megaraid: 2.20.5.1 (Release Date: Thu Nov 16 15:32:35 EST 2006)
supermin: internal insmod megaraid_sas.ko
[ 1.992062] megasas: 06.700.06.00-rc1 Sat. Aug. 31 17:00:00 PDT 2013
supermin: internal insmod megaraid.ko
supermin: internal insmod libcrc32c.ko
supermin: internal insmod crc32-pclmul.ko
[ 2.032064] PCLMULQDQ-NI instructions are not detected.
insmod: init_module: crc32-pclmul.ko: No such device
supermin: internal insmod crct10dif-pclmul.ko
insmod: init_module: crct10dif-pclmul.ko: No such device
supermin: internal insmod crc-itu-t.ko
supermin: internal insmod crc32.ko
supermin: internal insmod crc-ccitt.ko
supermin: internal insmod crc7.ko
supermin: internal insmod crc8.ko
supermin: internal insmod sym53c8xx.ko
supermin: internal insmod ideapad_slidebar.ko
[ 2.108069] ideapad_slidebar: DMI does not match
insmod: init_module: ideapad_slidebar.ko: No such device
supermin: internal insmod sparse-keymap.ko
supermin: internal insmod ideapad-laptop.ko
supermin: internal insmod virtio-rng.ko
supermin: internal insmod virtio_scsi.ko
[ 2.144071] scsi2 : Virtio SCSI HBA
[ 2.160072] scsi 2:0:0:0: Direct-Access QEMU QEMU HARDDISK
2.0. PQ: 0 ANSI: 5
[ 2.164072] scsi 2:0:1:0: Direct-Access QEMU QEMU HARDDISK
2.0. PQ: 0 ANSI: 5
[ 2.372085] sd 2:0:0:0: [sda] 204800 512-byte logical blocks: (104
MB/100 MiB)
[ 2.376086] sd 2:0:0:0: Attached scsi generic sg0 type 0
[ 2.380086] sd 2:0:1:0: [sdb] 8388608 512-byte logical blocks:
(4.29 GB/4.00 GiB)
[ 2.380086] sd 2:0:1:0: [sdb] Write Protect is off
[ 2.380086] sd 2:0:1:0: [sdb] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
[ 2.384086] sd 2:0:1:0: Attached scsi generic sg1 type 0
[ 2.388086] sd 2:0:0:0: [sda] Write Protect is off
[ 2.388086] sd 2:0:0:0: [sda] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
[ 2.404087] sdb: unknown partition table
[ 2.408088] sda: unknown partition table
[ 2.416088] sd 2:0:1:0: [sdb] Attached SCSI disk
[ 2.416088] sd 2:0:0:0: [sda] Attached SCSI disk
supermin: picked /sys/block/sdb/dev as root device
supermin: creating /dev/root as block special 8:16
supermin: mounting new root on /root
[ 2.444090] EXT4-fs (sdb): mounting ext2 file system using the ext4 subsystem
[ 2.460091] EXT4-fs (sdb): mounted filesystem without journal. Opts:
supermin: chroot
Starting /init script ...
[ 3.420151] systemd-udevd[83]: starting version 204
[ 4.244202] random: nonblocking pool is initialized
[ 4.368210] ACPI Exception: AE_BAD_PARAMETER, Thread 487874560
could not acquire Mutex [0x1] (20131115/utmutex-285)
[ 4.368210] piix4_smbus 0000:00:01.3: SMBus Host Controller at
0xb100, revision 0
[ 6.064316] input: ImExPS/2 Generic Explorer Mouse as
/devices/platform/i8042/serio1/input/input2
[ 6.068316] kvm: Nested Virtualization enabled
[ 6.268329] device-mapper: multipath: version 1.6.0 loaded
/init: 63: /init: systemd-tmpfiles: not found
/init: 69: /init: cannot create
/sys/block/{h,s,ub,v}d*/queue/scheduler: Directory nonexistent
Cannot find device "eth0"
Cannot find device "eth0"
RTNETLINK answers: Network is unreachable
/init: 86: /init: mdadm: not found
/init: 90: /init: lvmetad: not found
Reading all physical volumes. This may take a while...
No volume groups found
No volume groups found
/init: 96: /init: ldmtool: not found
Linux (none) 3.13.0-74-generic #118-Ubuntu SMP Thu Dec 17 22:52:10 UTC
2015 x86_64 x86_64 x86_64 GNU/Linux
/dev:
total 0
crw------- 1 0 0 10, 235 Feb 27 02:31 autofs
drwxr-xr-x 2 0 0 560 Feb 27 02:31 block
drwxr-xr-x 2 0 0 80 Feb 27 02:31 bsg
crw------- 1 0 0 10, 234 Feb 27 02:31 btrfs-control
drwxr-xr-x 2 0 0 2820 Feb 27 02:31 char
crw------- 1 0 0 5, 1 Feb 27 02:31 console
lrwxrwxrwx 1 0 0 11 Feb 27 02:31 core -> /proc/kcore
crw------- 1 0 0 10, 60 Feb 27 02:31 cpu_dma_latency
crw------- 1 0 0 10, 203 Feb 27 02:31 cuse
drwxr-xr-x 5 0 0 100 Feb 27 02:31 disk
crw------- 1 0 0 10, 61 Feb 27 02:31 ecryptfs
lrwxrwxrwx 1 0 0 13 Feb 27 02:31 fd -> /proc/self/fd
crw-rw-rw- 1 0 0 1, 7 Feb 27 02:31 full
crw-rw-rw- 1 0 0 10, 229 Feb 27 02:31 fuse
drwxr-xr-x 3 0 0 140 Feb 27 02:31 input
crw-r--r-- 1 0 0 1, 11 Feb 27 02:31 kmsg
crw------- 1 0 0 10, 232 Feb 27 02:31 kvm
crw------- 1 0 0 10, 237 Feb 27 02:31 loop-control
brw------- 1 0 0 7, 0 Feb 27 02:31 loop0
brw------- 1 0 0 7, 1 Feb 27 02:31 loop1
brw------- 1 0 0 7, 2 Feb 27 02:31 loop2
brw------- 1 0 0 7, 3 Feb 27 02:31 loop3
brw------- 1 0 0 7, 4 Feb 27 02:31 loop4
brw------- 1 0 0 7, 5 Feb 27 02:31 loop5
brw------- 1 0 0 7, 6 Feb 27 02:31 loop6
brw------- 1 0 0 7, 7 Feb 27 02:31 loop7
drwxr-xr-x 2 0 0 60 Feb 27 02:31 mapper
crw------- 1 0 0 10, 227 Feb 27 02:31 mcelog
crw------- 1 0 0 10, 57 Feb 27 02:31 megadev0
crw------- 1 0 0 1, 1 Feb 27 02:31 mem
drwxr-xr-x 2 0 0 60 Feb 27 02:31 net
crw------- 1 0 0 10, 59 Feb 27 02:31 network_latency
crw------- 1 0 0 10, 58 Feb 27 02:31 network_throughput
crw-rw-rw- 1 0 0 1, 3 Feb 27 02:31 null
crw------- 1 0 0 1, 4 Feb 27 02:31 port
crw------- 1 0 0 108, 0 Feb 27 02:31 ppp
crw------- 1 0 0 10, 1 Feb 27 02:31 psaux
crw-rw-rw- 1 0 0 5, 2 Feb 27 02:31 ptmx
brw------- 1 0 0 1, 0 Feb 27 02:31 ram0
brw------- 1 0 0 1, 1 Feb 27 02:31 ram1
brw------- 1 0 0 1, 10 Feb 27 02:31 ram10
brw------- 1 0 0 1, 11 Feb 27 02:31 ram11
brw------- 1 0 0 1, 12 Feb 27 02:31 ram12
brw------- 1 0 0 1, 13 Feb 27 02:31 ram13
brw------- 1 0 0 1, 14 Feb 27 02:31 ram14
brw------- 1 0 0 1, 15 Feb 27 02:31 ram15
brw------- 1 0 0 1, 2 Feb 27 02:31 ram2
brw------- 1 0 0 1, 3 Feb 27 02:31 ram3
brw------- 1 0 0 1, 4 Feb 27 02:31 ram4
brw------- 1 0 0 1, 5 Feb 27 02:31 ram5
brw------- 1 0 0 1, 6 Feb 27 02:31 ram6
brw------- 1 0 0 1, 7 Feb 27 02:31 ram7
brw------ 1 0 0 1, 8 Feb 27 02:31 ram8
brw------- 1 0 0 1, 9 Feb 27 02:31 ram9
crw-rw-rw- 1 0 0 1, 8 Feb 27 02:31 random
crw------- 1 0 0 10, 62 Feb 27 02:31 rfkill
lrwxrwxrwx 1 0 0 4 Feb 27 02:31 rtc -> rtc0
crw------- 1 0 0 254, 0 Feb 27 02:31 rtc0
brw------- 1 0 0 8, 0 Feb 27 02:31 sda
brw------- 1 0 0 8, 16 Feb 27 02:31 sdb
crw------- 1 0 0 21, 0 Feb 27 02:31 sg0
crw------- 1 0 0 21, 1 Feb 27 02:31 sg1
crw------- 1 0 0 10, 231 Feb 27 02:31 snapshot
drwxr-xr-x 2 0 0 80 Feb 27 02:31 snd
lrwxrwxrwx 1 0 0 15 Feb 27 02:31 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 0 0 15 Feb 27 02:31 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 0 0 15 Feb 27 02:31 stdout -> /proc/self/fd/1
crw-rw-rw- 1 0 0 5, 0 Feb 27 02:31 tty
crw------- 1 0 0 4, 0 Feb 27 02:31 tty0
crw------- 1 0 0 4, 1 Feb 27 02:31 tty1
crw------- 1 0 0 4, 10 Feb 27 02:31 tty10
crw------- 1 0 0 4, 11 Feb 27 02:31 tty11
crw------- 1 0 0 4, 12 Feb 27 02:31 tty12
crw------- 1 0 0 4, 13 Feb 27 02:31 tty13
crw------- 1 0 0 4, 14 Feb 27 02:31 tty14
crw----- 1 0 0 4, 15 Feb 27 02:31 tty15
crw------- 1 0 0 4, 16 Feb 27 02:31 tty16
crw------- 1 0 0 4, 17 Feb 27 02:31 tty17
crw------- 1 0 0 4, 18 Feb 27 02:31 tty18
crw------- 1 0 0 4, 19 Feb 27 02:31 tty19
crw------- 1 0 0 4, 2 Feb 27 02:31 tty2
crw------ 1 0 0 4, 20 Feb 27 02:31 tty20
crw------- 1 0 0 4, 21 Feb 27 02:31 tty21
crw------- 1 0 0 4, 22 Feb 27 02:31 tty22
crw------- 1 0 0 4, 23 Feb 27 02:31 tty23
crw------- 1 0 0 4, 24 Feb 27 02:31 tty24
crw------- 1 0 0 4, 25 Feb 27 02:31 tty25
crw------- 0 0 4, 26 Feb 27 02:31 tty26
crw------- 1 0 0 4, 27 Feb 27 02:31 tty27
crw------- 1 0 0 4, 28 Feb 27 02:31 tty28
crw------- 1 0 0 4, 29 Feb 27 02:31 tty29
crw------- 1 0 0 4, 3 Feb 27 02:31 tty3
crw------- 1 0 0 4, 30 Feb 27 02:31 tty30
crw------- 1 0 0 4, 31 Feb27 02:31 tty31
crw------- 1 0 0 4, 32 Feb 27 02:31 tty32
crw------- 1 0 0 4, 33 Feb 27 02:31 tty33
crw------- 1 0 0 4, 34 Feb 27 02:31 tty34
crw------- 1 0 0 4, 35 Feb 27 02:31 tty35
crw------- 1 0 0 4, 36 Feb 27 02:31 tty36
crw------- 1 0 0 4, 37 Feb 27 02:31 tty37
crw------- 1 0 0 4, 38 Feb 27 02:31 tty38
crw------- 1 0 0 4, 39 Feb 27 02:31 tty39
crw------- 1 0 0 4, 4 Feb 27 02:31 tty4
crw------- 1 0 0 4, 40 Feb 27 02:31 tty40
crw------- 1 0 0 4, 41 Feb 27 02:31 tty41
crw------- 1 0 0 4, 42 Feb 27 021 tty42
crw------- 1 0 0 4, 43 Feb 27 02:31 tty43
crw------- 1 0 0 4, 44 Feb 27 02:31 tty44
crw------- 1 0 0 4, 45 Feb 27 02:31 tty45
crw------- 1 0 0 4, 46 Feb 27 02:31 tty46
crw------- 1 0 0 4, 47 Feb 27 02:31 tty47
crw------- 1 0 0 4, 48 Feb 27 02:31 tty48
crw------- 1 0 0 4, 49 Feb 27 02:31 tty49
crw------- 1 0 0 4, 5 Feb 27 02:31 tty5
crw------- 1 0 0 4, 50 Feb 27 02:31 tty50
crw------- 1 0 0 4, 51 Feb 27 02:31 tty51
crw------- 1 0 0 4, 52 Feb 27 02:31 tty52
crw------- 1 0 0 4, 53 Feb 27 02:31 tty53
crw------- 1 0 0 4, 54 Feb 27 02:31 tty54
crw------- 1 0 0 4, 55 Feb 27 02:31 tty55
crw------- 1 0 0 4, 56 Feb 27 02:31 tty56
crw------- 1 0 0 4, 57 Feb 27 02:31 tty57
crw------- 1 0 0 4, 58 Feb 27 02:31 tty58
crw------- 1 0 0 4, 59 Feb 27 02:31 tty59
crw------- 1 0 0 4, 6 Feb 27 02:31 tty6
crw------- 1 0 0 4, 60 Feb 27 02:31 tty60
crw------- 1 0 0 4, 61 Feb 27 02:31 tty61
crw------- 1 0 0 4, 62 Feb 27 02:31 tty62
crw------- 1 0 0 4, 63 Feb 27 02:31 tty63
crw------- 1 0 0 4, 7 Feb 27 02:31 tty7
cr------ 1 0 0 4, 8 Feb 27 02:31 tty8
crw------- 1 0 0 4, 9 Feb 27 02:31 tty9
crw------- 1 0 0 4, 64 Feb 27 02:31 ttyS0
crw------- 1 0 0 4, 65 Feb 27 02:31 ttyS1
crw------- 1 0 0 4, 74 Feb 27 02:31 ttyS10
crw------- 1 0 0 4, 75 Feb 27 02:31 ttyS11
crw------ 1 0 0 4, 76 Feb 27 02:31 ttyS12
crw------- 1 0 0 4, 77 Feb 27 02:31 ttyS13
crw------- 1 0 0 4, 78 Feb 27 02:31 ttyS14
crw------- 1 0 0 4, 79 Feb 27 02:31 ttyS15
crw------- 1 0 0 4, 80 Feb 27 02:31 ttyS16
crw------- 1 0 0 4, 81 Feb 27 02:31 ttyS17
crw---- 1 0 0 4, 82 Feb 27 02:31 ttyS18
crw------- 1 0 0 4, 83 Feb 27 02:31 ttyS19
crw------- 1 0 0 4, 66 Feb 27 02:31 ttyS2
crw------- 1 0 0 4, 84 Feb 27 02:31 ttyS20
crw------- 1 0 0 4, 85 Feb 27 02:31 ttyS21
crw------- 1 0 0 4, 86 Feb 27 02:31 ttyS22
crw------ 1 0 0 4, 87 Feb 27 02:31 ttyS23
crw------- 1 0 0 4, 88 Feb 27 02:31 ttyS24
crw------- 1 0 0 4, 89 Feb 27 02:31 ttyS25
crw------- 1 0 0 4, 90 Feb 27 02:31 ttyS26
crw------- 1 0 0 4, 91 Feb 27 02:31 ttyS27
crw------- 1 0 0 4, 92 Feb 27 02:31 ttyS28
------- 1 0 0 4, 93 Feb 27 02:31 ttyS29
crw------- 1 0 0 4, 67 Feb 27 02:31 ttyS3
crw------- 1 0 0 4, 94 Feb 27 02:31 ttyS30
crw------- 1 0 0 4, 95 Feb 27 02:31 ttyS31
crw------- 1 0 0 4, 68 Feb 27 02:31 ttyS4
crw------- 1 0 0 4, 69 Feb 27 02:31 ttyS5
cr------- 1 0 0 4, 70 Feb 27 02:31 ttyS6
crw------- 1 0 0 4, 71 Feb 27 02:31 ttyS7
crw------- 1 0 0 4, 72 Feb 27 02:31 ttyS8
crw------- 1 0 0 4, 73 Feb 27 02:31 ttyS9
crw------- 1 0 0 5, 3 Feb 27 02:31 ttyprintk
crw------- 1 0 0 10, 239 Feb 27 02:31 uhid
cr----- 1 0 0 10, 223 Feb 27 02:31 uinput
crw-rw-rw- 1 0 0 1, 9 Feb 27 02:31 urandom
crw------- 1 0 0 7, 0 Feb 27 02:31 vcs
crw------- 1 0 0 7, 1 Feb 27 02:31 vcs1
crw------- 1 0 0 7, 128 Feb 27 02:31 vcsa
crw------- 1 0 0 7, 129 Feb 27 02:31 vcsa1
crw------ 1 0 0 10, 63 Feb 27 02:31 vga_arbiter
crw------- 1 0 0 10, 137 Feb 27 02:31 vhci
crw------- 1 0 0 10, 238 Feb 27 02:31 vhost-net
drwxr-xr-x 2 0 0 60 Feb 27 02:31 virtio-ports
crw------- 1 0 0 251, 1 Feb 27 02:31 vport1p1
crw-rw-rw- 1 0 0 1, 5 Feb 27 02:31 zero
/dev/block:
total 0
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 1:0 -> ../ram0
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 1:1 -> ../ram1
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 1:10 -> ../ram10
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 1:11 -> ../ram11
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 1:12 -> ../ram12
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 1:13 -> ../ram13
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 1:14 -> ../ram14
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 1:15 -> ../ram15
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 1:2 -> ../ram2
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 1:3 -> ../ram3
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 1:4 -> ../ram4
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 1:5 -> ../ram5
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 1:6 -> ../ram6
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 1:7 -> ../ram7
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 1:8 -> ../ram8
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 1:9 -> ../ram9
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 7:0 -> ../loop0
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 7:1 -> ../loop1
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 7:2 -> ../loop2
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 7:3 -> ../loop3
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 7:4 -> ../loop4
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 7:5 -> ../loop5
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 7:6 -> ../loop6
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 7:7 -> ../loop7
lrwxrwxrwx 1 0 0 6 Feb 27 02:31 8:0 -> ../sda
lrwxrwxrwx 1 0 0 6 Feb 27 02:31 8:16 -> ../sdb
/dev/bsg:
total 0
crw------- 1 0 0 252, 0 Feb 27 02:31 2:0:0:0
crw------- 1 0 0 252, 1 Feb 27 02:31 2:0:1:0
/dev/char:
total 0
lrwxrwxrwx 1 0 0 6 Feb 27 02:31 108:0 -> ../ppp
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 10:1 -> ../psaux
lrwxrwxrwx 1 0 0 10 Feb 27 02:31 10:200 -> ../net/tun
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 10:223 -> ../uinput
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 10:227 -> ../mcelog
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 10:229 -> ../fuse
lrwxrwxrwx 1 0 0 11 Feb 27 02:31 10:231 -> ../snapshot
lrwxrwxrwx 1 0 0 6 Feb 27 02:31 10:232 -> ../kvm
lrwxrwxrwx 1 0 0 17 Feb 27 02:31 10:236 -> ../mapper/control
lrwxrwxrwx 1 0 0 15 Feb 27 02:31 10:237 -> ../loop-control
lrwxrwxrwx 1 0 0 11 Feb 27 02:31 10:57 -> ../megadev0
lrwxrwxrwx 1 0 0 21 Feb 27 02:31 10:58 -> ../network_throughput
lrwxrwxrwx 1 0 0 18 Feb 27 02:31 10:59 -> ../network_latency
lrwxrwxrwx 1 0 0 18 Feb 27 02:31 10:60 -> ../cpu_dma_latency
lrwxrwxrwx 1 0 0 11 Feb 27 02:31 10:61 -> ../ecryptfs
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 10:62 -> ../rfkill
lrwxrwxrwx 1 0 0 14 Feb 27 02:31 10:63 -> ../vga_arbiter
lrwxrwxrwx 1 0 0 15 Feb 27 02:31 13:32 -> ../input/mouse0
lrwxrwxrwx 1 0 0 13 Feb 27 02:31 13:63 -> ../input/mice
lrwxrwxrwx 1 0 0 15 Feb 27 02:31 13:64 -> ../input/event0
lrwxrwxrwx 1 0 0 15 Feb 27 02:31 13:65 -> ../input/event1
lrwxrwxrwx 1 0 0 6 Feb 27 02:31 1:1 -> ../mem
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 1:11 -> ../kmsg
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 1:3 -> ../null
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 1:4 -> ../port
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 1:5 -> ../zero
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 1:7 -> ../full
lrwxrwxrwx 1 0 0 9 Feb 27 02:318 -> ../random
lrwxrwxrwx 1 0 0 10 Feb 27 02:31 1:9 -> ../urandom
lrwxrwxrwx 1 0 0 6 Feb 27 02:31 21:0 -> ../sg0
lrwxrwxrwx 1 0 0 6 Feb 27 02:31 21:1 -> ../sg1
lrwxrwxrwx 1 0 0 11 Feb 27 02:31 251:1 -> ../vport1p1
lrwxrwxrwx 1 0 0 14 Feb 27 02:31 252:1 -> ../bsg/2:0:1:0
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 254:0 -> ../rtc0
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 4:0 -> ../tty0
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 4:1 -> ../tty1
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:10 -> ../tty10
lrwxrwxrwx 1 0 0 8 27 02:31 4:11 -> ../tty11
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:12 -> ../tty12
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:13 -> ../tty13
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:14 -> ../tty14
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:15 -> ../tty15
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:16 -> ../tt16
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:17 -> ../tty17
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:18 -> ../tty18
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:19 -> ../tty19
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 4:2 -> ../tty2
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:20 -> ../tty20
lrwxrwxrwx 1 0 0 8 F27 02:31 4:21 -> ../tty21
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:22 -> ../tty22
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:23 -> ../tty23
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:24 -> ../tty24
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:25 -> ../tty25
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:26 -> ../tty6
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:27 -> ../tty27
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:28 -> ../tty28
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:29 -> ../tty29
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 4:3 -> ../tty3
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:30 -> ../tty30
lrwxrwxrwx 1 0 0 8 Fe27 02:31 4:31 -> ../tty31
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:32 -> ../tty32
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:33 -> ../tty33
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:34 -> ../tty34
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:35 -> ../tty35
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:36 -> ../tty6
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:37 -> ../tty37
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:38 -> ../tty38
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:39 -> ../tty39
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 4:4 -> ../tty4
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:40 -> ../tty40
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:41 -> ../tty41
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:42 -> ../tty42
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:43 -> ../tty43
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:44 -> ../tty44
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:45 -> ../tty45
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:46 -> ../t46
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:47 -> ../tty47
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:48 -> ../tty48
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:49 -> ../tty49
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 4:5 -> ../tty5
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:50 -> ../tty50
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:51 -> ../tty51
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:52 -> ../tty52
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:53 -> ../tty53
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:54 -> ../tty54
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:55 -> ../tty55
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:56 -> ../y56
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:57 -> ../tty57
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:58 -> ../tty58
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:59 -> ../tty59
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 4:6 -> ../tty6
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:60 -> ../tty60
lrwxrwxrwx 1 0 0 8 eb 27 02:31 4:61 -> ../tty61
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:62 -> ../tty62
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:63 -> ../tty63
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:64 -> ../ttyS0
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:65 -> ../ttyS1
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:66 -> ../yS2
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:67 -> ../ttyS3
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:68 -> ../ttyS4
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:69 -> ../ttyS5
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 4:7 -> ../tty7
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:70 -> ../ttyS6
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:71 -> ../ttyS7
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 4:72 -> ../ttyS8
lrwxrwxrwx 1 0 0 8 Feb 272:31 4:73 -> ../ttyS9
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:74 -> ../ttyS10
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:75 -> ../ttyS11
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:76 -> ../ttyS12
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:77 -> ../ttyS13
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:78 -> ../ttyS14
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:79 -> ../ttyS15
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 4:8 -> ../tty8
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:80 -> ../ttyS16
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:81 -> ../ttyS17
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:82 -> ../ttyS18
lrwxrwxrwx 1 0 09 Feb 27 02:31 4:83 -> ../ttyS19
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:84 -> ../ttyS20
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:85 -> ../ttyS21
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:86 -> ../ttyS22
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:87 -> ../ttyS23
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:88 -> ../ttyS24
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:89 -> ../ttyS25
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 4:9 -> ../tty9
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:90 -> ../ttyS26
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:91 -> ../ttyS27
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:92 -> ../ttyS28
lrwxrxrwx 1 0 0 9 Feb 27 02:31 4:93 -> ../ttyS29
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:94 -> ../ttyS30
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 4:95 -> ../ttyS31
lrwxrwxrwx 1 0 0 6 Feb 27 02:31 5:0 -> ../tty
lrwxrwxrwx 1 0 0 10 Feb 27 02:31 5:1 -> ../console
lrwxrwxrwx 1 0 0 7 Feb 27 0:31 5:2 -> ../ptmx
lrwxrwxrwx 1 0 0 12 Feb 27 02:31 5:3 -> ../ttyprintk
lrwxrwxrwx 1 0 0 6 Feb 27 02:31 7:0 -> ../vcs
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 7:1 -> ../vcs1
lrwxrwxrwx 1 0 0 7 Feb 27 02:31 7:128 -> ../vcsa
lrwxrwxrwx 1 0 0 8 Feb 27 02:31 7:129 -> ../vcsa1
/ddisk:
total 0
drwxr-xr-x 2 0 0 80 Feb 27 02:31 by-id
drwxr-xr-x 2 0 0 80 Feb 27 02:31 by-path
drwxr-xr-x 2 0 0 60 Feb 27 02:31 by-uuid
/dev/disk/by-id:
total 0
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 scsi-0QEMU_QEMU_HARDDISK_appliance -> ../../sdb
lrwxrwxrwx 1 0 0 9 Feb 27 0231 scsi-0QEMU_QEMU_HARDDISK_hd0 -> ../../sda
/dev/disk/by-path:
total 0
lrwxrwxrwx 1 0 0 9 Feb 27 02:31
pci-0000:00:02.0-virtio-pci-virtio0-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx 1 0 0 9 Feb 27 02:31
pci-0000:00:02.0-virtio-pci-virtio0-scsi-0:0:1:0 -> ../../sdb
/dev/disk-uuid:
total 0
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 8ce34521-ed8a-4573-8c81-401b1cd38585
-> ../../sdb
/dev/input:
total 0
drwxr-xr-x 2 0 0 100 Feb 27 02:31 by-path
crw------- 1 0 0 13, 64 Feb 27 02:31 event0
crw-r----- 1 0 0 13, 65 Feb 27 02:31 event1
crw------- 1 0 0 1, 63 Feb 27 02:31 mice
crw-r----- 1 0 0 13, 32 Feb 27 02:31 mouse0
/dev/input/by-path:
total 0
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 platform-i8042-serio-0-event-kbd -> ../event0
lrwxrwxrwx 1 0 0 9 Feb 27 02:31 platform-i8042-serio-1-event-mouse -> ../event1
lrwxrwxrwx 1 0 0 eb 27 02:31 platform-i8042-serio-1-mouse -> ../mouse0
/dev/mapper:
total 0
crw------- 1 0 0 10, 236 Feb 27 02:31 control
/dev/net:
total 0
crw-rw-rw- 1 0 0 10, 200 Feb 27 02:31 tun
/dev/snd:
total 0
crw------- 1 0 0 116, 1 Feb 27 02:31 seq
crw------- 1 0 0 116,33 Feb 27 02:31 timer
/dev/virtio-ports:
total 0
lrwxrwxrwx 1 0 0 11 Feb 27 02:31 org.libguestfs.channel.0 -> ../vport1p1
rootfs / rootfs rw 0 0
proc /proc proc rw,relatime 0 0
/dev/root / ext2 rw,noatime 0 0
/proc /proc proc rw,relatime 0 0
/sys /sys sysfs rw,relatime 0 0
tmpfs /run tmpfs rw,nosuid,relatime,size=97904k,mode=755 0 0
/dev /dev devtmpfs rw,relatime,size=242612k,nr_inodes=60653mode=755 0 0
No volume groups found
No volume groups found
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
Module Size Used by
dm_multipath 22873 0
scsi_dh 14882 1 dm_multipath
kvm_amd 60102 0
kvm 455843 1 kvm_amd
mac_hid 13205 0
psmouse 106692 0
serio_raw 13462 0
i2c_piix4 22155 0
pata_acpi 13038 0
virtio_scsi 18330 1
virtio_rng 13135 0
ideapad_laptop 18216 0
sparse_keymap 13948 1 ideapad_laptop
sym53c8xx 80827 0
crc8 12893 0
crc7 12703 0
crc_ccitt 12707 0
crc32 12714 0
crc_itu_t 12707 0
libcrc32c 12644 0
megaraid 44120 0
megaraid_sas 91199 0
megaraid_mbox 40158 0
megaraid_mm 18253 1 megaraid_mbox
Sat Feb 27 02:31:17 UTC 2016
clocksource: refined-jiffies
uptime: 13.57 1.40
verbose daemon enabled
linux commmand line: panic=1 console=ttyS0 udevtimeout=600
no_timer_check lpj=9976312 acpi=off printk.time=1
cgroup_disable=memory root=/dev/sdb selinux=0 guestfs_verbose=1
TERM=xterm-256color
trying to open virtio-serial channel
'/dev/virtio-ports/org.libguestfs.channel.0'
udevadm settle
libguestfs: recv_from_daemon: received GUESTFS_LAUNCH_FLAG
libguestfs: [25908ms] appliance is up
Guest launched OK.
guestfsd: main_loop: new request, len 0x3c
udevadm settle
parted -s -- /dev/sda mklabel msdos mkpart primary 128s -128s
Warning: The resulting partition is not properly aligned for best performance.
udevadm settle
guestfsd: main_loop: proc 210 (part_disk) took 1.42 seconds
guestfsd: main_loop: new request, len 0x50
wipefs --help
wipefs -a /dev/sda1
mke2fs -t ext2 -F /dev/sda1
mke2fs 1.42.9 (4-Feb-2014)
guestfsd: main_loop: proc 278 (mkfs) took 0.51 seconds
guestfsd: main_loop: new request, len 0x40
mount -o /dev/sda1 /sysroot/
[ 16.388961] EXT4-fs (sda1): mounting ext2 file system using the
ext4 subsystem
[ 16.416963] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
guestfsd: main_loop: proc 1 (mount) took 0.23 seconds
guestfsd: main_loop: new request, len 0x34
guestfsd: main_loop: proc 3 (touch) took 0.02 seconds
guestfsd: main_loop: new request, len 0x28
umount /sysroot
fsync /dev/sda
guestfsd: main_loop: proc 282 (internal_autosync) took 0.14 seconds
libguestfs: sending SIGTERM to process 2881
libguestfs: closing guestfs handle 0x10bb150 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfskEpWec
===== TEST FINISHED OK =====
8 years, 9 months
[PATCH 1/2] added ntfscat_i api
by Matteo Cafasso
Adding ntfscat_i command for downloading files based on their inode number.
This allows the dowload of files unaccessible otherwise from a NTFS guest disk image.
Signed-off-by: Matteo Cafasso <noxdafox(a)gmail.com>
---
daemon/ntfs.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++
generator/actions.ml | 15 +++++++++++++
2 files changed, 77 insertions(+)
diff --git a/daemon/ntfs.c b/daemon/ntfs.c
index 568899e..58f62fa 100644
--- a/daemon/ntfs.c
+++ b/daemon/ntfs.c
@@ -266,3 +266,65 @@ do_ntfsfix (const char *device, int clearbadsectors)
return 0;
}
+
+int
+do_ntfscat_i (const mountable_t *mountable, int64_t inode)
+{
+ int r;
+ FILE *fp;
+ CLEANUP_FREE char *cmd = NULL;
+ char buffer[GUESTFS_MAX_CHUNK_SIZE];
+
+ /* Inode must be greater than 0 */
+ if (inode < 0) {
+ reply_with_error("Inode must be greater than 0");
+ return -1;
+ }
+
+ /* Construct the command. */
+ if (asprintf_nowarn (&cmd, "ntfscat -i %ld %s",
+ inode, mountable->device) == -1) {
+ reply_with_perror ("asprintf");
+ return -1;
+ }
+
+ if (verbose)
+ fprintf (stderr, "%s\n", cmd);
+
+ fp = popen (cmd, "r");
+ if (fp == NULL) {
+ reply_with_perror ("%s", cmd);
+ return -1;
+ }
+
+ /* Now we must send the reply message, before the file contents. After
+ * this there is no opportunity in the protocol to send any error
+ * message back. Instead we can only cancel the transfer.
+ */
+ reply (NULL, NULL);
+
+ while ((r = fread (buffer, 1, sizeof buffer, fp)) > 0) {
+ if (send_file_write (buffer, r) < 0) {
+ pclose (fp);
+ return -1;
+ }
+ }
+
+ if (ferror (fp)) {
+ fprintf (stderr, "fread: %ld: %m\n", inode);
+ send_file_end (1); /* Cancel. */
+ pclose (fp);
+ return -1;
+ }
+
+ if (pclose (fp) != 0) {
+ fprintf (stderr, "pclose: %ld: %m\n", inode);
+ send_file_end (1); /* Cancel. */
+ return -1;
+ }
+
+ if (send_file_end (0)) /* Normal end of file. */
+ return -1;
+
+ return 0;
+}
diff --git a/generator/actions.ml b/generator/actions.ml
index eb45392..18418aa 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -12891,6 +12891,21 @@ This is equivalent to C<sgdisk -e>.
See also L<sgdisk(8)>." };
+ { defaults with
+ name = "ntfscat_i"; added = (1, 33, 2);
+ style = RErr, [Mountable "device"; Int64 "inode"; FileOut "filename"], [];
+ proc_nr = Some 463;
+ progress = true; cancellable = true;
+ shortdesc = "download a file to the local machine given its inode";
+ longdesc = "\
+Download a file given its inode from a NTFS filesystem and save it as F<filename>
+on the local machine.
+
+This allows to download some otherwise unaccessible files such as the ones
+within the $Extend folder.
+
+F<filename> can also be a named pipe." };
+
]
(* Non-API meta-commands available only in guestfish.
--
2.7.0
8 years, 9 months
[PATCH v2 0/4] v2v: more control over device types
by Roman Kagan
The decision on which device type to use for disks, network and video
cards on output used to be taken deep inside the converting functions.
This is not always desirable. In particular, there are scenarios when
this decision is made before the convertion takes place. E.g. in
in-place mode, the decisions are taken and the output VM configuration
is created outside of v2v tool.
This patchset adds support for such scenarios. Specifically,
- the input configuration parsers are taught to extract network and
video device models in addition to storage controllers
- the converting functions are taught to take the requested device types
into consideration
- the main routine in in-place mode takes the relevant data from the
input VM and passes it to the converter
The copying mode may eventually also profit from this patchset by taking
command-line options for controlling device types, but this isn't
included here.
---
v2:
- add catch-all string-valued variants for source network and video adapter
models
- use match instead of mixing match and if
Roman Kagan (4):
v2v: collect source network and video adapter types
v2v: introduce requested guestcaps type
v2v: take requested caps into account when converting
v2v: in-place: request caps based on source config
test-data/phony-guests/guests.xml.in | 8 ++++
v2v/convert_linux.ml | 49 ++++++++++++++-----
v2v/convert_windows.ml | 4 +-
v2v/input_disk.ml | 2 +
v2v/input_libvirtxml.ml | 27 +++++++++++
v2v/input_ova.ml | 2 +
v2v/modules_list.ml | 3 +-
v2v/modules_list.mli | 3 +-
v2v/test-v2v-i-ova-formats.expected | 1 +
v2v/test-v2v-i-ova-gz.expected | 1 +
v2v/test-v2v-i-ova-two-disks.expected | 1 +
v2v/test-v2v-print-source.sh | 4 +-
v2v/types.ml | 77 +++++++++++++++++++++++++-----
v2v/types.mli | 19 +++++++-
v2v/v2v.ml | 58 +++++++++++++++++++++--
v2v/windows_virtio.ml | 89 ++++++++++++++++++++++++++---------
v2v/windows_virtio.mli | 6 +++
17 files changed, 298 insertions(+), 56 deletions(-)
--
2.5.0
8 years, 9 months
Re: [Libguestfs] Cubietruck: QEMU, KVM and Fedora
by Kashyap Chamarthy
[CCing the libguestfs mailing list - as Rich responded on IRC about your
question on timeout.]
On Sun, Feb 21, 2016 at 10:07 PM, Thomas Kee <xsited(a)yahoo.com> wrote:
> Hi Kashyap,
>
> Thanks for offering to help. The day job caused a pause and it took me an
> hour to reassert where I was in the process. I usually hang out on freenet
> as xsited. I am still reading the process for formally reporting the issue
> as described on the site.
>
> Walking through this has shown me some significant difference from
> previously working almost exclusively with qemu-system-x86_64. It's
> different. As you asserted before -cpu host is required on the cubietruck
> to allow kvm to be utilized due to the lack of emulation support.
>
> In the meantime, I was waiting to get my hands on a cortex-a15 for the
> purpose of sussing out an effort involved for a debian 8 host and a openwrt
> guest. Because the qemu-system-arm supports vexpress-a15 there is better
> emulation support, but compiling the guest kernel to match the target host
> cpu offers a better chance that kvm acceleration is utilize? In other word
> -cpu host is always better?
I haven't tested this in a while to generalize like that. But last time
tested (which was more than a year ago) Cubietruck, I had to use the
host CPU model for the guests[1]. And I don't have it with me
anymore to test again.
[1] Refer to this: https://bugzilla.redhat.com/show_bug.cgi?id=1171501
>
> qemu-system-arm -kernel zImage -dtb cortex_a15x4.dtb -m 512 -M vexpress-a15
> -cpu cortex-a15
>
> Is my fuzz understanding of this part correct?
>
> Below are the logs I collected since last weekend.
Regarding your timeout, from #libguestfs on Freenode, Rich says:
------
<rwmjones> kashyap: yes, they need to use the libguestfs-test-tool -t
option, basically because 32 bit arm is far too slow to run libguestfs
well (probably also they don't have KVM acceleration enabled in their
kernel)
<rwmjones> http://libguestfs.org/libguestfs-test-tool.1.html#options
<rwmjones> but yeah, they're going to have loads of trouble running
libguestfs on such slow hardware
------
> root@cubietruck:~# /usr/bin/qemu-system-arm --version
> QEMU emulator version 2.5.0 (Debian 1:2.5+dfsg-5), Copyright (c) 2003-2008
> Fabrice Bellard
>
> root@cubietruck:~# /usr/bin/libguestfs-test-tool -V
> libguestfs-test-tool 1.30.6
> root@cubietruck:~# /usr/bin/libguestfs-test-tool
> ************************************************************
> * IMPORTANT NOTICE
> *
> * When reporting bugs, include the COMPLETE, UNEDITED
> * output below in your bug report.
> *
> ************************************************************
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> SELinux: sh: 1: getenforce: not found
> guestfs_get_append: (null)
> guestfs_get_autosync: 1
> guestfs_get_backend: direct
> guestfs_get_backend_settings: []
> guestfs_get_cachedir: /var/tmp
> guestfs_get_direct: 0
> guestfs_get_hv: /usr/bin/qemu-system-arm
> guestfs_get_memsize: 500
> guestfs_get_network: 0
> guestfs_get_path: /usr/lib/arm-linux-gnueabihf/guestfs
> guestfs_get_pgroup: 0
> guestfs_get_program: libguestfs-test-tool
> guestfs_get_recovery_proc: 1
> guestfs_get_selinux: 0
> guestfs_get_smp: 1
> guestfs_get_tmpdir: /tmp
> guestfs_get_trace: 0
> guestfs_get_verbose: 1
> host_cpu: arm
> Launching appliance, timeout set to 600 seconds.
> libguestfs: launch: program=libguestfs-test-tool
> libguestfs: launch: version=1.30.6
> libguestfs: launch: backend registered: unix
> libguestfs: launch: backend registered: uml
> libguestfs: launch: backend registered: libvirt
> libguestfs: launch: backend registered: direct
> libguestfs: launch: backend=direct
> libguestfs: launch: tmpdir=/tmp/libguestfssaEUV0
> libguestfs: launch: umask=0022
> libguestfs: launch: euid=0
> libguestfs: [00005ms] begin building supermin appliance
> libguestfs: [00006ms] run supermin
> libguestfs: command: run: /usr/bin/supermin
> libguestfs: command: run: \ --build
> libguestfs: command: run: \ --verbose
> libguestfs: command: run: \ --if-newer
> libguestfs: command: run: \ --lock /var/tmp/.guestfs-0/lock
> libguestfs: command: run: \ --copy-kernel
> libguestfs: command: run: \ -f ext2
> libguestfs: command: run: \ --host-cpu arm
> libguestfs: command: run: \ --dtb vexpress*a15-tc1.dtb
> libguestfs: command: run: \ /usr/lib/arm-linux-gnueabihf/guestfs/supermin.d
> libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
> supermin: version: 5.1.14
> supermin: package handler: debian/dpkg
> supermin: acquiring lock on /var/tmp/.guestfs-0/lock
> supermin: if-newer: output does not need rebuilding
> libguestfs: [00075ms] finished building supermin appliance
> libguestfs: [00076ms] begin testing qemu features
> libguestfs: command: run: /usr/bin/qemu-system-arm
> libguestfs: command: run: \ -display none
> libguestfs: command: run: \ -help
> libguestfs: command: run: /usr/bin/qemu-system-arm
> libguestfs: command: run: \ -display none
> libguestfs: command: run: \ -version
> libguestfs: qemu version 2.5
> libguestfs: command: run: /usr/bin/qemu-system-arm
> libguestfs: command: run: \ -display none
> libguestfs: command: run: \ -M virt
> libguestfs: command: run: \ -machine accel=kvm:tcg
> libguestfs: command: run: \ -device ?
> libguestfs: [00573ms] finished testing qemu features
> [00633ms] /usr/bin/qemu-system-arm \
> -global virtio-blk-device.scsi=off \
> -nodefconfig \
> -enable-fips \
> -nodefaults \
> -display none \
> -M virt \
> -cpu host \
> -machine accel=kvm:tcg \
> -m 500 \
> -no-reboot \
> -rtc driftfix=slew \
> -global kvm-pit.lost_tick_policy=discard \
> -kernel /var/tmp/.guestfs-0/appliance.d/kernel \
> -dtb /var/tmp/.guestfs-0/appliance.d/dtb \
> -initrd /var/tmp/.guestfs-0/appliance.d/initrd \
> -device virtio-scsi-device,id=scsi \
> -drive
> file=/tmp/libguestfssaEUV0/scratch.1,cache=unsafe,format=raw,id=hd0,if=none
> \
> -device scsi-hd,drive=hd0 \
> -drive
> file=/var/tmp/.guestfs-0/appliance.d/root,snapshot=on,id=appliance,cache=unsafe,if=none
> \
> -device scsi-hd,drive=appliance \
> -device virtio-serial-device \
> -serial stdio \
> -chardev socket,path=/tmp/libguestfssaEUV0/guestfsd.sock,id=channel0 \
> -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
> -append 'panic=1 mem=500M console=ttyAMA0 udevtimeout=6000
> udev.event-timeout=6000 no_timer_check acpi=off printk.time=1
> cgroup_disable=memory root=/dev/sdb selinux=0 guestfs_verbose=1
> TERM=xterm-256color'
> qemu-system-arm: Warning: global kvm-pit.lost_tick_policy has invalid class
> name
> Alarm clock
>
>
> root@cubietruck:~# virt-host-validate
> QEMU: Checking for hardware virtualization
> : WARN (Only emulated CPUs are available, performance will be significantly
> limited)
> QEMU: Checking if device /dev/vhost-net exists
> : WARN (Load the 'vhost_net' module to improve performance of virtio
> networking)
> QEMU: Checking if device /dev/net/tun exists
> : PASS
> QEMU: Checking for cgroup 'memory' controller support
> : WARN (Enable CONFIG_MEMCG in kernel Kconfig file)
> QEMU: Checking for cgroup 'cpu' controller support
> : PASS
> QEMU: Checking for cgroup 'cpu' controller mount-point
> : PASS
> QEMU: Checking for cgroup 'cpuacct' controller support
> : PASS
> QEMU: Checking for cgroup 'cpuacct' controller mount-point
> : PASS
> QEMU: Checking for cgroup 'devices' controller support
> : PASS
> QEMU: Checking for cgroup 'devices' controller mount-point
> : PASS
> QEMU: Checking for cgroup 'net_cls' controller support
> : PASS
> QEMU: Checking for cgroup 'net_cls' controller mount-point
> : PASS
> QEMU: Checking for cgroup 'blkio' controller support
> : PASS
> QEMU: Checking for cgroup 'blkio' controller mount-point
> : PASS
> QEMU: Checking for device assignment IOMMU support
> : WARN (Unknown if this platform has IOMMU support)
> LXC: Checking for Linux >= 2.6.26
> : PASS
> LXC: Checking for namespace ipc
> : PASS
> LXC: Checking for namespace mnt
> : PASS
> LXC: Checking for namespace pid
> : PASS
> LXC: Checking for namespace uts
> : PASS
> LXC: Checking for namespace net
> : PASS
> LXC: Checking for namespace user
> : PASS
> LXC: Checking for cgroup 'memory' controller support
> : FAIL (Enable CONFIG_MEMCG in kernel Kconfig file)
> LXC: Checking for cgroup 'cpu' controller support
> : PASS
> LXC: Checking for cgroup 'cpu' controller mount-point
> : PASS
> LXC: Checking for cgroup 'cpuacct' controller support
> : PASS
> LXC: Checking for cgroup 'cpuacct' controller mount-point
> : PASS
> LXC: Checking for cgroup 'devices' controller support
> : PASS
> LXC: Checking for cgroup 'devices' controller mount-point
> : PASS
> LXC: Checking for cgroup 'net_cls' controller support
> : PASS
> LXC: Checking for cgroup 'net_cls' controller mount-point
> : PASS
> LXC: Checking for cgroup 'freezer' controller support
> : PASS
> LXC: Checking for cgroup 'freezer' controller mount-point
> : PASS
> root@cubietruck:~#
>
> Kashyap Chamarthy
> February 16, 2016 at 1:08 PM
>
> On Tue, Feb 16, 2016 at 8:15 PM, Thomas Kee <xsited(a)yahoo.com> wrote:
>
> Thanks for the responds and the tool.
>
> I am getting an Alarm timeout when running libguestfs-test-tool and it
> tries to launch qemu-system-arm -cpu host for the first time.
> Not sure if it is bug report worthy yet.
>
> At this point, it's better if you hop over to #libguestfs channel on
> Freenode, I'm there (but it's late at the moment here in western
> Europe). I'm there during day time. And, there are other friendly
> developers that can help out.
>
> But let me look at
> virt-host-validate.
>
> Good luck!
>
> -t
>
> Kashyap Chamarthy
> February 16, 2016 at 1:33 AM
>
> On Tue, Feb 16, 2016 at 1:15 AM, Thomas Kee <xsited(a)yahoo.com> wrote:
>
> Oh boy. 10 second later, I remember /dev/kvm. Too much xen lately.
>
> :-) Yeah.
>
> A related handy tool is `virt-host-validate` , which will perform a
> bunch of KVM-related checks:
>
> ---------------------
> $ virt-host-validate
> QEMU: Checking for hardware virtualization
> : PASS
> QEMU: Checking if device /dev/kvm exists
> : PASS
> QEMU: Checking if device /dev/kvm is accessible
> : PASS
> QEMU: Checking if device /dev/vhost-net exists
> : PASS
> QEMU: Checking if device /dev/net/tun exists
> : PASS
> LXC: Checking for Linux >= 2.6.26
> : PASS
> ---------------------
>
> Regards,
> Kashyap
>
> thx
>
> Thomas Kee
> February 15, 2016 at 3:34 PM
>
> Hi,
>
> Thanks for the write up. Very helpful. Just a couple of doubts:
> How are you checking the kernel is built with KVM module enabled?
> With more current QEMU -cpu [ -machine ] still is valid ?
>
> Thanks,
>
> Thomas
>
>
> root@cubietruck:~# dmesg | grep CPU
> [ 0.000000] CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7),
> cr=30c5387d
> [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
> instruction cache
> [ 0.000000] PERCPU: Embedded 12 pages/cpu @ee5c0000 s19916 r8192 d21044
> u49152
> [ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
> [ 0.004932] CPU: Testing write buffer coherency: ok
> [ 0.046656] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
> [ 0.052951] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
> [ 0.053072] Brought up 2 CPUs
> [ 0.053106] CPU: All CPU(s) started in HYP mode.
> [ 0.053111] CPU: Virtualization extensions available.
> [ 1.572315] ledtrig-cpu: registered to indicate activity on CPUs
> [ 1.575670] ThumbEE CPU extension supported.
> root@cubietruck:~# dmesg | grep SMP
> [ 0.000000] Linux version 4.3.0-1-armmp-lpae
> (debian-kernel(a)lists.debian.org) (gcc version 4.9.3 (Debian 4.9.3-11) ) #1
> SMP Debian 4.3.5-1 (2016-02-06)
> [ 0.000000] Forcing write-allocate cache policy for SMP
> [ 0.053098] SMP: Total of 2 processors activated (96.00 BogoMIPS).
> root@cubietruck:~# dmesg | grep kvm
> [ 1.499947] kvm [1]: interrupt-controller@1c84000 IRQ51
> [ 1.500434] kvm [1]: timer IRQ19
> [ 1.500462] kvm [1]: Hyp mode initialized successfully
> root@cubietruck:~# uname -a
> Linux cubietruck 4.3.0-1-armmp-lpae #1 SMP Debian 4.3.5-1 (2016-02-06)
> armv7l GNU/Linux
> root@cubietruck:~# qemu-system-arm -machine help
> akita Sharp SL-C1000 (Akita) PDA (PXA270)
> borzoi Sharp SL-C3100 (Borzoi) PDA (PXA270)
> canon-a1100 Canon PowerShot A1100 IS
> cheetah Palm Tungsten|E aka. Cheetah PDA (OMAP310)
> collie Sharp SL-5500 (Collie) PDA (SA-1110)
> connex Gumstix Connex (PXA255)
> cubieboard cubietech cubieboard
> highbank Calxeda Highbank (ECX-1000)
> imx25-pdk ARM i.MX25 PDK board (ARM926)
> integratorcp ARM Integrator/CP (ARM926EJ-S)
> kzm ARM KZM Emulation Baseboard (ARM1136)
> lm3s6965evb Stellaris LM3S6965EVB
> lm3s811evb Stellaris LM3S811EVB
> mainstone Mainstone II (PXA27x)
> midway Calxeda Midway (ECX-2000)
> musicpal Marvell 88w8618 / MusicPal (ARM926EJ-S)
> n800 Nokia N800 tablet aka. RX-34 (OMAP2420)
> n810 Nokia N810 tablet aka. RX-44 (OMAP2420)
> netduino2 Netduino 2 Machine
> none empty machine
> nuri Samsung NURI board (Exynos4210)
> realview-eb ARM RealView Emulation Baseboard (ARM926EJ-S)
> realview-eb-mpcore ARM RealView Emulation Baseboard (ARM11MPCore)
> realview-pb-a8 ARM RealView Platform Baseboard for Cortex-A8
> realview-pbx-a9 ARM RealView Platform Baseboard Explore for Cortex-A9
> smdkc210 Samsung SMDKC210 board (Exynos4210)
> spitz Sharp SL-C3000 (Spitz) PDA (PXA270)
> sx1 Siemens SX1 (OMAP310) V2
> sx1-v1 Siemens SX1 (OMAP310) V1
> terrier Sharp SL-C3200 (Terrier) PDA (PXA270)
> tosa Sharp SL-6000 (Tosa) PDA (PXA255)
> verdex Gumstix Verdex (PXA270)
> versatileab ARM Versatile/AB (ARM926EJ-S)
> versatilepb ARM Versatile/PB (ARM926EJ-S)
> vexpress-a15 ARM Versatile Express for Cortex-A15
> vexpress-a9 ARM Versatile Express for Cortex-A9
> virt ARM Virtual Machine
> xilinx-zynq-a9 Xilinx Zynq Platform Baseboard for Cortex-A9
> z2 Zipit Z2 (PXA27x)
>
>
>
> --
>
> Thomas Kee
> February 15, 2016 at 4:15 PM
> Oh boy. 10 second later, I remember /dev/kvm. Too much xen lately.
>
> thx
>
>
> Thomas Kee
> February 15, 2016 at 3:34 PM
>
> Hi,
>
> Thanks for the write up. Very helpful. Just a couple of doubts:
> How are you checking the kernel is built with KVM module enabled?
> With more current QEMU -cpu [ -machine ] still is valid ?
>
> Thanks,
>
> Thomas
>
>
> root@cubietruck:~# dmesg | grep CPU
> [ 0.000000] CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7),
> cr=30c5387d
> [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
> instruction cache
> [ 0.000000] PERCPU: Embedded 12 pages/cpu @ee5c0000 s19916 r8192 d21044
> u49152
> [ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
> [ 0.004932] CPU: Testing write buffer coherency: ok
> [ 0.046656] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
> [ 0.052951] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
> [ 0.053072] Brought up 2 CPUs
> [ 0.053106] CPU: All CPU(s) started in HYP mode.
> [ 0.053111] CPU: Virtualization extensions available.
> [ 1.572315] ledtrig-cpu: registered to indicate activity on CPUs
> [ 1.575670] ThumbEE CPU extension supported.
> root@cubietruck:~# dmesg | grep SMP
> [ 0.000000] Linux version 4.3.0-1-armmp-lpae
> (debian-kernel(a)lists.debian.org) (gcc version 4.9.3 (Debian 4.9.3-11) ) #1
> SMP Debian 4.3.5-1 (2016-02-06)
> [ 0.000000] Forcing write-allocate cache policy for SMP
> [ 0.053098] SMP: Total of 2 processors activated (96.00 BogoMIPS).
> root@cubietruck:~# dmesg | grep kvm
> [ 1.499947] kvm [1]: interrupt-controller@1c84000 IRQ51
> [ 1.500434] kvm [1]: timer IRQ19
> [ 1.500462] kvm [1]: Hyp mode initialized successfully
> root@cubietruck:~# uname -a
> Linux cubietruck 4.3.0-1-armmp-lpae #1 SMP Debian 4.3.5-1 (2016-02-06)
> armv7l GNU/Linux
> root@cubietruck:~# qemu-system-arm -machine help
> akita Sharp SL-C1000 (Akita) PDA (PXA270)
> borzoi Sharp SL-C3100 (Borzoi) PDA (PXA270)
> canon-a1100 Canon PowerShot A1100 IS
> cheetah Palm Tungsten|E aka. Cheetah PDA (OMAP310)
> collie Sharp SL-5500 (Collie) PDA (SA-1110)
> connex Gumstix Connex (PXA255)
> cubieboard cubietech cubieboard
> highbank Calxeda Highbank (ECX-1000)
> imx25-pdk ARM i.MX25 PDK board (ARM926)
> integratorcp ARM Integrator/CP (ARM926EJ-S)
> kzm ARM KZM Emulation Baseboard (ARM1136)
> lm3s6965evb Stellaris LM3S6965EVB
> lm3s811evb Stellaris LM3S811EVB
> mainstone Mainstone II (PXA27x)
> midway Calxeda Midway (ECX-2000)
> musicpal Marvell 88w8618 / MusicPal (ARM926EJ-S)
> n800 Nokia N800 tablet aka. RX-34 (OMAP2420)
> n810 Nokia N810 tablet aka. RX-44 (OMAP2420)
> netduino2 Netduino 2 Machine
> none empty machine
> nuri Samsung NURI board (Exynos4210)
> realview-eb ARM RealView Emulation Baseboard (ARM926EJ-S)
> realview-eb-mpcore ARM RealView Emulation Baseboard (ARM11MPCore)
> realview-pb-a8 ARM RealView Platform Baseboard for Cortex-A8
> realview-pbx-a9 ARM RealView Platform Baseboard Explore for Cortex-A9
> smdkc210 Samsung SMDKC210 board (Exynos4210)
> spitz Sharp SL-C3000 (Spitz) PDA (PXA270)
> sx1 Siemens SX1 (OMAP310) V2
> sx1-v1 Siemens SX1 (OMAP310) V1
> terrier Sharp SL-C3200 (Terrier) PDA (PXA270)
> tosa Sharp SL-6000 (Tosa) PDA (PXA255)
> verdex Gumstix Verdex (PXA270)
> versatileab ARM Versatile/AB (ARM926EJ-S)
> versatilepb ARM Versatile/PB (ARM926EJ-S)
> vexpress-a15 ARM Versatile Express for Cortex-A15
> vexpress-a9 ARM Versatile Express for Cortex-A9
> virt ARM Virtual Machine
> xilinx-zynq-a9 Xilinx Zynq Platform Baseboard for Cortex-A9
> z2 Zipit Z2 (PXA27x)
>
>
>
> --
>
[...]
--
/kashyap
8 years, 9 months
[PATCH] added ntfscat_i api
by Matteo Cafasso
Adding ntfscat_i command for downloading files based on their inode number.
This allows the dowload of files unaccessible otherwise from a NTFS guest disk image.
---
daemon/ntfs.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++
generator/actions.ml | 15 +++++++++++++
2 files changed, 77 insertions(+)
diff --git a/daemon/ntfs.c b/daemon/ntfs.c
index 568899e..58f62fa 100644
--- a/daemon/ntfs.c
+++ b/daemon/ntfs.c
@@ -266,3 +266,65 @@ do_ntfsfix (const char *device, int clearbadsectors)
return 0;
}
+
+int
+do_ntfscat_i (const mountable_t *mountable, int64_t inode)
+{
+ int r;
+ FILE *fp;
+ CLEANUP_FREE char *cmd = NULL;
+ char buffer[GUESTFS_MAX_CHUNK_SIZE];
+
+ /* Inode must be greater than 0 */
+ if (inode < 0) {
+ reply_with_error("Inode must be greater than 0");
+ return -1;
+ }
+
+ /* Construct the command. */
+ if (asprintf_nowarn (&cmd, "ntfscat -i %ld %s",
+ inode, mountable->device) == -1) {
+ reply_with_perror ("asprintf");
+ return -1;
+ }
+
+ if (verbose)
+ fprintf (stderr, "%s\n", cmd);
+
+ fp = popen (cmd, "r");
+ if (fp == NULL) {
+ reply_with_perror ("%s", cmd);
+ return -1;
+ }
+
+ /* Now we must send the reply message, before the file contents. After
+ * this there is no opportunity in the protocol to send any error
+ * message back. Instead we can only cancel the transfer.
+ */
+ reply (NULL, NULL);
+
+ while ((r = fread (buffer, 1, sizeof buffer, fp)) > 0) {
+ if (send_file_write (buffer, r) < 0) {
+ pclose (fp);
+ return -1;
+ }
+ }
+
+ if (ferror (fp)) {
+ fprintf (stderr, "fread: %ld: %m\n", inode);
+ send_file_end (1); /* Cancel. */
+ pclose (fp);
+ return -1;
+ }
+
+ if (pclose (fp) != 0) {
+ fprintf (stderr, "pclose: %ld: %m\n", inode);
+ send_file_end (1); /* Cancel. */
+ return -1;
+ }
+
+ if (send_file_end (0)) /* Normal end of file. */
+ return -1;
+
+ return 0;
+}
diff --git a/generator/actions.ml b/generator/actions.ml
index eb45392..18418aa 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -12891,6 +12891,21 @@ This is equivalent to C<sgdisk -e>.
See also L<sgdisk(8)>." };
+ { defaults with
+ name = "ntfscat_i"; added = (1, 33, 12);
+ style = RErr, [Mountable "device"; Int64 "inode"; FileOut "filename"], [];
+ proc_nr = Some 463;
+ progress = true; cancellable = true;
+ shortdesc = "download a file to the local machine given its inode";
+ longdesc = "\
+Download a file given its inode from a NTFS filesystem and save it as F<filename>
+on the local machine.
+
+This allows to download some otherwise unaccessible files such as the ones
+within the $Extend folder.
+
+F<filename> can also be a named pipe." };
+
]
(* Non-API meta-commands available only in guestfish.
--
2.7.0
8 years, 9 months
Displaying mountables in the error output of guestfish etc
by Richard W.M. Jones
Cédric pointed out this problem we have:
$ guestmount -a /var/lib/libvirt/images/sles12sp1-pv.img -m '/dev/sda1:/:subvol=.snapshots/2/snapshot:btrfs' /mnt
libguestfs: error: mount_vfs: /dev/sda1 on / (options: 'subvol=.snapshots/2/snapshot'): mount: mount(2) failed: No such file or directory
guestmount: '/dev/sda1' could not be mounted.
guestmount: Check mount(8) man page to ensure options 'subvol=.snapshots/2/snapshot'
guestmount: are supported by the filesystem that is being mounted.
guestmount: Did you mean to mount one of these filesystems?
guestmount: btrfsvol:/dev/sda1/@ (btrfs)
guestmount: btrfsvol:/dev/sda1/@/.snapshots (btrfs)
guestmount: btrfsvol:/dev/sda1/@/opt (btrfs)
guestmount: btrfsvol:/dev/sda1/@/srv (btrfs)
guestmount: btrfsvol:/dev/sda1/@/tmp (btrfs)
guestmount: btrfsvol:/dev/sda1/@/home (btrfs)
[etc]
The problem here is the strings btrfsvol:... are the internal
"mountable" format, and shouldn't be displayed to end users for a
couple of reasons:
(1) It's not intended that people would "know about" these strings.
You're only compliant with the API if you get a string from an API
like guestfs_list_filesystems and pass it to another API like
guestfs_mount.
(2) These strings aren't actually useful, because you cannot pass them
back to the guestfish/guestmount `-m' option. Instead you have to use
the non-obvious form:
-m /dev/sda1:/:subvol=/@/tmp
How do we solve this? Trickier than it seems.
The first attempt to Cédric tried was to call
guestfs_internal_parse_mountable which conveniently splits the
internal string into a device and a volume. As the name suggests,
that is an internal API. We shouldn't be calling this from our tools,
and in any case it doesn't work unless we define -DGUESTFS_PRIVATE=1
all over the place. So that's a bad idea.
I think probably the way to solve this is with new public APIs for
returning the device and volume name from a mountable. Similar to
guestfs_internal_parse_mountable in fact, but a public API that we
commit to.
char *device = guestfs_mountable_device (g, const char *mountable);
char *volume = guestfs_mountable_volume (g, const char *mountable);
If a mountable doesn't have a (sub-)volume, the second API should
probably return a well-defined errno (ESRCH or ENOENT?).
The code in fish/options.c then just has to:
foreach fs in guestfs_list_filesystems:
device = guestfs_mountable_device fs
volume = guestfs_mountable_volume fs
if guestfs_mountable_volume fs returned well defined errno:
printf "-m %s" device
else
printf "-m %s:/:subvol=%s" device volume
That's my idea anyway ...
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
8 years, 10 months
[PATCH] doc: add info on per-function needed feature
by Pino Toscano
Document which feature, if any, is needed for a function; this should
help users in properly checking feature availability when using certain
functions.
---
generator/c.ml | 6 ++++++
generator/fish.ml | 10 +++++++++-
generator/gobject.ml | 8 ++++++++
generator/java.ml | 7 +++++++
generator/ocaml.ml | 7 +++++++
generator/perl.ml | 6 ++++++
generator/python.ml | 5 +++++
generator/ruby.ml | 5 +++++
8 files changed, 53 insertions(+), 1 deletion(-)
diff --git a/generator/c.ml b/generator/c.ml
index 7446412..9643a96 100644
--- a/generator/c.ml
+++ b/generator/c.ml
@@ -303,6 +303,12 @@ I<The caller must free the returned buffer after use>.\n\n"
pr "This function takes a key or passphrase parameter which
could contain sensitive material. Read the section
L</KEYS AND PASSPHRASES> for more information.\n\n";
+ (match f.optional with
+ | None -> ()
+ | Some opt ->
+ pr "This function depends on the feature C<%s>. See also
+L</guestfs_feature_available>.\n\n" opt
+ );
(match version_added f with
| Some version -> pr "(Added in %s)\n\n" version
| None -> assert false
diff --git a/generator/fish.ml b/generator/fish.ml
index 0cbc781..864f65d 100644
--- a/generator/fish.ml
+++ b/generator/fish.ml
@@ -897,9 +897,17 @@ Guestfish will prompt for these separately.\n\n";
if f.protocol_limit_warning then
pr "%s\n\n" protocol_limit_warning;
- match deprecation_notice ~replace_underscores:true f with
+ (match deprecation_notice ~replace_underscores:true f with
| None -> ()
| Some txt -> pr "%s\n\n" txt
+ );
+
+ (match f.optional with
+ | None -> ()
+ | Some opt ->
+ pr "This command depends on the feature C<%s>. See also
+L</feature-available>.\n\n" opt
+ );
) fishdoc_functions_sorted
(* Generate documentation for guestfish-only commands. *)
diff --git a/generator/gobject.ml b/generator/gobject.ml
index 60c053c..b89463e 100644
--- a/generator/gobject.ml
+++ b/generator/gobject.ml
@@ -1081,6 +1081,14 @@ guestfs_session_close (GuestfsSession *session, GError **err)
pr " *\n";
pr " * %s\n" doc;
+ (match f.optional with
+ | None -> ()
+ | Some opt ->
+ pr " * This function depends on the feature \"%s\".\n" opt;
+ pr " * See also guestfs_session_feature_available().\n";
+ pr " *\n";
+ );
+
pr " * Returns: ";
(match ret with
| RErr ->
diff --git a/generator/java.ml b/generator/java.ml
index f303048..4821b34 100644
--- a/generator/java.ml
+++ b/generator/java.ml
@@ -274,6 +274,13 @@ public class GuestFS {
pr " * %s\n" f.shortdesc;
pr " * </p><p>\n";
pr " * %s\n" doc;
+ (match f.optional with
+ | None -> ()
+ | Some opt ->
+ pr " * </p><p>\n";
+ pr " * This function depends on the feature \"%s\". See also {@link #feature_available}.\n"
+ opt;
+ );
pr " * </p>\n";
(match version_added f with
| None -> ()
diff --git a/generator/ocaml.ml b/generator/ocaml.ml
index 288e91f..ef04540 100644
--- a/generator/ocaml.ml
+++ b/generator/ocaml.ml
@@ -177,6 +177,13 @@ end
else
pr "%s(** alias for {!%s}" indent f.name;
+ (match f.optional with
+ | None -> ()
+ | Some opt ->
+ has_tags := true;
+ pr "\n\n This function depends on the feature \"%s\". See also {!feature_available}."
+ opt
+ );
(match f.deprecated_by with
| None -> ()
| Some replacement ->
diff --git a/generator/perl.ml b/generator/perl.ml
index f11477b..19cabb6 100644
--- a/generator/perl.ml
+++ b/generator/perl.ml
@@ -895,6 +895,12 @@ errnos:
pr "%s\n\n" longdesc;
if f.protocol_limit_warning then
pr "%s\n\n" protocol_limit_warning;
+ (match f.optional with
+ | None -> ()
+ | Some opt ->
+ pr "This function depends on the feature C<%s>. See also
+C<$g-E<gt>feature-available>.\n\n" opt
+ );
(match deprecation_notice f with
| None -> ()
| Some txt -> pr "%s\n\n" txt
diff --git a/generator/python.ml b/generator/python.ml
index c618bf0..9663fb4 100644
--- a/generator/python.ml
+++ b/generator/python.ml
@@ -817,6 +817,11 @@ class GuestFS(object):
match deprecation_notice f with
| None -> doc
| Some txt -> doc ^ "\n\n" ^ txt in
+ let doc =
+ match f.optional with
+ | None -> doc
+ | Some opt ->
+ doc ^ sprintf "\n\nThis function depends on the feature C<%s>. See also C<g.feature-available>." opt in
let doc = pod2text ~width:60 f.name doc in
let doc = List.map (fun line -> replace_str line "\\" "\\\\") doc in
let doc = String.concat "\n " doc in
diff --git a/generator/ruby.ml b/generator/ruby.ml
index 9567925..97ccfdc 100644
--- a/generator/ruby.ml
+++ b/generator/ruby.ml
@@ -481,6 +481,11 @@ get_all_event_callbacks (guestfs_h *g, size_t *len_rtn)
| { deprecated_by = None } -> doc
| { deprecated_by = Some alt } ->
doc ^ (sprintf "\n *\n * [Deprecated] In new code, use rdoc-ref:%s instead." alt) in
+ let doc =
+ match f.optional with
+ | None -> doc
+ | Some opt ->
+ doc ^ sprintf "\n *\n * [Feature] This function depends on the feature +%s+. See also {#feature_available}[rdoc-ref:feature_available]." opt in
(* Because Ruby documentation appears as C comments, we must
* replace any instance of "/*".
--
2.5.0
8 years, 10 months
[PATCH] perl: Don't embed API number in Sys::Guestfs.
by Richard W.M. Jones
It means you have to rerun `make -C perl clean ; make' every time you
add an API, and is useless anyway.
---
generator/perl.ml | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/generator/perl.ml b/generator/perl.ml
index 5250ce1..f11477b 100644
--- a/generator/perl.ml
+++ b/generator/perl.ml
@@ -722,16 +722,17 @@ package Sys::Guestfs;
use strict;
use warnings;
-# This version number changes whenever a new function
-# is added to the libguestfs API. It is not directly
-# related to the libguestfs version number.
+# This is always 1.0, never changes, and is unrelated to the
+# real libguestfs version. If you want to find the libguestfs
+# library version, use $g->version. If you want to test if
+# APIs/parameters are present, use %%guestfs_introspection.
use vars qw($VERSION);
-$VERSION = '0.%d';
+$VERSION = '1.0';
require XSLoader;
XSLoader::load ('Sys::Guestfs');
-" max_proc_nr;
+";
(* Methods. *)
pr "\
--
2.5.0
8 years, 10 months