Steps to compact a hyper-v VHD without bringing down live VM.

Hi all,
I have a hyper-v 2008 R2 hyper-v host with some VM's that are dynamic disks. Some of them have grown to the point where our backup is failing because its exceeding the capacity of the tape.
I know the general proper process to compact a VHD is to:
1. Defrag the VM
2. zero out empty space with a utility like sdelete or precompact.exe
3. compact within the VM manager edit disk or to use diskpart. (I think diskpart will be faster?)
Since these are live VM's I don't want to bring them down for too long. I was thinking I could take a of copy the VHD's and put them on another 2008 machine, Mount the VHD as a drive and perform the steps above. Then I would remove the old VHD on the production
server and copy over the compacted VHD.
What Im not sure about, is whether it is ok to run defrag and sdelete on the mounted VHD or whether its preferable to run that within the VM itself?
Secondly does the machine where I mount the VHD's need to be the same OS and have hyper-v installed? For example if I copied the VHD to a windows 7 machine and mounted for these steps would that cause a problem when I restore it back on the server 2008 hyper-v
server?
Lastly I see people who use a third party app to defrag. What benefit is there to using a third party utility (defragger etc) versus the built in defrag within windows? Does it even matter?

Hi Guys,I wrote below script for creating new user and granting it read only access but I'm getting attached error.Please help...Powershell$HostList = Get-Content C:\Users\malvika\Desktop\Hostnames.txtforeach ($server in $HostList){ $HostDetail = $server.Split(',') $HostName = ($server -split ',')[0] $userid = ($server -split ',')[1] $password = ($server -split ',')[2] $VCimpl = Get-VIServer -Server $HostName -User $userid -Password $password [Reflection.Assembly]::LoadWithPartialName("vmware.vim") # The name of the role to be assigned $roleLabel="Read-Only" #craete user New-VMHostAccount -Id Test -Password U!er -Description "Test User" #The name of the principal (user or group) that the role is assigned to $principal="Test" # set to false if principal is a user , not a group $principalIsGroup = $false $propagateToSubEntities = $true ...

