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

Direct VMDK manipulation investigation #1

Closed
hickeng opened this issue Jan 20, 2016 · 11 comments
Closed

Direct VMDK manipulation investigation #1

hickeng opened this issue Jan 20, 2016 · 11 comments
Labels
area/vsphere Intergration and interoperation with vSphere component/gateway/vmomi component/portlayer/storage kind/defect/performance Behavior that is functionally correct, but performs worse than intended priority/p2 resolution/will-not-fix This issue is valid, but will not be fixed

Comments

@hickeng
Copy link
Member

hickeng commented Jan 20, 2016

Investigate how we can directly manipulate VMDKs on ESX. The following high level tasks are of specific interest:

  • Extract tar archive onto VMDK - presuming ext4 as the filesystem format should be suitable for linux rootfs
  • Expand VMDK capacity, followed by resize filesystem - this should be a "rare" operation so could be handled via a block device attach to a service VM, but we should know if it's viable via direct operation.
@gigawhitlocks
Copy link
Contributor

@hickeng, I had a discussion w/ the Lifecycle team regarding this, and received this response "you probably want to directly consume bits of disklib, ala diskTool. Writing useful state into the VMDK requires some tool that understands ext4. I vaguely recall the tools team having some code that inspects VMDK content invasively, but don't know the details"

Further asking about ext4 seems to indicate that there's no ext4 partitioning available on ESX, however this sort of thing could be done from inside of a Linux VM (I'm sure this is not surprising). Further discussion with Mike Hall seems to indicate that we might be out of luck as far as doing this in an application running directly on ESX but a service VM (or maybe just a process running on the VCH) should be able to perform these actions in a way that's more efficient/performant than our current approach, through the use of loopback block devices.

I tend to agree that performing these operations on the host directly would at the very least be considerably more challenging than performing them inside of a VM.

@hickeng
Copy link
Member Author

hickeng commented Jan 20, 2016

We're currently performing the manipulation inside a VM, and that introduces either bottlenecks or significant throughput degradation; the latter could just require optimization, that's TBD.

Presenting the disk as a true block device in the VM requires attach/detach operations, which are serial and expensive as they entail a fast-suspend-resume, and you are limited to 4 scsi controllers and 15 disks per controller. You could partially address the serial element with clever operation batching, but the latency isn't going to improve.

If you mount the datastore directly (via 9p for example) then you bypass the need for attach/detach (see BON-26) however throughput was significantly lower. If the throughput performance could be improved and the security implications addressed then this latter approach becomes viable.

@gigawhitlocks
Copy link
Contributor

Yeah, @mlh78750 and I discussed the current drawbacks with the current 'true block device' approach, @mlh78750 can you weigh in on this discussion?

@mlh78750
Copy link
Contributor

The thought I had was could we use something disklib and create a VMDK on a normal filesystem on a guest. Then loopback mount it as a block device and use the normal linux tools to format and lay the archives on that filesystem. Then unmount and move that VMDK (file) to the datastore.

@fdawg4l
Copy link
Contributor

fdawg4l commented Jan 21, 2016

@mlh78750 loopback to what? You create the vmdk in the hypervisor or in the guest? If in the guest, sure, but is there a driver for that which doesn't rely on FUSE?

@mlh78750
Copy link
Contributor

I was under the assumption we had no support to format ext4 and mount it on the host. If that is not the case and we can, then that is a better solution. If we cannot, then yes, I was thinking of something using FUSE to mount that image.

@fdawg4l
Copy link
Contributor

fdawg4l commented Jan 25, 2016

@hickeng do you have a pointer to the bonneville 9p code? I recall there are bits that live in the daemon (but could be wrong) and bits that live in esx (but could be wrong). A pointer to both/either would be appreciated.

@fdawg4l
Copy link
Contributor

fdawg4l commented Jan 25, 2016

This looks mostly like BON-147, BON-148, and BON-149. FYI in case we want to close those jira issues as this should probably subsume them.

@dougm dougm added the area/vsphere Intergration and interoperation with vSphere label Feb 10, 2016
@hickeng hickeng added kind/defect/performance Behavior that is functionally correct, but performs worse than intended component/vmomi-authenticating-agent component/portlayer/storage labels Feb 17, 2016
@dougm
Copy link
Member

dougm commented Feb 23, 2016

Parent issue: #38

@gigawhitlocks
Copy link
Contributor

Is this still relevant? @hickeng

@hickeng
Copy link
Member Author

hickeng commented Jan 17, 2017

@gigawhitlocks still relevant, just not in plan for the near future - this requires an ESX agent and should be deferred until we have got the VMCI/vSocket communication work in place (that will supply the necessary basics and is higher priority).

caglar10ur added a commit that referenced this issue Feb 23, 2017
Otherwise we panic

[   74.127006 ] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200
[   74.127006 ]
[   74.145909 ] CPU: 0 PID: 232 Comm: tether Tainted: G            E   4.4.41-2.ph1-esx #1-photon
[   74.163249 ] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/05/2016
[   74.185318 ]  0000000000000000 ffffffff8122091f ffffffff816f2418 ffff88007968bd08
[   74.201909 ]  ffffffff810c8ed6 0000000000000010 ffff88007968bd18 ffff88007968bcb0
[   74.218554 ]  ffff880073642948 0000000000000200 ffff88007bc9d010 0000000000000000
[   74.235204 ] Call Trace:
[   74.240879 ]  [<ffffffff8122091f>] ? dump_stack+0x5c/0x7d
[   74.252128 ]  [<ffffffff810c8ed6>] ? panic+0xbf/0x1d7
[   74.259385 ]  [<ffffffff81045735>] ? do_exit+0xa35/0xa40
[   74.264534 ]  [<ffffffff8104579e>] ? do_group_exit+0x2e/0xa0
[   74.269928 ]  [<ffffffff8104e3f6>] ? get_signal+0x1b6/0x530
[   74.275283 ]  [<ffffffff810030ce>] ? do_signal+0x1e/0x5d0
[   74.280619 ]  [<ffffffff812a88a2>] ? tty_read+0x92/0xe0
[   74.285646 ]  [<ffffffff8111f1ae>] ? __vfs_read+0x1e/0xe0
[   74.290838 ]  [<ffffffff8142dc5f>] ? __schedule+0x38f/0x800
[   74.296177 ]  [<ffffffff8100104f>] ? exit_to_usermode_loop+0x7f/0xa0
[   74.302314 ]  [<ffffffff81001405>] ? syscall_return_slowpath+0x45/0x50
[   74.309296 ]  [<ffffffff814310cc>] ? int_ret_from_sys_call+0x25/0x8f
[   74.343746 ] Kernel Offset: disabled
[   74.595373 ] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200
[   74.595373 ]]

Fixes #4011
@mreferre mreferre mentioned this issue Feb 24, 2017
4 tasks
AngieCris referenced this issue in AngieCris/vic Jan 25, 2018
This commit adds an environment variable to specify the log
aggregation endpoint ($LOG_AGGR_ADDR) to drone's step for running
integration tests on pull requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vsphere Intergration and interoperation with vSphere component/gateway/vmomi component/portlayer/storage kind/defect/performance Behavior that is functionally correct, but performs worse than intended priority/p2 resolution/will-not-fix This issue is valid, but will not be fixed
Projects
None yet
Development

No branches or pull requests

7 participants