Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whitespace in home directory path results in vm storage growth script failures #129

Closed
akarasulu opened this issue Oct 27, 2018 · 4 comments
Assignees
Labels
critical HyperV Associated with the Hyper-V Hypervisor osWindows

Comments

@akarasulu
Copy link
Contributor

akarasulu commented Oct 27, 2018

This happened in particular on Windows, but checks should be done to make sure that the problem is not present also on Mac or Linux. Please!

Got the following output in the window and it worried me because of the error message on the inability to create the disk. I had grown the disk in this peer to 200GB: it has enough disk space for growing. It seems this growth failed but the peer came up ok.

ringing machine 'default' up with 'hyperv' provider...
==> default: Verifying Hyper-V is enabled...
==> default: Verifying Hyper-V is accessible...
==> default: Importing a Hyper-V instance
    default: Creating and registering the VM...
    default: Successfully imported VM
    default: Configuring the VM...
==> default: Starting the machine...
==> default: Waiting for the machine to report its IP address...
    default: Timeout: 120 seconds
    default: IP: 172.17.174.221
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 172.17.174.221:22
    default: SSH username: subutai
    default: SSH auth method: private key
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...

... SNIP ...

==> default: Running provisioner: cleanup...
Peer finished to up with following messages:
The system cannot find the path specified.
NEW-VHD : Failed to create the virtual hard disk.
The file extension for 'C:\Users\Alex' is invalid. Virtual hard disk for this operation must have a .vhd or .vhdx
extension.
At C:\Users\Alex O. Karasulu\.vagrant.d\gems\2.4.4\gems\vagrant-subutai-7.0.6\lib\vagrant-subutai\packer\script\create_
disk_and_attach.ps1:12 char:5
+     NEW-VHD -Dynamic $DiskPath -SizeBytes $($DiskSize*1073741824)
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [New-VHD], VirtualizationException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.Vhd.PowerShell.Cmdlets.NewVhd

ADD-VMHardDiskDrive : Adding the device 'Microsoft:Hyper-V:Virtual Hard Disk' to
'subutai-peer_hypervcc_default_1540670236929_48310' failed.
At C:\Users\Alex O. Karasulu\.vagrant.d\gems\2.4.4\gems\vagrant-subutai-7.0.6\lib\vagrant-subutai\packer\script\create_
disk_and_attach.ps1:14 char:5
+     ADD-VMHardDiskDrive -vmname $vm.Name -path $DiskPath -ControllerT ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-VMHardDiskDrive], VirtualizationException
    + FullyQualifiedErrorId : OperationFailed,Microsoft.HyperV.PowerShell.Commands.AddVMHardDiskDrive

Hit ENTER to finish...

To test @jadilet's theory of the whitespace in the username being the issue, I changed the setting for vm storage to C:\Peers. Disk growth works perfectly when this setting is changed so we can presume you are right ... the problem with the disk growth script is the whitespace in the username.

@akarasulu akarasulu added the HyperV Associated with the Hyper-V Hypervisor label Oct 27, 2018
@akarasulu akarasulu changed the title [Hyper-V] Whitespace in home directories results in vm storage growth script failures Whitespace in home directories results in vm storage growth script failures Oct 27, 2018
@akarasulu akarasulu changed the title Whitespace in home directories results in vm storage growth script failures Whitespace in home directory path results in vm storage growth script failures Oct 27, 2018
jadilet added a commit that referenced this issue Oct 29, 2018
@Almansherov
Copy link
Member

Brought up a peer on Windows using hyperv:

image 1

Have tested on Debian via VirtualBox.

On Moday I will test this issue on Mac with a new user

@Almansherov
Copy link
Member

Successfully brought a peer up:

screen shot 2018-11-05 at 5 00 23 pm

But has got minor error with disk size

SUBUTAI_RAM : 4096
SUBUTAI_CPU : 1
SUBUTAI_ENV : master
DISK_SIZE : 200
BRIDGE : “en0”

pwd:

/Users/admin/untitled folder/Subutai-peers/subutai-peer_fdvdffdvfd

@Almansherov
Copy link
Member

This issue is fixed.

Created an issue for the error:

#135

@Almansherov
Copy link
Member

Changed the names and vmstorage directory.
Brought successfully a peer up.
Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical HyperV Associated with the Hyper-V Hypervisor osWindows
Projects
None yet
Development

No branches or pull requests

3 participants