[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15748823#comment-15748823
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9363:
--------------------------------------------

GitHub user syed opened a pull request:

    https://github.com/apache/cloudstack/pull/1829

    CLOUDSTACK-9363: Fix HVM VM restart bug in XenServer

    Here is the longer description of the problem:
    
    By default XenServer limits HVM guests to only 4 disks. Two of those are 
reserved for the ROOT disk (deviceId=0) and CD ROM (device ID=3) which means 
that we can only attach 2 data disks. This limit however is removed when 
Xentools is installed on the guest. The information that a guest has Xentools 
installed and can handle more than 4 disks is stored in the VM metadata on 
XenServer. When a VM is shut down, Cloudstack removes the VM and all the 
metadata associated with the VM from XenServer. Now, when you start the VM 
again, even if it has Xentools installed, it will default to only 4 attachable 
disks.
    
    Now this problem manifests itself when you have a HVM VM and you stop and 
start it with more than 2 data disks attached. The VM fails to start and the 
only way to start the VM is to detach the extra disks and then reattach them 
after the VM start.
    
    In this fix, I am removing the check which is done before creating a `VBD` 
which enforces this limit. This will not affect current workflow and will fix 
the HVM issue.
    
    @koushik-das this is related to the "autodetect" feature that you 
introduced a while back 
(https://issues.apache.org/jira/browse/CLOUDSTACK-8826). I would love your 
review on this fix.
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/syed/cloudstack hvm-volume-attach-restart-fix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/1829.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1829
    
----
commit ad7de468161c5241b3d4aba899df9872eb02ea6e
Author: Syed <syed1.mush...@gmail.com>
Date:   2016-12-14T16:39:42Z

    CLOUDSTACK-9363: Fix HVM VM restart bug in XenServer

----


> Can't start a Xen HVM vm when more than 2 volumes attached
> ----------------------------------------------------------
>
>                 Key: CLOUDSTACK-9363
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9363
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.6.0, 4.7.1
>         Environment: XenServer 6.5
> HVM template
>            Reporter: Simon Godard
>            Priority: Critical
>
> Starting a HVM VM fails on XenServer fails when more than 2 volumes are 
> attached to the vm. Attaching the volumes while the vm is running is fine.
> PV vms are not affected by this problem. The bug seems to have been 
> introduced in this bug fix: 
> https://issues.apache.org/jira/browse/CLOUDSTACK-8826
> Mailing list discussion: http://markmail.org/thread/4nmyra6aofxtu3o2



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to