Trying to recover data from an an VM - azure

I have some old vm's from Azure, that was disconnect so Windows and Linux (Ubuntu I believe). I am trying the Windows first, I am having problems attaching the vm
DiskPart has encountered an error: The requested operation could not be completed due to a virtual disk system limitation. Virtual hard disk files must be uncompressed and unencrypted and must not be sparse.
See the System Event Log for more information.
no compression

Related

Rezise Azure Linux VM - redhat

I have a Linux (redhat 7.6) VM and I need to give more RAM.
actually size: standard A1_v2 (2gb RAM)
new size: A4_v2 (8gb RAM)
If I do the resize by Azure portal, is there any considerations? Or any linux configuration that I will lose?
your vm would be rebooted to perform the resize. nothing on the OS level changes (well, unless you have some changes in memory, that would not be preserved after a reboot). basically if your vm (and\or applications inside the vm) can handle the reboot - nothing will break.

How do I hibernate a VM and boot it on a new machine without losing state of processes?

I have a linux VM running some processes. I want to pause these processes, shut down my VM and boot this VM on a different machine in such a way that all the previously running processes resume execution from the last state before the VM was shut down. Is this possible ? If yes, how can I achieve this ?
Can hibernation help me achieve this ?
First off, What's the hardware?
What host os you using like windows?
What software are you using for the virtual machine?
Where is linux booting off, is it a vmk file?
What kind of storage are you using and have you direct access to it?
You haven't given much information to go by to give exact step by step instructions.
My personal use I have found that it is possible to boot a physical drive with virtualbox, my drive also has a ntfs partition on it but the drive has to be offline on windows for me to boot and have administrator privileges which does not allow access from windows to that partition, if you are only using one physical hard drive I believe this may not be possible or may cause serious failures. If you have another hard drive you can copy the system over to a partition with enough knowledge. Here is a reference from the arch linux wiki
Oh and about hibernation I haven't used but you can read up about acpid
and having the virtual machine software to pass the event on

What are some ways to go about running a Vagrant VM in RAM?

I have a development environment running in a Vagrant VM (virtualBox). Considering I have 11Gb of spare RAM I thought I could run the VM completely in RAM.
Would anyone know of the approach to this and would I gain much performance from it?
If you have that much memory available, most probably you'll have the image cached in the host OS cache so you don't need to worry about that.
I've tried putting image files on to ramdisk on my Macbook and didn't see any improvement in 5 mins run (most of which was apt-get install stuff).
Traditionally, VirtualBox has opened disk image files as normal files, which results in them being cached by the host operating system like any other file. The main advantage of this is speed: when the guest OS writes to disk and the host OS cache uses delayed writing, the write operation can be reported as completed to the guest OS quickly while the host OS can perform the operation asynchronously. Also, when you start a VM a second time and have enough memory available for the OS to use for caching, large parts of the virtual disk may be in system memory, and the VM can access the data much faster. (c) 5.7. Host IO caching
Also the benefits you'll see greatly depend on the process you run there, if that's dominated by cpu / network, tinkering with the storage won't help you alot.

Taking a Hyper-V Snapshot of a Running Non Virtual Server?

A friend of mine asked me if it's possible to take a hyper-v snapshot of a running (Non virtual) windows 2012 server (Which I think also runs SQL Server). He wants to be able to run and experiment with the Snapshot in the event that the server goes down.
Thanks,
Ole
Yes, It is possible with the tool Disk2vhd.
Disk2vhd is a utility that creates VHD (Virtual Hard Disk - Microsoft's Virtual Machine disk format) versions of physical disks for use in Microsoft Virtual PC or Microsoft Hyper-V virtual machines (VMs). The difference between Disk2vhd and other physical-to-virtual tools is that you can run Disk2vhd on a system that’s online. Disk2vhd uses Windows' Volume Snapshot capability, introduced in Windows XP, to create consistent point-in-time snapshots of the volumes you want to include in a conversion. You can even have Disk2vhd create the VHDs on local volumes, even ones being converted (though performance is better when the VHD is on a disk different than ones being converted).
The Disk2vhd user interface lists the volumes present on the system:
It will create one VHD for each disk on which selected volumes reside. It preserves the partitioning information of the disk, but only copies the data contents for volumes on the disk that are selected. This enables you to capture just system volumes and exclude data volumes, for example.
Note: Virtual PC supports a maximum virtual disk size of 127GB. If you create a VHD from a larger disk it will not be accessible from a Virtual PC VM.
To use VHDs produced by Disk2vhd, create a VM with the desired characteristics and add the VHDs to the VM's configuration as IDE disks. On first boot, a VM booting a captured copy of Windows will detect the VM's hardware and automatically install drivers, if present in the image. If the required drivers are not present, install them via the Virtual PC or Hyper-V integration components. You can also attach to VHDs using the Windows 7 or Windows Server 2008 R2 Disk Management or Diskpart utilities.
Note: do not attach to VHDs on the same system on which you created them if you plan on booting from them. If you do so, Windows will assign the VHD a new disk signature to avoid a collision with the signature of the VHD’s source disk. Windows references disks in the boot configuration database (BCD) by disk signature, so when that happens Windows booted in a VM will fail to locate the boot disk.
Disk2vhd runs on Windows Vista, Windows Server 2008, and higher, including x64 systems.
Command Line Usage
Disk2vhd includes command-line options that enable you to script the creation of VHDs. Specify the volumes you want included in a snapshot by drive letter (e.g. c:) or use "*" to include all volumes.
Usage: disk2vhd <[drive: [drive:]...]|[*]>
Example: disk2vhd * c:\vhd\snapshot.vhd
Note: Physical-to-virtual hard drive migration of a Windows installation is a valid function for customers with Software Assurance and full retail copies of Windows XP, Windows Vista, and Windows 7. Software Assurance provides users valuable benefits—please contact Microsoft Corporation for further information. Windows XP, Windows Vista and Windows 7 installed by Original Equipment Manufacturers (OEM) using OEM versions of these products may not be transferred to a virtual hard drive in accordance with Microsoft licensing terms.
From: Technet.microsoft.com

Mounting the WP7 VHD file

According to wiki, VHD (Virtual Hard Disk) may contain what is found on a physical HDD, such as disk partitions and a file system, which in turn can contain files and folders.
I have found the VHD image of the WP7 in the following directory.
I read that Hyper-V features offline VHD manipulation, providing administrators with the ability to securely access files within a VHD without having to instantiate a virtual machine. The Windows Disk Management MMC plugin can directly attach a .vhd as a drive letter in Windows 7. I tried the same thing.
The result was this error.
Now, I want to know if there is anyway to mount this VHD and explore the file system ? I mean can I take this VHD to a linux environment and explore ? Is this VHD really corrupt or I lack some access privileges ?
I have tried it too, but get the same message as you get. Probably a kind of restriction Microsoft has build in to protect users from sniffing around. (Especially in the period that there where no hardware devices and only the emulator was available or periods where the updated SDK is delivered earlier than the actual update)
If there is a way too mount this VHD than they definitly know how to do it at the XDA developers forum. I think posting your question overthere will result in more/better answers than on StackOverflow which has more focus on application development.

Resources