Similar Messages

  • How to upload files in cluster without bringing down the cluster.

    Hi,
    Here is my problem:
    My weblogic portal 7.0 application should run in 24x7 environment. The production
    system is running in a cluster mode with external staging. Both the managed servers
    are pointing to the same application sync database.
    So to give a solution to this problem, we are trying to bring down one managed
    server down and apply the patches into that managed server without bringing down
    the other. Since webflow files and entitlements needs to be synchronized with
    the portal database. If we perform a sync on the portal database, there might
    be a chance that it might corrupt the existing portal database state. Our deployment
    would not be complete unless we perform a sync on the other managed servers. So
    we could not able to update the latest pathces into the cluster without bringing
    down the cluster.
    What I would like to know is "Is there any work around to get rid of this problem?".
    I would be delighted if any one provides the solution.
    Thanks & Regards,
    Ratnakar

    Hi Ratnakar,
    When you perform sync you do it against the admin server which in turn does it
    to the managed server. If you want to apply any changes to webflow you can do
    it on the live system itself. I mean apply the new webflow and entitlements and
    do the sync on the live system. Also while doing sync there are two modes. One
    mode will sync only the modified changes and the other will apply all of it. You
    can opt for the first option by which you can sync only the modified changes.
    This may bring a small disturbance but it will be unnoticed.
    The other option is to have two separate domains(each having one admin & one or
    more managed servers) which may be having two separate portal databases. In this
    way you can apply patches to one domain while other domain may provide the service.
    Regards
    Shaan
    "Ratnakar Sonti" <[email protected]> wrote:
    >
    Hi,
    Here is my problem:
    My weblogic portal 7.0 application should run in 24x7 environment. The
    production
    system is running in a cluster mode with external staging. Both the managed
    servers
    are pointing to the same application sync database.
    So to give a solution to this problem, we are trying to bring down one
    managed
    server down and apply the patches into that managed server without bringing
    down
    the other. Since webflow files and entitlements needs to be synchronized
    with
    the portal database. If we perform a sync on the portal database, there
    might
    be a chance that it might corrupt the existing portal database state.
    Our deployment
    would not be complete unless we perform a sync on the other managed servers.
    So
    we could not able to update the latest pathces into the cluster without
    bringing
    down the cluster.
    What I would like to know is "Is there any work around to get rid of
    this problem?".
    I would be delighted if any one provides the solution.
    Thanks & Regards,
    Ratnakar

  • How to Convert standalone .OVF\VMDK file to VHD, without having a VMWare server. We have a .OVF file on USB drive

    How do I Convert standalone .OVF\VMDK file to VHD, without having a VMWare server.  We have an .OVF file on USB drive.  Running Hyper V 2012 SP1 and need to convert this to run on our system.  Basically a vender of ours has decided
    not to house our servers that they used to support one of our environments.  They used VMware and we are a Hyper V shop.  Now they are sending it back in an OVF format and telling us to convert it to VHD.  Only tool I found was Microsoft converter
    tool and you need a VMware server to do that.  The exporter tool is another but doesn't actually do any conversion.  Can anyone help?
    Thanks
    Eric

    If the Java application must be stand-alone you must not deploy it on WebLogic, then WebLogic will manage its lifecycle.
    In this case you can use the CommonJ API and use the timermanager if it must run on a certain time. More information
    of how to do this can be found here: http://middlewaremagic.com/weblogic/?p=5569
    If you keep the Java application stand-only and want to use a cron job you can follow the example presented here: http://middlewaremagic.com/weblogic/?p=7065
    Note that the example runs a WLST script, but you can follow the same steps to run your Java application.

  • How to Fix a Corrupted Hyper-V VHD File

    Hi,
    Just found a blog about fixing corrupt VHDs.
    How to Fix a Corrupted Hyper-V VHD File
    http://blogs.technet.com/b/tonyso/archive/2011/12/06/how-to-fix-a-corrupted-hyper-v-vhd-file.aspx
    Enjoy!
    Best Regards,
    Vincent Hu

    Easy to run, VHD file recovery application is simple and fast solution for recovering corrupt VHD file data. It has many features which are useful in every stage data harm situations without any delay. There is no need to create Virtual environment for
    restoring recovered VHD file. Get this helpful application over here: 
    http://www.vhd.recoverydeletedfiles.com/

  • Cloning without shutting down the db

    Hi,
    Can you please suggest how to clone apps and db without shutting down the database? Apps is just copying the files, is there a recommended way to do the db cloning without shutting down the db.
    Updating the instance details:
    db - 10.2.0.4 on RHEL
    apps - 11.5.10.2
    -Jek
    Edited by: 890397 on Feb 2, 2012 5:31 AM

    You can find all the steps in the documentation (using RMAN or Hot backup).
    Cloning Oracle Application 11i /R12 with Rapid Clone - Database (9i/10g/11g) Using Hot Backup on Open Database [ID 760772.1]
    Cloning Oracle Applications Release 11i with Rapid Clone [ID 230672.1]
    Rapid Clone Documentation Resources For Release 11i and 12 [ID 799735.1]
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Rapid+AND+Clone+AND+Documentation&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Rapid+AND+Clone+AND+RMAN&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Shutdown CRS without shuting down database?

    hi forum
    It's all know that if I shutdown the CRS, the CRS daemon will shutdown the database as part of it shutdown procedure.
    How can I shutdown the CRS without shuting down the database ?
    Thank you for your time.

    hi all
    I have found the solution:
    follow steps below:
    1) use crs_stop to stop the database resource
    2) use srvctl remove to remove the database
    3) startup the database
    Now the database is not under control of the CRS.
    You can later use srvctl add database back to the CRS if you want the CRS manages the database for you.
    Thanks for your time.

  • AppleScript: How to reload a Safari window without bring the window to the foreground while I am on other Desktop space

    I want to write an AppleScript to achive a simple task. That is, I open a Safari window on Desktop 1 and automatically reload every 30 minutes while I do my dialy work on desktop 2.
    Here is my script:
    tell application "Safari"
        activate
        tell application "System Events"
            tell process "Safari"
                keystroke "r" using {command down}
            end tell
        end tell
    end tell
    This script works. However, whenever the script is executed, my current Desktop 2 will be brought back to Desktop 1. It is distracting to my workflow.
    Is there any way to just let Safari to reload in the background without bring Safari window to foreground on Desktop 1?
    I have done a coumple of researches; many of them say I should not use "activate" in my script. I tried that but then the script will just do nothing.

    Hi, Hiroto
    your approach works perfectly fine. Thank you.
    I just found there is also a more generic approach without tweaking of javascript or any third party scripting language involed:
    #!/usr/bin/osascript
    tell application "Safari"
        set docUrl to URL of document 1
        set URL of document 1 to docUrl
    end tell
    From there, I can do a simple cron job task now.

  • What's happening on my iMac?  There are two choices of selected start up disks appearance without hold down option key.  On the other hand, it start up normally show apple picture when I hold option key.

    There are two choices of selected start up disks:Main HD and Recovery HD, appearance without hold down option key.  On the other hand, it start up normally show apple picture when I hold option key.

    Hi artdiva28
    Welcome to Apple Discussions
    First go to *System Preferences > Startup Disk* > select the *Mac OS X 10.5. on Macintosh HD* > click the Lock > hit the Restart button.
    Then if the iMac is still having trouble starting up, insert your Install Disk and restart holding the Option key. In Startup Manager select the Install Disk and boot into it, choose your language, skip the Installer and go up on the menu bar to Utilities and open Disk Utility. In Disk Utility select your Macintosh HD and hit the Repair button. Once finished note any errors and what was repaired for future reference. Quit Disk Utility and restart once again holding the Option key boot back into the Macintosh HD and eject the Install Disk.
    Also see > http://support.apple.com/kb/HT2956
    Dennis

  • Shut off screen without shutting down accelerometer in Touch

    Due to Apple firmware limitations in the 2G iPod Touch, it is not possible to shut down the Touch screen and keep the accelerometer running, so running the Sleep Cycle application on the iPod Touch causes the screen to stay on all night and become very warm
    Apple please please could you change the Touch firmware to support shutting off the screen without shutting down the accelerometer so that Sleep Cycle can be run on the Touch like it now runs on the 3G and 3GS iPhone.
    This would open this excellent little application to the whole Touch market segment, making the developers very happy and allowing me to get up in the morning.

    This is a user to user forum and Apple will not hear you. You can address Apple directly here: http://www.apple.com/feedback/ipodtouch.html

  • Can we put RAC database in Archivelog mode without shutting down

    All,
    Can we put RAC database in Archivelog mode without shutting down.
    Currently our new production database (2 node RAC) is in no archive log mode, Need to enable archive log in the database...
    I believe we need to set the cluster_database=false and then put the DB in archive log mode then we need to bounce the database to take effect...
    Just curious to know in 11gR2 ...Can we put the RAC database in archive log mode without any downtime ...?

    Even RAC or non-RAC, database should bounced and enable/disable archive log mode from mount status.

  • Multiple Selection on JTree without holding down [CTRL] or [SHIFT]

    I need an example about how make multiple selection on JTree without holding down [CTRL] or [SHIFT].
    my JTree contains JCheckBox in any nodes, but I can't select two or more checkBox in time without holding down [CRTL] or [SHIFT].
    thanks for help.
    Jose A.

    I did this a few years ago so my newbiness is going to show through a bit, but I'm too lazy to update it.import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.util.*;
    public class Test3 extends JFrame {
      JTree jt = new JTree();
      MultiTreeSelectionModel mtsm = new MultiTreeSelectionModel(jt);
      JCheckBox multiCheck = new JCheckBox("Multi"),
          branchCheck = new JCheckBox("Branch");
      public Test3() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JPanel content = (JPanel)getContentPane();
        multiCheck.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(ActionEvent e) {
                mtsm.setMultiSelect(multiCheck.isSelected());
        branchCheck.setText("Branch");
        branchCheck.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
                mtsm.setBranchSelect(branchCheck.isSelected());
        JPanel jp = new JPanel();
        jp.add(multiCheck);
        jp.add(branchCheck);
        content.add(jp, BorderLayout.NORTH);
        ActionListener specialKeyListener =
            new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    MultiTreeSelectionModel.keyModifiers = evt.getModifiers();
        KeyStroke keyStroke;
        for (int i = 0; i < keys.length; i++) {
            keyStroke = KeyStroke.getKeyStroke(keys[0], 0, true);
    content.registerKeyboardAction(specialKeyListener, keyStroke,
    JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
    keyStroke = KeyStroke.getKeyStroke(keys[i][0], keys[i][1], false);
    content.registerKeyboardAction(specialKeyListener, keyStroke,
    JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
    jt.setSelectionModel(mtsm);
    content.add(new JScrollPane(jt), BorderLayout.CENTER);
    setSize(300, 300);
    setVisible(true);
    public static void main(String[] args) { new Test3(); }
    private static int[][] keys = {{KeyEvent.VK_CONTROL, ActionEvent.CTRL_MASK},
    {KeyEvent.VK_SHIFT, ActionEvent.SHIFT_MASK},
    {KeyEvent.VK_ALT, ActionEvent.ALT_MASK}};
    class MultiTreeSelectionModel extends DefaultTreeSelectionModel {
    static int keyModifiers;
    private boolean branchSelect, multiSelect;
    private JTree tree;
    private TreePath[] savePaths;
    MultiTreeSelectionModel(JTree Tree) {
    tree = Tree;
    setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
    private boolean isSelected(TreePath Path) {
    return tree.isPathSelected(Path) && (keyModifiers & KeyEvent.SHIFT_MASK) == 0;
    private boolean branchSelect() {
    return branchSelect || ((keyModifiers & KeyEvent.ALT_MASK) != 0);
    public void addSelectionPaths(TreePath[] paths) {
    if (branchSelect()) paths = getAllPaths(paths);
    super.addSelectionPaths(paths);
    public void removeSelectionPaths(TreePath[] paths) {
    if (branchSelect()) paths = getAllPaths(paths);
    super.removeSelectionPaths(paths);
    public void setSelectionPaths(TreePath[] paths) {
    if (branchSelect()) {
    paths = getAllPaths(paths);
    if (paths != null && paths.length > 0 && isSelected(paths[0])) {
    super.removeSelectionPaths(paths);
    } else if (multiSelect) super.addSelectionPaths(paths);
    else super.setSelectionPaths(paths);
    protected TreePath[] getAllPaths(TreePath[] paths) {
    if (paths == null || paths.length == 0) {
    return paths;
    Vector vector = new Vector();
    DefaultMutableTreeNode treeNode, thisNode;
    for (int i = 0; i < paths.length; i++) {
    if (paths[i] != null) {
    thisNode = (DefaultMutableTreeNode) paths[i].getLastPathComponent();
    Enumeration enumeration = thisNode.preorderEnumeration();
    while (enumeration.hasMoreElements()) {
    // add all descendants to vector
    treeNode = (DefaultMutableTreeNode) enumeration.nextElement();
    TreePath treePath = new TreePath(treeNode.getPath());
    vector.add(treePath);
    int i = vector.size();
    TreePath[] allpaths = new TreePath[i];
    for (int j = 0; j < i; j++) {
    allpaths[j] = (TreePath) vector.elementAt(j);
    return allpaths;
    protected void setMultiSelect(boolean b) { multiSelect = b; }
    protected boolean isMultiSelect() { return multiSelect; }
    protected void setBranchSelect(boolean b) { branchSelect = b; }
    protected boolean isBranchSelect() { return branchSelect; }
    protected void savePaths(TreePath Path) {
    TreePath[] tmpPaths = getSelectionPaths();
    if (tmpPaths == null) {
    savePaths = null;
    } else {
    int cnt = 0;
    for (int i = 0; i < tmpPaths.length; i++) {
    if (tmpPaths[i].isDescendant(Path)) {
    cnt++;
    savePaths = new TreePath[cnt];
    cnt = 0;
    for (int i = 0; i < tmpPaths.length; i++) {
    if (tmpPaths[i].equals(Path) || tmpPaths[i].isDescendant(Path)) {
    savePaths[cnt++] = tmpPaths[i];
    protected void restorePaths() {
    if (savePaths != null) {
    final DefaultTreeSelectionModel foo = this;
    SwingUtilities.invokeLater(
    new Runnable() {
    public void run() {
    foo.setSelectionPaths(savePaths);

  • Tuxedo transaction branch in GMTREADY and cannot finishit without shutting down weblogic server

    Trying to reproduce a problem in an application we are deployed a servlet in a
    weblogic 8.1 sp2 server, doing the folowing:
    1. Begin a transaction
    2. Call a tuxedo service (tuxedo 6.5) via tuxedo gateway "A"
    3. Call another tuxedo service (tuxedo 6.5) via tuxedo gateway "B"
    4. Before commit the transaction in the servlet, we shutdown tuxedo gateway "B"
    5. After commit transaction branch via gateway "A" remains indefinitely in GMTREADY
    state, while transaction branch via gateway "B" gets GMTABRTONLY after timming
    out.
    After commit(that fail doing rollback), transaction is not reported like inflight
    in weblogic server. We cannot finish transaction branch in GMTREADY state. Only
    after shutdown weblogic server, and after an undetermined time(sometimes a lot)
    transaction branch is rolled back.
    While transaccion is not rolled back, all locks in DB remains active.
    How we could finnish that branch without shutting down weblogic server, or, if
    not, how we could control the time in witch transaction is rolled back?

    We open a case with BEA eSupport and the servlet problem was a bug. Engineering
    got a
    temporary patch that seems to solve the problem. The case continues trying to
    solve our original problem (the servlet was to reproduce the situation).
    Thank you very much.
    Jose Emilio Ortega.
    "Todd Little" <[email protected]> wrote:
    >
    Hi Jose,
    Can you provide a little more information. In particular, what are the
    JTA timeout
    values configured for your WLS application? Did you set the interoperate
    setting
    to Yes under the WTC local access point's connection settings? When
    you begin
    the transaction in the servlet, do you specify a timeout value and if
    not, do
    you know what your thread's default transaction timeout value is?
    If possible, can you post or e-mail your WLS's config.xml and the domain
    configuration
    files for the two Tuxedo domains (not the UBB files, although those would
    be helpful
    as well.)
    Thanks,
    Todd
    "Jose Emilio Ortega" <[email protected]> wrote:
    Trying to reproduce a problem in an application we are deployed a servlet
    in a
    weblogic 8.1 sp2 server, doing the folowing:
    1. Begin a transaction
    2. Call a tuxedo service (tuxedo 6.5) via tuxedo gateway "A"
    3. Call another tuxedo service (tuxedo 6.5) via tuxedo gateway "B"
    4. Before commit the transaction in the servlet, we shutdown tuxedo
    gateway "B"
    5. After commit transaction branch via gateway "A" remains indefinitely
    in GMTREADY
    state, while transaction branch via gateway "B" gets GMTABRTONLY after
    timming
    out.
    After commit(that fail doing rollback), transaction is not reportedlike
    inflight
    in weblogic server. We cannot finish transaction branch in GMTREADYstate.
    Only
    after shutdown weblogic server, and after an undetermined time(sometimes
    a lot)
    transaction branch is rolled back.
    While transaccion is not rolled back, all locks in DB remains active.
    How we could finnish that branch without shutting down weblogic server,
    or, if
    not, how we could control the time in witch transaction is rolled back?

  • Following the latest upgrade how to exit Firefox without shuting down

    Computer type: Mac BookPro Mac OS X Version 10.6.8
    I use both the Mac Safari & Firefox browsers for blogging. Since yesterday when I downloaded the Mozilla Firefox upgrade I am unable to exit Firefox at all (no button or tab to select an exit to return to desktop and Safire). To exit Firefox I must press the manual quit button to restart the computer. I need a Firefox exit link out to reenter the Safire browser and desktop without shutting down the computer.

    You should see the Firefox menu bar on Mac as that is controlled by the Mac OS and have Firefox > Quit.
    Try to remove the Firefox plist file (org.mozilla.firefox.plist).
    *http://www.macfixit.com/article.php?story=20060606082246983 How .plist files become corrupt and troubleshooting the results
    Go to "~/Library/Preferences" and remove the plist file for Firefox (org.mozilla.firefox.plist)

  • Macbook pro will not wake from sleep without shut down?

    My macbook pro 2007 will not wake from sleep without holding down start button and then restarting? Is this a serious problem?

    You can Try resetting NVRAM/PRAM http://support.apple.com/kb/ht1379
    You can run the Disk Utility> Repair Disk from Recovery ( command R on start)
    if that does not sort it I would reinstall OS X

  • How do you share some photos from an album in iphoto to facebook without bringing over all the pictures?

    How do you share some from photos from an album in iphoto to facebook without bringing over all the pictures?

    Select the photo(s) and click share and share to the face book album you want
    LN

Maybe you are looking for

  • Link or update mac, me, and icloud accounts all to one

    Over the years my husband and children and I, have had itunes accounts linked to our email addresses. Usually the preamble doesn't change but the @ ...... does. This is because of jobs, growing up, or the apple system changing (mac, me, icloud). Is t

  • PDF Links from Word

    I create a document in Word, add the table of contents and save as a PDF file.  When I open the file on the PC and iPad, the links are retained between the Table of Contents and the document content.  When I move the file to my Android tablet, the li

  • [Solved] Missing App indicator for Shutter

    I just went through the process of installing all of the [AUR packages] for [Shutter]. I made it through that process fine, no errors all the dependencies are installed. For some reason when I start the application the App Indicator doesn't appear, i

  • AppleWorks find/change

    In recent weeks, the find/change feature has not been functioning properly. For a while, it wasn't functioning at all, but after reading a few tips on this forum, I have managed to get it to find (and change) words. It still doesn't recognize quotati

  • Calendar won't stay open and turns off after one second

    after a recent applications install my calendar won't stay open for more than a second and can't be utilized. I've reset and restored. What next? I'm suspicious that the restore is using the same corruted file. Can I rsetore from my Time capsule?