Re: [Libguestfs] does guestfs_list_partitions() work with Windows 95 images?
by Skippy VonDrake
>
>
> It's possible that the disk is not partitioned, ie. that what you've
> got here is a straight filesystem. You could see if libguestfs can
> mount it:
>
> guestfish --ro -a disk.img -m /dev/sda
> ><fs> ll /
>
>
That worked! Thanks for the help.
Now I'm tweaking my old code and just replacing my guestfs_mount()
call with a hard-coded "guestfs_mount(g, "/dev/sda",'/");
Next task is to review my registry changes and see if those registries
even exist in Win95.
What this code does is open the image, tweaks some registry settings
to use some "generic" drivers and uploads those drivers. With the
goal of running the VM without resulting in a BSOD. But I might just try
and remove all the "tweaking" and see if a Virtual Box VM can just boot
up the image. Might get lucky.
Besides - I doubt those drivers are Win95 compatible.
I'll let you know how it goes.
10 years, 3 months
virt-v2v - Unable to authenticate to vCenter as DOMAIN\user
by Ben Hooper
Hi,
I am encountering an issue with virt-v2v where I need to authenticate to the vCenter as DOMAIN\user.
I have tried the following with the resulting errors:
1. 'virt-v2v -v -x -ic 'vpx://vcenter/Datacenter/cluster_name/esx_server?no_verify=1' vm_name -o local -of raw -os /tmp'
- prompted for username password
- entered 'DOMAIN\User' as username
- successfully retrieves libvirt xml
- errors with 'virt-v2v: error: vcenter: incorrect username or password.'
2. virt-v2v -v -x -ic 'vpx://DOMAIN\user@vcenter/Datacenter/cluster_name/esx_server?no_verify=1' vm_name -o local -of raw -os /tmp
- errors immediately with virt-v2v: error: could not parse '-ic
vpx://DOMAIN\user@vcenter/Datacenter/cluster_name/esx_server?no_verify=1'.
Original error message was: parse_uri: unable to parse URI
What is the correct syntax for entering the authenticating user as 'DOMAIN\user' for virt-v2v?
Thanks,
Ben.
[root@virt-v2v ~]# virt-v2v -v -x -ic 'vpx://vcenter/Datacenter/cluster_name/esx_server?no_verify=1' vm_name -o local -of raw -os /tmp
virt-v2v: libguestfs 1.28.1 (x86_64)
[ 0.0] Opening the source -i libvirt -ic vpx://vcenter/Datacenter/cluster_name/esx_server?no_verify=1 vm_name
input_libvirt_vcenter_https: source: scheme vpx server vcenter
Enter username for vcenter [administrator]: DOMAIN\user
Enter DOMAIN\user's password for vcenter:
libvirt xml is:
<domain type='vmware'>
<name>vm_name</name>
<uuid>422721f5-1c3f-6a9e-9d31-d8346bf483aa</uuid>
<memory unit='KiB'>262144</memory>
<currentMemory unit='KiB'>262144</currentMemory>
<vcpu placement='static'>2</vcpu>
<cputune>
<shares>2000</shares>
</cputune>
<os>
<type arch='i686'>hvm</type>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<source file='[LOCALDISK_ESX1] vm_name/vm_name.vmdk'/>
<target dev='sda' bus='scsi'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='scsi' index='0' model='lsilogic'/>
<interface type='bridge'>
<mac address='00:50:56:a7:0c:2f'/>
<source bridge=''/>
<model type='vmxnet3'/>
</interface>
<interface type='bridge'>
<mac address='00:50:56:a7:6d:eb'/>
<source bridge=''/>
<model type='vmxnet3'/>
</interface>
<interface type='bridge'>
<mac address='00:50:56:a7:3e:61'/>
<source bridge=''/>
<model type='vmxnet3'/>
</interface>
<video>
<model type='vmvga' vram='4096'/>
</video>
</devices>
</domain>
curl -q --insecure --head --silent --url 'https://vcenter/folder/vm_name/vm_name-flat.vmdk?dcPath=Datacenter&dsName...'
HTTP/1.1 401 Unauthorized
Date: Mon, 22 Dec 2014 02:48:08 GMT
Set-Cookie: vmware_soap_session="528d5e5a-870a-01b8-e166-1631d51a1580"; Path=/; HttpOnly; Secure;
Connection: close
WWW-Authenticate: Basic realm="VMware HTTP server"
Content-Length: 0
curl -q --insecure --head --silent --url 'https://vcenter/folder/vm_name/vm_name-flat.vmdk?dcPath=Datacenter&dsName...'
HTTP/1.1 401 Unauthorized
Date: Mon, 22 Dec 2014 02:48:08 GMT
Set-Cookie: vmware_soap_session="528d5e5a-870a-01b8-e166-1631d51a1580"; Path=/; HttpOnly; Secure;
Connection: close
WWW-Authenticate: Basic realm="VMware HTTP server"
Content-Length: 0
virt-v2v: error: vcenter: incorrect username or password. You might need
to specify the username in the URI like this: vpx://USERNAME@[etc]
If reporting bugs, run virt-v2v with debugging enabled and include the
complete output:
[root@virt-v2v ~]# virt-v2v -v -x -ic 'vpx://DOMAIN\user@vcenter/Datacenter/cluster_name/esx_server?no_verify=1' vm_name -o local -of raw -os /tmp
virt-v2v: error: could not parse '-ic
vpx://DOMAIN\user@vcenter/Datacenter/cluster_name/esx_server?no_verify=1'.
Original error message was: parse_uri: unable to parse URI
If reporting bugs, run virt-v2v with debugging enabled and include the
complete output:
virt-v2v -v -x [...]
[root@virt-v2v ~]# cat /etc/centos-release
CentOS Linux release 7.0.1406 (Core)
[root@virt-v2v ~]# virt-v2v --version
virt-v2v 1.28.1
[root@virt-v2v ~]#
10 years, 3 months
Regarding queries on P2V migration
by Abhishek Saurabh
Dear Team,
As we are planning to migrate one Physical server to Virtual server (VMware) to run one critical application.
Physical Server Status
Virtual Server Requirement
OS
RHEL-5.5
OS
RHEL-5.5
No Of Core
16
No Of Core
?
Memory
10 GB
Memory
?
Storage
2 TB
Storage
500 GB
LVM
No
LVM
Yes
Architecture
64 Bit
Architecture
64 Bit
Application
Oracle & SAP
Application
Oracle & SAP
We saw on the RedHat Technical Web portal that "Virt V2V" only support for RHEL-5.6 and above.
Please show us the way to do it.
Thank you.
Regards,
Abhishek Saurabh
::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and other defects.
----------------------------------------------------------------------------------------------------------------------------------------------------
10 years, 3 months
virt-resize corrupts ext2 filesystem
by Hu Tao
steps to reproduce:
./run guestfish -N disk:1536M <<EOF
part-init /dev/sda mbr
part-add /dev/sda p 1 1048577
part-add /dev/sda p 1048578 2097154
part-add /dev/sda p 2097155 -1
mkfs ext2 /dev/sda1
mkfs ext2 /dev/sda2
mkfs ext2 /dev/sda3
EOF
qemu-img create -f raw test2.img 1520M
./run virt-resize --format raw --output-format raw --resize /dev/sda1=-2M --resize /dev/sda2=-8M --shrink /dev/sda3 --no-extra-partition test1.img test2.img
The output:
---8<---
Formatting 'test2.img', fmt=raw size=1593835520
[ 0.0] Examining test1.img
100% ⟦▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒⟧ --:--
**********
Summary of changes:
/dev/sda1: This partition will be resized from 512.0M to 510.0M. The
filesystem ext2 on /dev/sda1 will be expanded using the 'resize2fs' method.
/dev/sda2: This partition will be resized from 512.0M to 504.0M. The
filesystem ext2 on /dev/sda2 will be expanded using the 'resize2fs' method.
/dev/sda3: This partition will be resized from 512.0M to 503.7M. The
filesystem ext2 on /dev/sda3 will be expanded using the 'resize2fs' method.
**********
[ 10.0] Setting up initial partition table on test2.img
[ 10.0] Copying /dev/sda1
[ 11.0] Copying /dev/sda2
[ 12.0] Copying /dev/sda3
[ 17.0] Expanding /dev/sda1 using the 'resize2fs' method
virt-resize: error: libguestfs error: resize2fs: e2fsck 1.42.11
(09-Jul-2014)
The filesystem size (according to the superblock) is 131072 blocks
The physical size of the device is 130575 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort? yes
If reporting bugs, run virt-resize with debugging enabled and include the
complete output:
virt-resize -v -x [...]
--->8---
This is a quick fix, but I am not sure it's correct or not:
diff --git a/resize/resize.ml b/resize/resize.ml
index ca5f87d..970ec03 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -666,10 +666,9 @@ read the man page virt-resize(1).
error (f_"%s: This partition contains an LVM physical volume which will be damaged by shrinking it below %Ld bytes (user asked to shrink it to %Ld bytes). If you want to shrink this partition, you need to use the '--resize-force' option, but that could destroy any data on this partition. (This error came from '%s' option on the command line.)")
name size newsize option
| ContentPV _ -> ()
- | ContentFS (fstype, size) when size > newsize ->
+ | ContentFS (fstype, _) ->
error (f_"%s: This partition contains a %s filesystem which will be damaged by shrinking it below %Ld bytes (user asked to shrink it to %Ld bytes). If you want to shrink this partition, you need to use the '--resize-force' option, but that could destroy any data on this partition. (This error came from '%s' option on the command line.)")
- name fstype size newsize option
- | ContentFS _ -> ()
+ name fstype oldsize newsize option
| ContentExtendedPartition ->
error (f_"%s: This extended partition contains logical partitions which might be damaged by shrinking it. If you want to shrink this partition, you need to use the '--resize-force' option, but that could destroy logical partitions within this partition. (This error came from '%s' option on the command line.)")
name option
Regards,
Hu
10 years, 3 months
Communication between Host and Guest
by Priyanka Naik
We wanted to migrate the process from host machine to guest machine using
virtio serial. We have already completed with dumping and restoring
processes. We wanted to transfer those dumped files to guest so that they
could be restored back, using virtio serial. I found many stuff related to
virtio serial but couldn't get the code for transferring files. Can you
provide us with the links which could lead us to our way?
Regards,
Priyanka Naik
10 years, 3 months
Re: [Libguestfs] does guestfs_list_partitions() work with Windows 95 images?
by Richard W.M. Jones
[Let's keep all replies on the list]
On Tue, Dec 16, 2014 at 12:43:21AM -0500, Skippy VonDrake wrote:
> Looks like that returned an empty array. Could the image be corrupt?
>
> Here's the output:
>
> # guestfish -v -x --ro -a /home/skippy/disk_images/[...]/old.img run : list-partitions
[...]
> [ 0.558351] scsi2 : Virtio SCSI HBA
> [ 0.560916] scsi 2:0:0:0: Direct-Access QEMU QEMU HARDDISK
> 2.0. PQ: 0 ANSI: 5
> [ 0.562418] scsi 2:0:1:0: Direct-Access QEMU QEMU HARDDISK
> 2.0. PQ: 0 ANSI: 5
> [ 0.590401] sd 2:0:0:0: Attached scsi generic sg0 type 0
> [ 0.592464] sd 2:0:0:0: [sda] 4122952 512-byte logical blocks: (2.11
> GB/1.96 GiB)
> [ 0.594758] sd 2:0:1:0: Attached scsi generic sg1 type 0
> [ 0.595840] sd 2:0:1:0: [sdb] 8388608 512-byte logical blocks: (4.29
> GB/4.00 GiB)
> [ 0.597380] sd 2:0:0:0: [sda] Write Protect is off
> [ 0.598437] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled,
> doesn't support DPO or FUA
> [ 0.600092] sd 2:0:1:0: [sdb] Write Protect is off
> [ 0.601216] sd 2:0:1:0: [sdb] Write cache: enabled, read cache: enabled,
> doesn't support DPO or FUA
> [ 0.603609] sda:
The appliance kernel couldn't find any partitions at all on the disk.
Is it a raw format disk image, or some other format that qemu can
reasonably be expected to read?
If it is, then yes I'd say the image is corrupted. However you'd
probably want to hexdump it to see what's really going on.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
10 years, 3 months
[PATCH v3 00/11] btrfs support part2: qgroup/quota commands
by Hu Tao
Hi,
This is v3 series to add support to btrfs qgroup related commands, inclduing
quota commands, and two leftover of subvolume commands.
Regards,
Hu
changes:
v3:
- don't intialize fs_buf (patch 1)
- check the return value of sysroot_path (patch 1)
- check fs_buf rather than fs (patch 1)
- fprintf (stderr,...) -> reply_with_error()
v2:
- add tests for new APIs
- combine btrfs_quota_enable and btrfs_quota_disable
- following APIs changed to operate on Mountable_or_Path:
btrfs_subvolume_get_default, btrfs_quota_enable, btrfs_quota_rescan.
Hu Tao (11):
daemon: btrfs: add helper functions mount and umount
New API: btrfs_subvolume_get_default
New API: btrfs_subvolume_show
New API: btrfs_quota_enable
New API: btrfs_quota_rescan
New API: btrfs_qgroup_limit
New API: btrfs_qgroup_create
New API: btrfs_qgroup_destroy
New API: btrfs_qgroup_show
New API: btrfs_qgroup_assign
New API: btrfs_qgroup_remove
daemon/btrfs.c | 666 ++++++++++++++++++++++++++++---
generator/actions.ml | 203 ++++++++++
generator/structs.ml | 10 +
gobject/Makefile.inc | 2 +
java/Makefile.inc | 1 +
java/com/redhat/et/libguestfs/.gitignore | 1 +
po/POTFILES | 1 +
src/MAX_PROC_NR | 2 +-
8 files changed, 837 insertions(+), 49 deletions(-)
--
1.9.3
10 years, 3 months
(no subject)
by Gabriele Cerami
Hi,
I noticed the diff wasn't showing the "-" at the start of a deleted file
and the details of the second file when attributes are different.
This change should fix them.
thanks.
10 years, 3 months