Morgan Cox
2011-Nov-21 15:44 UTC
[Libguestfs] Virt-resize error (ntfs) : Fatal error: exception Guestfs.Error("ntfsresize_opts: /dev/vda2)
Hi. Libguestfs 1.14 Ubuntu 11.10 I am trying use virt-resize on NTFS partitions. I have installed Windows 2008 in an LVM partition (in order to use RAW) - I am trying to resize to a larger LVM partition. I have ntfsresize installed on the server - the windows partition is not encrypted. root at kvm1:~# ntfsresize -v ntfsresize v2011.4.12AR.4 (libntfs-3g) The attempt ends with an error Fatal error: exception Guestfs.Error("ntfsresize_opts: /dev/vda2) I have attached a txt file of the results where I have used export LIBGUESTFS_DEBUG=1 ; export LIBGUESTFS_TRACE=1 I have also tried using virt-resize --expand /dev/sda2 /dev/vgpool/w2008webtemplate /dev/vgpool/wintest2 as well as virt-resize --expand /dev/vda2 /dev/vgpool/w2008webtemplate /dev/vgpool/wintest2 Any ideas how to get it working ? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libguestfs/attachments/20111121/25034c7b/attachment.htm> -------------- next part -------------- A non-text attachment was scrubbed... Name: virt-resize Type: application/octet-stream Size: 94880 bytes Desc: not available URL: <http://listman.redhat.com/archives/libguestfs/attachments/20111121/25034c7b/attachment.obj>
Richard W.M. Jones
2011-Nov-21 15:55 UTC
[Libguestfs] Virt-resize error (ntfs) : Fatal error: exception Guestfs.Error("ntfsresize_opts: /dev/vda2)
On Mon, Nov 21, 2011 at 03:44:51PM +0000, Morgan Cox wrote:> root at kvm1:~# ntfsresize -v > ntfsresize v2011.4.12AR.4 (libntfs-3g) > > The attempt ends with an error > > Fatal error: exception Guestfs.Error("ntfsresize_opts: /dev/vda2) > > I have attached a txt file of the results where I have used > > export LIBGUESTFS_DEBUG=1 ; export LIBGUESTFS_TRACE=1Unfortunately it looks like the error from 'ntfsresize' went to stdout and we didn't capture it. But it must be something to do with ntfsresize not being able to understand the NTFS format, for some reason, I don't know what exactly.> I have also tried using > > virt-resize --expand /dev/sda2 /dev/vgpool/w2008webtemplate > /dev/vgpool/wintest2 > > as well as > > virt-resize --expand /dev/vda2 /dev/vgpool/w2008webtemplate > /dev/vgpool/wintest2 > > Any ideas how to get it working ?There are a couple of things you can do: (1) Avoid the ntfsresize step entirely by using the virt-resize --no-expand-content flag. This just avoids the error; it doesn't actually help you to resize the content in that partition. And/or: (2) Use virt-rescue on the resized guest and try doing the ntfsresize operation on the filesystem by hand: virt-rescue -a /dev/vgpool/wintest2 [..] ><rescue> ntfsresize /dev/vda2 You'll probably get some sort of error from that command, but it should at least print out more information about what's going on this time. I'd be interested to know what the error message is. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
Morgan Cox
2011-Nov-21 16:27 UTC
[Libguestfs] Virt-resize error (ntfs) : Fatal error: exception Guestfs.Error("ntfsresize_opts: /dev/vda2)
Hi. (sorry I replyed in last email rather than posting to the list..) Thanks - after issuing the commands it has correctly resized.. So it is possible to resize (with the extra steps..) Here is the output from the ntfsresize command:- I have attached the complete output in a txt file (virt-resize2.txt<https://mail.google.com/mail/?ui=2&ik=ed29735425&view=att&th=133c6f043b2c4ea6&attid=0.1&disp=safe&realattid=f_gv9opkt20&zw> *)* Regards ---------------------------- Welcome to virt-rescue, the libguestfs rescue shell. Note: The contents of / are the rescue appliance. You have to mount the guest's partitions under /sysroot before you can examine them. bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell groups: cannot find name for group ID 0 I have no name!@(none):/# ntfsresize /dev/vda2 ntfsresize v2011.4.12AR.4 (libntfs-3g) Device name : /dev/vda2 NTFS volume version: 3.1 Cluster size : 4096 bytes Current volume size: 14925427200 bytes (14926 MB) Current device size: 32105103360 bytes (32106 MB) New volume size : 32105099776 bytes (32106 MB) Checking filesystem consistency ... 100.00 percent completed Accounting clusters ... Space in use : 7860 MB (52.7%) Collecting resizing constraints ... WARNING: Every sanity check passed and only the dangerous operations left. Make sure that important data has been backed up! Power outage or computer crash may result major data loss! Are you sure you want to proceed (y/[n])? y Schedule chkdsk for NTFS consistency check at Windows boot time ... Resetting $LogFile ... (this might take a while) Updating $BadClust file ... Updating $Bitmap file ... Updating Boot record ... Syncing device ... Successfully resized NTFS on device '/dev/vda2'. ---------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libguestfs/attachments/20111121/e49f3f09/attachment.htm> -------------- next part -------------- root at kvm1:~# virt-rescue -a /dev/vgpool/wintest2 [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 3.0.0-13-server (buildd at crested) (gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) ) #22-Ubuntu SMP Wed Nov 2 15:09:08 UTC 2011 (Ubuntu 3.0.0-13.22-server 3.0.6) [ 0.000000] Command line: panic=1 console=ttyS0 udevtimeout=300 no_timer_check acpi=off printk.time=1 cgroup_disable=memory selinux=0 TERM=xterm guestfs_rescue=1 [ 0.000000] KERNEL supported cpus: [ 0.000000] Intel GenuineIntel [ 0.000000] AMD AuthenticAMD [ 0.000000] Centaur CentaurHauls [ 0.000000] BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: 0000000000000000 - 000000000009bc00 (usable) [ 0.000000] BIOS-e820: 000000000009bc00 - 00000000000a0000 (reserved) [ 0.000000] BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved) [ 0.000000] BIOS-e820: 0000000000100000 - 000000001f3fd000 (usable) [ 0.000000] BIOS-e820: 000000001f3fd000 - 000000001f400000 (reserved) [ 0.000000] BIOS-e820: 00000000feffc000 - 00000000ff000000 (reserved) [ 0.000000] BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved) [ 0.000000] NX (Execute Disable) protection: active [ 0.000000] DMI 2.4 present. [ 0.000000] No AGP bridge found [ 0.000000] last_pfn = 0x1f3fd max_arch_pfn = 0x400000000 [ 0.000000] PAT not supported by CPU. [ 0.000000] found SMP MP-table at [ffff8800000fdaf0] fdaf0 [ 0.000000] init_memory_mapping: 0000000000000000-000000001f3fd000 [ 0.000000] RAMDISK: 1f30a000 - 1f3f0000 [ 0.000000] No NUMA configuration found [ 0.000000] Faking a node at 0000000000000000-000000001f3fd000 [ 0.000000] Initmem setup node 0 0000000000000000-000000001f3fd000 [ 0.000000] NODE_DATA [000000001f3f5000 - 000000001f3f9fff] [ 0.000000] kvm-clock: Using msrs 12 and 11 [ 0.000000] kvm-clock: cpu 0, msr 0:1ce49c1, boot clock [ 0.000000] Zone PFN ranges: [ 0.000000] DMA 0x00000010 -> 0x00001000 [ 0.000000] DMA32 0x00001000 -> 0x00100000 [ 0.000000] Normal empty [ 0.000000] Movable zone start PFN for each node [ 0.000000] early_node_map[2] active PFN ranges [ 0.000000] 0: 0x00000010 -> 0x0000009b [ 0.000000] 0: 0x00000100 -> 0x0001f3fd [ 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 1, version 17, address 0xfec00000, GSI 0-23 [ 0.000000] Processors: 1 [ 0.000000] SMP: Allowing 1 CPUs, 0 hotplug CPUs [ 0.000000] PM: Registered nosave memory: 000000000009b000 - 000000000009c000 [ 0.000000] PM: Registered nosave memory: 000000000009c000 - 00000000000a0000 [ 0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000f0000 [ 0.000000] PM: Registered nosave memory: 00000000000f0000 - 0000000000100000 [ 0.000000] Allocating PCI resources starting at 1f400000 (gap: 1f400000:dfbfc000) [ 0.000000] Booting paravirtualized kernel on KVM [ 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 s79616 r8192 d22784 u2097152 [ 0.000000] kvm-clock: cpu 0, msr 0:1f0129c1, primary cpu clock [ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 126125 [ 0.000000] Policy zone: DMA32 [ 0.000000] Kernel command line: panic=1 console=ttyS0 udevtimeout=300 no_timer_check acpi=off printk.time=1 cgroup_disable=memory selinux=0 TERM=xterm guestfs_rescue=1 [ 0.000000] Disabling memory control group subsystem [ 0.000000] PID hash table entries: 2048 (order: 2, 16384 bytes) [ 0.000000] Checking aperture... [ 0.000000] No AGP bridge found [ 0.000000] Memory: 486600k/511988k available (6187k kernel code, 468k absent, 24920k reserved, 6935k data, 904k init) [ 0.000000] SLUB: Genslabs=15, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] Hierarchical RCU implementation. [ 0.000000] RCU dyntick-idle grace-period acceleration is enabled. [ 0.000000] NR_IRQS:16640 nr_irqs:256 16 [ 0.000000] Console: colour dummy device 80x25 [ 0.000000] console [ttyS0] enabled [ 0.000000] Detected 2266.746 MHz processor. [ 0.008000] Calibrating delay loop (skipped) preset value.. 4533.49 BogoMIPS (lpj=9066984) [ 0.008000] pid_max: default: 32768 minimum: 301 [ 0.008000] Security Framework initialized [ 0.008000] AppArmor: AppArmor initialized [ 0.008006] Yama: becoming mindful. [ 0.008410] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes) [ 0.009132] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes) [ 0.009804] Mount-cache hash table entries: 256 [ 0.010341] Initializing cgroup subsys cpuacct [ 0.010747] Initializing cgroup subsys memory [ 0.011125] Initializing cgroup subsys devices [ 0.012006] Initializing cgroup subsys freezer [ 0.012418] Initializing cgroup subsys net_cls [ 0.012831] Initializing cgroup subsys blkio [ 0.013310] Initializing cgroup subsys perf_event [ 0.014031] mce: CPU supports 10 MCE banks [ 0.014851] SMP alternatives: switching to UP code [ 0.039149] Freeing SMP alternatives: 24k freed [ 0.039903] ftrace: allocating 26005 entries in 102 pages [ 0.049080] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1 [ 0.052006] CPU0: Intel QEMU Virtual CPU version 0.14.1 stepping 03 [ 0.160049] Performance Events: unsupported p6 CPU model 2 no PMU driver, software events only. [ 0.162233] Brought up 1 CPUs [ 0.162694] Total of 1 processors activated (4533.49 BogoMIPS). [ 0.163984] devtmpfs: initialized [ 0.165989] print_constraints: dummy: [ 0.166728] Time: 16:16:32 Date: 11/21/11 [ 0.167395] NET: Registered protocol family 16 [ 0.168181] PCI: Using configuration type 1 for base access [ 0.169668] bio: create slab <bio-0> at 0 [ 0.170377] ACPI: Interpreter disabled. [ 0.171043] vgaarb: loaded [ 0.172148] SCSI subsystem initialized [ 0.172822] usbcore: registered new interface driver usbfs [ 0.173719] usbcore: registered new interface driver hub [ 0.174622] usbcore: registered new device driver usb [ 0.175511] PCI: Probing PCI hardware [ 0.177055] pci 0000:00:01.3: quirk: [io 0xb000-0xb03f] claimed by PIIX4 ACPI [ 0.178369] pci 0000:00:01.3: quirk: [io 0xb100-0xb10f] claimed by PIIX4 SMB [ 0.181485] pci 0000:00:01.0: PIIX/ICH IRQ router [8086:7000] [ 0.182674] NetLabel: Initializing [ 0.183271] NetLabel: domain hash size = 128 [ 0.183971] NetLabel: protocols = UNLABELED CIPSOv4 [ 0.184024] NetLabel: unlabeled traffic allowed by default [ 0.184966] Switching to clocksource kvm-clock [ 0.185699] Switched to NOHz mode on CPU #0 [ 0.192693] AppArmor: AppArmor Filesystem Enabled [ 0.193652] pnp: PnP ACPI: disabled [ 0.195407] NET: Registered protocol family 2 [ 0.196207] IP route cache hash table entries: 4096 (order: 3, 32768 bytes) [ 0.197451] TCP established hash table entries: 16384 (order: 6, 262144 bytes) [ 0.198741] TCP bind hash table entries: 16384 (order: 6, 262144 bytes) [ 0.199818] TCP: Hash tables configured (established 16384 bind 16384) [ 0.200909] TCP reno registered [ 0.201407] UDP hash table entries: 256 (order: 1, 8192 bytes) [ 0.202414] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) [ 0.203533] NET: Registered protocol family 1 [ 0.204284] pci 0000:00:00.0: Limiting direct PCI/PCI transfers [ 0.205282] pci 0000:00:01.0: PIIX3: Enabling Passive Release [ 0.206250] pci 0000:00:01.0: Activating ISA DMA hang workarounds [ 0.207289] platform rtc_cmos: registered platform RTC device (no PNP device found) [ 0.208690] audit: initializing netlink socket (disabled) [ 0.209598] type=2000 audit(1321892193.208:1): initialized [ 0.230488] Trying to unpack rootfs image as initramfs... [ 0.232663] Freeing initrd memory: 920k freed [ 0.234643] HugeTLB registered 2 MB page size, pre-allocated 0 pages [ 0.237470] VFS: Disk quotas dquot_6.5.2 [ 0.238229] Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 0.239787] fuse init (API version 7.16) [ 0.240517] msgmni has been set to 952 [ 0.241521] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253) [ 0.242878] io scheduler noop registered [ 0.243569] io scheduler deadline registered (default) [ 0.244496] io scheduler cfq registered [ 0.245250] pci_hotplug: PCI Hot Plug PCI Core version: 0.5 [ 0.246373] pciehp: PCI Express Hot Plug Controller Driver version: 0.4 [ 0.248449] virtio-pci 0000:00:02.0: PCI->APIC IRQ transform: INT A -> IRQ 34 [ 0.250414] virtio-pci 0000:00:03.0: PCI->APIC IRQ transform: INT A -> IRQ 35 [ 0.252345] virtio-pci 0000:00:04.0: PCI->APIC IRQ transform: INT A -> IRQ 35 [ 0.254274] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled [ 0.276369] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A [ 0.278664] Linux agpgart interface v0.103 [ 0.280399] brd: module loaded [ 0.281446] loop: module loaded [ 0.288942] vda: vda1 vda2 [ 0.295197] vdb: unknown partition table [ 0.297000] scsi0 : ata_piix [ 0.297798] scsi1 : ata_piix [ 0.298554] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc000 irq 14 [ 0.300130] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc008 irq 15 [ 0.301980] Fixed MDIO Bus: probed [ 0.302860] PPP generic driver version 2.4.2 [ 0.303902] tun: Universal TUN/TAP device driver, 1.6 [ 0.305082] tun: (C) 1999-2004 Max Krasnyansky <maxk at qualcomm.com> [ 0.306647] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 0.308302] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 0.309713] uhci_hcd: USB Universal Host Controller Interface driver [ 0.311227] i8042: PNP: No PS/2 controller found. Probing ports directly. [ 0.313551] serio: i8042 KBD port at 0x60,0x64 irq 1 [ 0.314499] serio: i8042 AUX port at 0x60,0x64 irq 12 [ 0.315315] mousedev: PS/2 mouse device common for all mice [ 0.316370] rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0 [ 0.317391] rtc0: alarms up to one day, 114 bytes nvram [ 0.318292] device-mapper: uevent: version 1.0.3 [ 0.319060] device-mapper: ioctl: 4.20.0-ioctl (2011-02-02) initialised: dm-devel at redhat.com [ 0.320342] cpuidle: using governor ladder [ 0.320943] cpuidle: using governor menu [ 0.321530] EFI Variables Facility v0.08 2004-May-17 [ 0.322499] TCP cubic registered [ 0.323094] NET: Registered protocol family 10 [ 0.324161] NET: Registered protocol family 17 [ 0.324850] Registering the dns_resolver key type [ 0.325648] registered taskstats version 1 [ 0.326500] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0 [ 0.329187] Magic number: 3:27:288 [ 0.329782] tty tty21: hash matches [ 0.330381] rtc_cmos rtc_cmos: setting system clock to 2011-11-21 16:16:32 UTC (1321892192) [ 0.331610] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found [ 0.332486] EDD information not available. [ 0.486631] Freeing unused kernel memory: 904k freed [ 0.488137] Write protecting the kernel read-only data: 12288k [ 0.496643] Freeing unused kernel memory: 1984k freed [ 0.501539] Freeing unused kernel memory: 1372k freed febootstrap: mounting /proc febootstrap: uptime: 0.50 0.19 febootstrap: ext2 mini initrd starting up: 3.12 zlib febootstrap: mounting /sys febootstrap: internal insmod libcrc32c.ko febootstrap: internal insmod crc-itu-t.ko febootstrap: internal insmod crc-ccitt.ko febootstrap: internal insmod crc7.ko febootstrap: internal insmod sparse-keymap.ko febootstrap: internal insmod ideapad-laptop.ko insmod: init_module: ideapad-laptop.ko: No such device febootstrap: internal insmod virtio_balloon.ko febootstrap: internal insmod virtio-rng.ko febootstrap: internal insmod virtio_console.ko febootstrap: picked /sys/block/vdb/dev as root device febootstrap: creating /dev/root as block special 253:16 febootstrap: mounting new root on /root febootstrap: chroot /proc/uptime: No such file or directory Starting /init script ... rm: cannot remove `/proc': Is a directory mkdir: cannot create directory `/proc': File exists rm: cannot remove `/sys': Is a directory mkdir: cannot create directory `/sys': File exists cannot open /dev/null FATAL: Module pci:v00008086d00007000sv00001AF4sd00001100bc06sc01i00 not found. FATAL: Module pci:v00008086d00001237sv00001AF4sd00001100bc06sc00i00 not found. insmod /lib/modules/3.0.0-13-server/kernel/drivers/i2c/busses/i2c-piix4.ko [ 0.580076] piix4_smbus 0000:00:01.3: SMBus Host Controller at 0xb100, revision 0 FATAL: Module platform:Fixed not found. WARNING: Not loading blacklisted module evbug FATAL: Module input:b0011v0001p0001eAB41_e0,1,4,11,14,k71,72,73,74,75,76,77,79,7A,7B,7C,7D,7E,7F,80,8C,8E,8F,9B,9C,9D,9E,9F,A3,A4,A5,A6,AC,AD,B7,B8,B9,D9,E2,ram4,l0,1,2,sfw not found. insmod /lib/modules/3.0.0-13-server/kernel/drivers/input/serio/serio_raw.ko FATAL: Module platform:reg_dummy not found. WARNING: Not loading blacklisted module snd_pcsp WARNING: Not loading blacklisted module pcspkr insmod /lib/modules/3.0.0-13-server/kernel/drivers/input/mouse/psmouse.ko FATAL: Module platform:pcspkr not found. FATAL: Module dmi:bvnBochs:bvrBochs:bd01/01/2007:svnBochs:pnBochs:pvr:cvnBochs:ct1:cvr: not found. [ 1.053574] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input1 SIOCSIFADDR: No such device eth0: ERROR while getting interface flags: No such device SIOCADDRT: No such process Reading all physical volumes. This may take a while... No volume groups found No volume groups found ------------------------------------------------------------ Welcome to virt-rescue, the libguestfs rescue shell. Note: The contents of / are the rescue appliance. You have to mount the guest's partitions under /sysroot before you can examine them. bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell groups: cannot find name for group ID 0 I have no name!@(none):/# ntfsresize /dev/vda2 ntfsresize v2011.4.12AR.4 (libntfs-3g) Device name : /dev/vda2 NTFS volume version: 3.1 Cluster size : 4096 bytes Current volume size: 14925427200 bytes (14926 MB) Current device size: 32105103360 bytes (32106 MB) New volume size : 32105099776 bytes (32106 MB) Checking filesystem consistency ... 100.00 percent completed Accounting clusters ... Space in use : 7860 MB (52.7%) Collecting resizing constraints ... WARNING: Every sanity check passed and only the dangerous operations left. Make sure that important data has been backed up! Power outage or computer crash may result major data loss! Are you sure you want to proceed (y/[n])? y Schedule chkdsk for NTFS consistency check at Windows boot time ... Resetting $LogFile ... (this might take a while) Updating $BadClust file ... Updating $Bitmap file ... Updating Boot record ... Syncing device ... Successfully resized NTFS on device '/dev/vda2'. I have no name!@(none):/# exit virt-rescue: Syncing the disk now before exiting ... [ 21.255403] md: stopping all md devices. [ 22.248209] Restarting system. [ 22.248702] machine restart
Seemingly Similar Threads
- I can't virt-clone into an existing LVM now (ERROR: clone onto existing storage volume is not supported:) - i could in previous lbvirt versions? (deployment scripts no longer work...)
- python-guestfs
- 答复: python-guestfs
- Re: libguestfs on proxmox
- Re: libguestfs on proxmox