EzDevInfo.com

vhd interview questions

Top vhd frequently asked interview questions

How to run the Microsoft Windows XP VHD, for testing with IE 6.0, with a valid/un-expired date?

I just downloaded the VHD for windows xp: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=11575

But when I start the virtual pc it says that "the evaluation period for this copy of windows has ended..."

I read that for the Windows XP image:

"Expires: This image will shutdown and become completely unusable on August 09, 2011."

Why is it expired? where could I download a working version?

Thanks


Source: (StackOverflow)

Defrag a virtual hard disk (.vhd)? [closed]

Like any other hard disk, virtual hard discs (*.vhd) will suffer from fragmentation.

So to keep good performance i guess i have to defrag first the virtual hard disc from within the virtual machine and also the (physical) hard disc the .vhd is stored on.

First, are these assumption correct? And second, is there a way to defrag both (virtual and physical hard disc) at once?

Thanks in advance!


Source: (StackOverflow)

Advertisements

How do I delete an Azure storage account containing a leased blob?

I was playing with Windows Azure durable virtual machines. In the end, I deleted the virtual machine (successfully) and tried to delete the associated storage account.

The request to delete the storage account fails.

On the Preview Portal (manage.windowsazure.com) when I delete the storage account I get this error:

Failed to delete Storage account 'portalvhdscwtwycpsxxxxx'

Details:

Storage account portalvhdscwtwycpsxxxxx has 1 container(s) which have an active image and/or disk artifacts. Ensure those artifacts are removed from the image repository before deleting this storage account.

On the previous portal (windows.azure.com) I get this error:

Submit Failed

Storage account portalvhdscwtwycpsxxxxx has 1 container(s) which have an active image and/or disk artifacts. Ensure those artifacts are removed from the image repository before deleting this storage account.

Trying to delete the blob itself (a 30GB VHD) on Azure Storage Explorer I get this error:

There is currently a lease on the blob and no lease ID was specified in the request.

So my assessment is that this blob is leased (by the previous, now deleted virtual machine) and I can't delete it unless I can get this lease ID.

The question is: how can I delete this blob and, consequently, the storage account?


Source: (StackOverflow)

Hyper-V back up VHD live with PowerShell

I've heard people say that you can back up VHD files on Windows 2008 R2 Hyper-V (non clustered) and back them up while the guest is live and running with powershell scripts. Does anyone have any experience of this they can share?

What kind of back up is it an export? A Snapshot that is made, then copied then reverted? I know there are copious pay-to-use models but this is a test environment and I simply want to know if there is a "weak but functional" way of doing it.


Source: (StackOverflow)

Cannot capture image of Azure VM [closed]

I think the official Azure instructions on how to capture a VM image must be either incorrect or incomplete. I've run a variety of tests myself (detailed below) and more than two dozen people have complained on the page that the instructions don't work and/or damage their VM's. Surely something is missing from the instructions because people must be able to capture images from Azure VM's.

http://www.windowsazure.com/en-us/manage/windows/how-to-guides/capture-an-image/

The instructions on the page are pretty simple:

  • Remote Desktop into your Azure VM
  • Open an administrator command window
  • Run sysprep with the indicated settings (Out-Of-Box-Experience, Generalize, Shutdown)
  • Hit OK
  • Wait for the system to shut the VM down
  • Click capture in the portal.

It sounds simple but the VM never actually shuts down so you can't actually click the capure button. If you manually shutdown the instance, even after waiting many hours, the resulting image fails to work and the original vhd is destroyed in the process.

Can anyone confirm you are able to capture a running Azure instance using either this workflow or some other workflow? If so, can you tell me what you're doing differently from what I'm doing?

Details - The tests I've run are as follows:

TEST 1 - Win2k8 R2 on Small instance

  • Launch a small instance of Win2k8 R2 in the US West region
  • Remote desktop into the image
  • Run sysprep with OOBE,generalize,shutdown
  • Azure dashboard shows all CPU activity completed after 15min of sysprep, device is idle, steady state is 0.41% cpu
  • Wait several hours (>2.5 hours as of this writing on this instance, >12 hours on other tests)
  • Azure VM is still running, capture button for the instance is unavailable in portal

TEST 2 - Win2k8 R2 on Large instance

  • same steps as Test 1 but on Large instance
  • same results except steady state CPU utilization is 0.08% after 15 minutes

TEST 3 - Win2k12 Data Center Edition on small instance

  • same steps as Test 1 but run Win2k12 Data Center
  • same result as Test 1 except steady state CPU utilization is 4.2%

TEST 4 - Win2k8 R2 on Small instance with Windows update

  • same steps as Test 1 but run Windows Update repeatedly until no more updates available before running sysprep
  • same results as Test 1

TEST 5 - Win2k8 R2 on Small instance with Visual Studio 2012 Update 3

  • same steps as Test 1 but install VS2012 Ultimate and VS2012 Update 3 before running sysprep
  • same results as Test 1

