Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
06-21-2010, 04:45 AM
|
#1
|
Member
Registered: Sep 2009
Posts: 34
Rep:
|
host ran out of disk space, guest virtual disk got corrupt help please
hello I am using fedora 13 36bit with VMware-Workstation-Full-7.1.0-261024.i386.
Fedora 13 is my linux host
Winxp pro is my windows guest I have a virtual disk of 105gig where the problem is.
I ran out of disk space on my fedora host where the 105gig virtual disk was, while winxp guest was running and it gave me the option to retry or abort, I abort.
I Moved the 105gig virtual disk to another partion on fedora so winxp virtual disk would have enough space.
but it wont power on says the disk is corrput.
I then tryed to repair the virtual disk:
vmware-vdiskmanager Win.Xp.Pro-0.vmdk -R
The virtual disk, 'Win.Xp.Pro-0.vmdk', is corrupted but the repair process has failed.
I then tryed to mount it:
vmware-mount Win.Xp.Pro-0.vmdk /mnt/vmware
Failed to open disk: The specified virtual disk needs repair (60129558150)
Failed to mount disk 'Win.Xp.Pro-0.vmdk': Cannot open the virtual disk
I do not have a backup of the 105gig virutal disk ofcourse and I know better.
du -h Win.Xp.Pro-0.vmdk
59G Win.Xp.Pro-0.vmdk
any help or suggestions would be great
thank you
|
|
|
06-21-2010, 06:04 AM
|
#2
|
Moderator
Registered: May 2001
Posts: 29,415
|
It is not clear to me if you moved the VMDK while the VM was still running. What do 'qemu-img info -f vmdk Win.Xp.Pro-0.vmdk' (requires qemu) and 'vmware-mount.pl -p Win.Xp.Pro-0.vmdk' return? Can you make the disk read-only and attach it to another VM and run that?
|
|
|
06-21-2010, 06:30 AM
|
#3
|
Member
Registered: Sep 2009
Posts: 34
Original Poster
Rep:
|
reply
hello unSpawn thanks for your reply
I did not move the VMDK while the VM was still running I had to abort the running VM then move the file.
I had to install qemu but here is what you requested:
qemu-img info -f vmdk Win.Xp.Pro-0.vmdk
image: Win.Xp.Pro-0.vmdk
file format: vmdk
virtual size: 105G (112742891520 bytes)
disk size: 59G
vmware-mount.pl -p Win.Xp.Pro-0.vmdk
Command not found.
I tryed without .pl and got:
vmware-mount -p Win.Xp.Pro-0.vmdk
Failed to open disk: The specified virtual disk needs repair (60129558150)
Failed to get the list of partitions: Cannot open the virtual disk
thank you
|
|
|
06-21-2010, 06:47 AM
|
#4
|
Moderator
Registered: May 2001
Posts: 29,415
|
You could try copy the VMDK to a raw disk and see if you can loop-mount it and use standard GNU/Linux tools after the conversion: 'qemu-img convert -f vmdk -O raw Win.Xp.Pro-0.vmdk Win.Xp.Pro-0.img'. Please ensure there's enough disk space to make the copy as I'm not sure if it will expand the virtual size of the 59GB VMDK to be actually 105GB.
|
|
|
06-21-2010, 07:48 AM
|
#5
|
Member
Registered: Sep 2009
Posts: 34
Original Poster
Rep:
|
UnSpawn
ok making a backup now, then i will try what you said and will post the results here.
thank you
|
|
|
06-21-2010, 09:03 AM
|
#6
|
Member
Registered: Sep 2009
Posts: 34
Original Poster
Rep:
|
reply
ok it converted it but i am unsure how to mount it next?
du -h Win.Xp.Pro-0.img
59G Win.Xp.Pro-0.img
# du -h Win.Xp.Pro-0.vmdk
59G Win.Xp.Pro-0.vmdk
mount -o loop Win.Xp.Pro-0.img /mnt/vmware
mount: you must specify the filesystem type
|
|
|
06-21-2010, 09:19 AM
|
#7
|
Moderator
Registered: May 2001
Posts: 29,415
|
Please run and post output of 'file Win.Xp.Pro-0.img; fdisk -l Win.Xp.Pro-0.img; disktype Win.Xp.Pro-0.img'. ('disktype' is http://disktype.sourceforge.net/ and the RPM is at the DAG repo).
Quote:
Originally Posted by fedora.linux.64
mount -o loop Win.Xp.Pro-0.img /mnt/vmware
mount: you must specify the filesystem type
|
Mounting a whole disk this way isn't useful. Run 'losetup -f' to find an empty slot then run 'losetup /dev/loop0 Win.Xp.Pro-0.img' (substitute "loop0" if necesary) to loop-mount the disk as a whole. If that works OK try 'kpartx -l /dev/loop0; kpartx -a /dev/loop0' to list partitions to be added and add them. If that works OK try 'disktype /dev/mapper/loop0p*' to see where you can access partitions separately.
Last edited by unSpawn; 06-21-2010 at 09:21 AM.
|
|
|
06-21-2010, 09:46 AM
|
#8
|
Member
Registered: Sep 2009
Posts: 34
Original Poster
Rep:
|
reply
file Win.Xp.Pro-0.img; fdisk -l Win.Xp.Pro-0.img; disktype Win.Xp.Pro-0.img
Win.Xp.Pro-0.img: x86 boot sector, mbr; partition 1: ID=0xf, starthead 0, startsector 16065, 220170825 sectors, code offset 0xc0
You must set cylinders.
You can do this from the extra functions menu.
Disk Win.Xp.Pro-0.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1c646c02
Device Boot Start End Blocks Id System
Win.Xp.Pro-0.img1 2 13706 110085412+ f W95 Ext'd (LBA)
Partition 1 has different physical/logical endings:
phys=(1023, 254, 63) logical=(13705, 254, 63)
Win.Xp.Pro-0.img5 2 13706 110085381 7 HPFS/NTFS
--- Win.Xp.Pro-0.img
Regular file, size 105 GiB (112742891520 bytes)
DOS/MBR partition map
Partition 1: 105.0 GiB (112727462400 bytes, 220170825 sectors from 16065)
Type 0x0F (Win95 Ext'd (LBA))
Partition 5: 105.0 GiB (112727430144 bytes, 220170762 sectors from 16065+63)
Type 0x07 (HPFS/NTFS)
Windows NTLDR boot loader
NTFS file system
Volume size 105.0 GiB (112727429632 bytes, 220170761 sectors)
[root@Harley-D-F13 105.gig.ntfs]# losetup -f
/dev/loop1
[root@Harley-D-F13 105.gig.ntfs]# losetup /dev/loop1 Win.Xp.Pro-0.img
[root@Harley-D-F13 105.gig.ntfs]# kpartx -l /dev/loop1; kpartx -a /dev/loop1
loop1p1 : 0 2 /dev/loop1 16065
loop1p5 : 0 220170762 /dev/loop1 16128
[root@Harley-D-F13 105.gig.ntfs]# disktype /dev/mapper/loop1p
--- /dev/mapper/loop1p
disktype: Can't stat /dev/mapper/loop1p: No such file or directory
|
|
|
06-21-2010, 10:13 AM
|
#9
|
Moderator
Registered: May 2001
Posts: 29,415
|
You forgot to fill in the device name or use an asterisk as in: 'disktype /dev/mapper/loop1p*'. In any case now 'ntfsinfo -vfm /dev/mapper/loop1p5' or 'mkdir /mnt/rescue; ntfs-3g /dev/mapper/loop1p5 /mnt/rescue -o force,ro' should work.
|
|
|
06-21-2010, 10:45 AM
|
#10
|
Senior Member
Registered: Sep 2003
Posts: 3,171
Rep: 
|
Why don't you just enlarge the VMWare virtual disk to give yourself some room, then see if you can repair it? I've never had a VMWare virtual disk become completely full because when it gets close I either remove some stuff or enlarge the disk. Just two weeks ago I enlarged a disk using Workstation 7.1 and it was a painless operation.
After enlarging the disk you also have to enlarge the filesystem. I don't know what you'd get into trying to do this with a corrupted disk. Using Windows 7 guest, the process was borderline trivial. Using an XP guest, I think you would have to boot the VM into a Linux Live CD and use GParted. In fact, you could try this anyway and see if GParted (and other tools such as testdisk) could give you insight into what, exactly, is wrong with the disk. You might even find you could access and recover from the disk that way, though I wouldn't put too much hope into that...
Lots of Linux software fails in a most unfriendly fashion when the disk is completely full; could be that VMWare Workstation is one of these.
|
|
|
06-21-2010, 12:01 PM
|
#11
|
Member
Registered: Sep 2009
Posts: 34
Original Poster
Rep:
|
reply
unSpawn
that did the trick!
/dev/mapper/loop1p5 105G 66G 40G 63% /mnt/rescue
I am now making a full backup of the ntfs virtual disk now.
Is this disk going to be able to be used in VM or should I just delete it after I get my backup and start with a fresh virtual disk?
thank you!
|
|
|
06-21-2010, 12:03 PM
|
#12
|
Member
Registered: Sep 2009
Posts: 34
Original Poster
Rep:
|
reply
jiml8 hi thanks for the reply
I do not know for sure but I dont think I could expand the disk since it was corrupt and needed to be repaired first?
|
|
|
06-21-2010, 12:46 PM
|
#13
|
Senior Member
Registered: Sep 2003
Posts: 3,171
Rep: 
|
Quote:
Originally Posted by fedora.linux.64
jiml8 hi thanks for the reply
I do not know for sure but I dont think I could expand the disk since it was corrupt and needed to be repaired first?
|
I'm sure that depends on why it was corrupted.
I would say try it and see what happens. It will work, or it won't. Since you have a backup, it won't cost you anything but some time to try.
I'd like to know the answer too.
|
|
|
06-23-2010, 07:11 AM
|
#14
|
Moderator
Registered: May 2001
Posts: 29,415
|
Quote:
Originally Posted by fedora.linux.64
I am now making a full backup of the ntfs virtual disk now. Is this disk going to be able to be used in VM or should I just delete it after I get my backup and start with a fresh virtual disk?
|
Depends on how you make the backup. If the file system is backed up cleanly or can be fscked to clear any corruption and the "dirty" flag then you could try to re-convert it back to a VMDK and see if VMware is willing to recognize it. If you backed up only the partition and not the partition table this might require adding the new VMDK to a working VM guest so see if it's readable slash usable.
|
|
|
06-24-2010, 12:29 AM
|
#15
|
Member
Registered: Sep 2009
Posts: 34
Original Poster
Rep:
|
reply
unSpawn
ok I will just make a new virtual drive for win xp now that I have a full backup of the one with errors on it thanks to you!
I got lost with the process that we just did if sometime you could explain what we did for each step please?
Also I would like to know how to mount my virtual disks from my fedora host with vmware-mount but I really dont understand how to do that yet if you could help with that would be great?
thank you
|
|
|
All times are GMT -5. The time now is 09:56 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|