Skip to main content

VirtualBox: access Windows-host shared folders from Ubuntu-guest

Dùng Vbox hay phải mount shared folder giữa win + ubuntu. Ubuntu guest no X-Server (no Window-UI) hay gặp vđ.
Key 1: Cài VBox guest addtion từ command line.
Key 2: Tên folder share trên windows vd: C:\Users\Desktop\SadHill khi chạy lệnh mount trong ubuntu sẽ là:
sudo mount -t vboxsf SadHill /mnt/Blondie
Thư mục /mnt/Blondie đc tạo từ trước.
vboxsf là kiểu phân vùng như ntfs, fat32 ... ko rõ sao ko là vbox fs ?
Key 3: Có thể cài vbox -guest addition từ apt hay yum bên CentOS. Tuy nhiên nếu cài = ISO trên ubuntu (debian-like) chú ý /media/cdrom đổi thành /dev/sr0

WebRefs:
http://www.giannistsakiris.com/2008/04/09/virtualbox-access-windows-host-shared-folders-from-ubuntu-guest/
Làm thao để biết đã cài Vbox guest:
http://www.binarytides.com/check-virtualbox-guest-additions-installed-linux-guest/
Thực tế thì ko chuẩn lắm. Cài = apt xong ko đc vẫn phải dùng Guest.ISO
Mount cdrom linux guest :
http://superuser.com/questions/270916/mounting-a-cdrom-in-ubuntu
mount /dev/sr0 /mnt/cdrom

You need to use the cd-rom's block device to mount. It's most commonly sr0 on modern distributions.

But if your CD is already mounted to media automatically, you don't need to do this. You just need to point the program to the contents of the CD in /media.

Simple, đã từng làm nhưng cũng khiến m messing mấy ngày cho việc mount. Thậm chí cả tuần xong bỏ đấy.

Update: Nếu bạn nào chưa biết ssh host windows vào máy ảo linux (guest) thì search port forưarding Virtualbox ssh.
Thường forward cổng 3022 vô 22 của máy ảo.
sau đó ssh -p 3022 blondie@127.0.0.1
hoặc ssh -p 3022 blondie@192.168.56.1
56.1 là ip máy ảo, bạn có thể xem từ màn console của vbox.
M có 1 bài về port forwarding nhưng để đâu đó ko tìm thấy.


Comments

Popular posts from this blog

Rand mm 10

https://stackoverflow.com/questions/2447791/define-vs-const Oh const vs define, many time I got unexpected interview question. As this one, I do not know much or try to study this. My work flow, and I believe of many programmer is that search topic only when we have task or job to tackle. We ignore many 'basic', 'fundamental' documents, RTFM is boring. So I think it is a trade off between the two way of study language. And I think there are a bridge or balanced way to extract both advantage of two method. There are some huge issue with programmer like me that prevent we master some technique that take only little time if doing properly. For example, some Red Hat certificate program, lesson, course that I have learned during Collage gave our exceptional useful when it cover almost all topic while working with Linux. I remember it called something like RHEL (RedHat Enterprise Linux) Certificate... I think there are many tons of documents, guide n books about Linux bu

Martin Fowler - Software Architecture - Making Architecture matter

  https://martinfowler.com/architecture/ One can appreciate the point of this presentation when one's sense of code smell is trained, functional and utilized. Those controlling the budget as well as developer leads should understand the design stamina hypothesis, so that the appropriate focus and priority is given to internal quality - otherwise pay a high price soon. Andrew Farrell 8 months ago I love that he was able to give an important lesson on the “How?” of software architecture at the very end: delegate decisions to those with the time to focus on them. Very nice and straight-forward talk about the value of software architecture For me, architecture is the distribution of complexity in a system. And also, how subsystems communicate with each other. A battle between craftmanship and the economics and economics always win... https://hackernoon.com/applying-clean-architecture-on-web-application-with-modular-pattern-7b11f1b89011 1. Independent of Frameworks 2. Testable 3. Indepe