TEST 6 - Win2k8 R2 on Large instance with fully configured IIS server

  • provision our standard server configuation (IIS, .NET 4.5) on a large instance
  • run our standard web service tests
  • run sysprep with OOBE,generalize,shutdown
  • wait 4 hours, allowing sysprep to run
  • use portal to shutdown instance
  • use portal to capture instance
  • generated image doesn't work (provisioning machines with it times out after a couple hours)
  • original VHD doesn't work (can't remote desktop into instance created with the VHD)

TEST 7 - Win2k8 R2 on Large instance with fully configured IIS server

  • same as test 6 except wait 12 hours allowing sysprep to run
  • as of this writing (12+ hours) the VM still hasn't shut down

Source: (StackOverflow)

Importing a VHD into Parallels Desktop 6 on the Mac

I've looked everywhere for this but can't find an answer, so:

I have a VHD image created for me by a client -- he installed Win7 on a machine and then used a tool from SysInternals to create a VHD which he shared with me and a colleague.

I can mount the VHD on my Mac using Parallels Mounter and see the contents, but I can't for the life of me see how to import the VHD to create a new Parallels VM from the VHD file. Parallels Transporter seems to want to create a VM from a live Windows box, which this isn't.

My colleague is able to use VirtualBox to create a VM from the VHD and I want to do the same using Parallels Desktop 6.

Any ideas?


Source: (StackOverflow)

Programmatically mount a Microsoft Virtual Hard Drive (VHD)

I am trying to mount a Virtual Hard Drive (.VHD) using the Windows 7 API function, but I can't find the relevant function, does one exist?

I am programming in C++ using Visual Studio 2010, for information.

Thanks in advance ;)


Source: (StackOverflow)

Is there a way to attach the same disk to multiple Azure VMs

I have created a VHD for data and attached it to one Virtual Machine instance. Is there a way to attach that disk again to another VM? I basically want a shared drive for multiple VMs.

I see an "attach VHD" option in Server Manager for 2008 R2, but the only location I have to put in is my URL, and that is obviously wrong. When I try to attach the disk to another vm using the Attach Disk option in the management portal, it doesn't show this vhd in the list of available vhds. I know there are utilities in powershell which can do things, does anyone know if that would work?


Source: (StackOverflow)

backup/snapshot a vm image (vhd) in windows azure

I was wondering if anyone had any information on how to backup a vm image that has been uploaded to the cloud.
There is an option to revert to the initial state. However, it would be extremely handy if a snapshot could be taken or if the vhd could be downloaded again.

Any input would be welcome.
Thanks


Source: (StackOverflow)

How do I increase the size of an Azure CloudDrive?

I have an existing Azure CloudDrive that I want to make bigger. The simplist way I can think of is to creating a new drive and copying everything over. I cannot see anyway to just increase the size of the vhd. Is there a way?


Source: (StackOverflow)

Java library for Windows VHD API

I need to mount and navigate a Windows VHD from Java. Anyone know of a Java library that wraps the Windows Virtual Hard Drive API or is there perhaps source code that uses JNA that I can look at. My google searches did not give me much.

Even some sample code on how to convert the OpenVirtualDisk function to JNA structures would give me enough to do the rest I believe.


Source: (StackOverflow)

What is the difference in the "Host Cache Preference" settings when adding a disk to an Azure VM?

When adding a VHD data disk to a VM I am asked for a "Host Cache Preference" (None, Read Only, Read/write).

Can someone tell me the effect of choosing one over the other?

Specifically, I am using a VM as a Build Server so the disks are used for compiling .Net source code. Which setting would be best in this scenario?


Source: (StackOverflow)

Download specific VHD file using Azcopy

my Azure storage container having multiple VHD files so how can i download specific VHD file to local using AZ-copy tool.


Source: (StackOverflow)

What is a faster way to backup and restore a MySQL DB than mysqldump? (faster than 4 hours)

We have a database that is about 3GB (in text) after mysqldump is used to dump a text representation of it, and then

mysql < mysqlstatement.sql

is used to restore the database. But it takes 4 hours.

Is there a way to quickly back up / restore the database instead?

It is on a Mac using Ruby on Rails, so one time I set the test environment to use the development DB, and the test wiped out the whole DB in a few seconds.

I have a way which is to "take a snapshot" of the development environment if it is PC -- just use Virtual PC and say the virtual disk image is only 2, 3GB, then we can save that virtual hard drive (VHD), and then the whole thing together with the DB is backed up.

But on Mac, there is no such way? Thanks.


Source: (StackOverflow)

How to attach my uploaded vhd to a virtual machine in Azure?

I have uploaded successfully my 1TB vhd (not containing Windows files) to Azure storage. Now I want to attach it as a second drive to my virtual machine but in the attach list I can find only the "attach an empty disk" option!

I used Add-AzureVhd to upload the vhd file: Creating new page blob of size 999653638656...

I linked the storage resource in Cloud Service but the vhd is still not available to mount.

The container of the storage where I uploaded my vhd is the same with the one where C: drive of my VM is saved. The container access is set to private. Will it help if I change it to Public Blob or Public Container?

What else to try?

Thanks


Source: (StackOverflow)