• Removing Similar Named VM Removed Both


    Taddeusz
    • Retest Urgent

    I had been messing around with attaching a video card to my Windows 10 VM and was having problems. It was named "Windows 10". I created another VM called "Windows 10 New". Had the same problem with that VM so I went to delete it. Instead of just deleting "Windows 10 New" it deleted both VM's. My other Debian and Ubuntu VM's are still there. And because I chose to remove VM * disks it deleted both disks.

     

    There should be a priority between minor or annoyance and urgent. I would not classify this as minor or an annoyance. That's just my personal opinion though.

    unraid-diagnostics-20181110-1214.zip




    User Feedback

    Recommended Comments

    Marking this Urgent for now since clearly this could lead to really bad data loss - however, I am unable to reproduce.  That is, I created a "Linux" VM (because it's simplest):

    • named "Linux 10"
    • primary vdisk size 1G
    • uncheck Start VM after creation
    • click Create
    • observe "Linux 10" in Virtual Machine list
    • observe existence of /mnt/user/domains/Linux 10
    • observe existence of /mnt/user/domains/Linux 10/vdisk1.img
    • observe existence of /etc/libvirt/qemu/Linux 10.xml

    Next, created another Linux VM:

    • named "Linux 10 New"
    • primary vdisk size 1G
    • uncheck Start VM after creation
    • click Create
    • observe "Linux 10 New" in Virtual Machine list
    • observe existence of /mnt/user/domains/Linux 10 New
    • observe existence of /mnt/user/domains/Linux 10 New/vdisk1.img
    • observe existence of /etc/libvirt/qemu/Linux 10 New.xml

    Next, clicked "Linux 10 New" icon and selected "Remove VM & Disks"

    • observe "Linux 10 New" gone, but "Linux 10" still there
    • observe /mnt/users/domains/Linux 10 New gone but /mnt/users/domains/Linux 10 still there
    • observe /etc/libvirt/qemu/Linux 10 New.xml gone but /etc/libvirt/qemu/Linux 10.xml still there

     

    Note: didn't actually install any OS into the vdisk, but tried "running it" (just sits at the bios screen) to see if any difference.  Also tried reversing order, ie, deleting "Linux 10" and observe it was completely deleted and "Linux 10 New" was completely still there.   Also tried adding a GPU, didn't make any difference.

     

    Are you able to create a sequence that shows this problem?

    Link to comment

    I haven't been able to repeat this problem either. I'm not sure what happened. I was on my Windows laptop using the latest version of Chrome. Went to delete the test version and all of a sudden both VM's were gone.

     

    I fortunately didn't lose much, if anything, important. Mostly just have to reinstall all my applications.

    Link to comment

    Can you confirm that the vdisks themselves are gone?  Open the terminal in the top right of the webGui and type this:

    cd /mnt/user/domains/
    v

    The "v" command will give you a directory listing.  Do you still see a "Windows 10" directory there?  If so, type:

     

    cd "Windows 10"
    v

    This should then list out any virtual disks that exist for that VM.

    Link to comment

    I get "command not found" trying "v".

     

    Is this command different from "ls"? I'm fairly competent with the cli. The files were gone. I've since created a new VM with the same name on my cache drive where it was before.

    Link to comment
    5 minutes ago, Taddeusz said:

    I tried a find for "v" and it didn't find anything of note so it's not a path issue. Looks like it's an alias for "ls -Al".

    Correct, defined in /root/.bash_profile

    Link to comment
    8 minutes ago, limetech said:

    Correct, defined in /root/.bash_profile

    I see. I use zsh as my default shell. Sorry for the confusion.

    Link to comment

    Oh ok, that explains it.

     

    Still not sure how you were able to delete two vms with one click.  Haven't been able to reproduce, but I'm legitimately concerned.  Nothing else stands out in memory from when you performed that action?  Anything unique or worthwhile noting?  Even something you might think to be trivial and inconsequential?

    Link to comment
    1 minute ago, jonp said:

    Oh ok, that explains it.

     

    Still not sure how you were able to delete two vms with one click.  Haven't been able to reproduce, but I'm legitimately concerned.  Nothing else stands out in memory from when you performed that action?  Anything unique or worthwhile noting?  Even something you might think to be trivial and inconsequential?

    Honestly, not really. I had just been messing around with attaching a video card to a VM so I might be able to use it to stream games via Steam to my laptop. Turns out it wasn't workable for me mainly because I access the VM remotely. I didn't want a solution that would require me to physically log into the machine for it to work. That and there was quite a bit of lag. That is the only thing unique about what I was doing at the time. Both VM's had been alternately defined to use the video card. However, not at the same time. Both VM's were shut down when I went to delete the newly created one for testing.

    Link to comment
    16 minutes ago, Taddeusz said:

    I see. I use zsh as my default shell. Sorry for the confusion.

    Ignoring for the moment why you would want to do something like that in Unraid environment, how did you install zsh?  Hopefully it has not completely replaced bash as the system default shell, right?

    Link to comment
    1 hour ago, limetech said:

    Ignoring for the moment why you would want to do something like that in Unraid environment, how did you install zsh?  Hopefully it has not completely replaced bash as the system default shell, right?

    I installed it through the Nerd Pack plugin.

     

    As to why, I prefer the case insensitive path/file completion as well as the appearance of the Agnoster theme. I spend possibly an inordinate amount of time on the shell so it’s the little things that improve my experience. I set it as the default shell for the root user upon boot. I have not experienced any issues that I am aware would be related to this change. I actually have what I consider a fairly stable system.

    Link to comment

    Most scripts in Unraid explicitly start with

    #!/bin/bash

    But we'll study this and verify (though we have no control over what plugins might do).  Pretty sure php will invoke /bin/sh which is a symlink to bash.  What does /bin/sh point to in your server?

     

    This may be a wild goose chase and zsh vs bash has nothing to do with multiple VM instances getting deleted, but would really like to get to the bottom of this if possible.  Anything you can do to make it happen again would be greatly appreciated.

    Link to comment

    /bin/sh points to bash.

     

    I use the chsh command to change the shell. I wouldn't ever change other commands like sh. I didn't even realize it was a symlink.

    Link to comment
    2 minutes ago, Taddeusz said:

    /bin/sh points to bash.

     

    I use the chsh command to change the shell. I wouldn't ever change other commands like sh. I didn't even realize it was a symlink.

    Thanks for verifying.

    Link to comment

    I have multiple Windows VM's running on one of my unraid servers with one conveniently created & named "Windows 10". I'll back up the VM's files tonight and will will try to delete "Windows 10 Handbrake 1".

     

    Any other test condition to make sure of prior?

    Link to comment

    One thing to note about Windows 10 VM's, you can install an instance without a Windows Key - you can bypass entering it during the installation. Create a local User ID if you do this vs using a Microsoft account. You can then simply copy the hard drive of this instance to create additional VM's. This is a typical practice for testing quick installations but if you want to persist them, then you can enter a key for each instance to make it all good.

    Link to comment


    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Restore formatting

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.