[virtualbox] Vài Câu Lệnh Quản Lý Máy ảo Trên Virtualbox - FAMILUG

Scrollup

Pages

  • Home
  • Gửi tặng tác giả 1 cốc cà phê
  • Forum
  • Python tutorial
  • Top Posts
  • PE Rank!
  • About Us!

New FAMILUG

Loading...

The PyMiers

Loading...

Tuesday, 22 March 2016

[virtualbox] Vài câu lệnh quản lý máy ảo trên Virtualbox

Thực hiện một nhiệm vụ chỉ có thể điều khiển các máy ảo của virtualbox trên dòng lệnh, bạn không còn lựa chọn nào khác là Google... Bài này note lại một vài câu lệnh hữu ích đã được sử dụng khi thêm ổ cứng cho một máy ảo Linux chạy trên VirtualBox. Các loại ổ cứng (disk image) Virtualbox hỗ trợ Vì máy là máy ảo, nên ổ cứng cũng là ổ ảo. VirtualBox hỗ trợ nhiều loại định dạng ổ cứng trong đó cần kể đến VMDK và VDI. VMDK (Virtual Machine Disk) là định dạng được phát triển bởi VMWare, giờ đã là định dạng mở và được sử dụng bởi nhiều phần mềm khác. Khi dùng với VirtualBox không resize được, cần phải convert về định dạng VDI để resize. VDI (Virtual Disk Image) là định dạng tiêu chuẩn của VirtualBox, hỗ trợ resize https://www.virtualbox.org/manual/ch05.html#vdidetails Các bước cần làm để thêm ổ cứng mới cho một máy ảo gồm - liệt kê các máy đang chạy để lấy tên máy cần xử lý:
vboxmanage list vms
- liệt kê các ổ cứng đã đăng ký:
vboxmanage list hdds # nếu không thấy output, không báo lỗi, hãy chạy bằng user thích hợp, có thể là virtualbox
- tắt máy ảo đi
vboxmanage controlvm VMNAME poweroff soft
- tạo bản copy của ổ cứng đang dùng với định dạng thích hợp (nếu file
VBoxManage clonehd <infilename or UUID> <outfilename> --format VDI --variant Standard
- resize ổ cứng:
VBoxManage modifyhd <absolute path to file> --resize <size in MB>
- gắn ổ cứng mới thay cho ổ cứng cũ
VBoxManage storageattach VMNAME --storagectl SATA --device 0 --port 0 --type hdd --medium new_disk.VDI
- bật máy lên:
VBoxManage startvm VMNAME --type headless
- tạo partition mới
# xem thêm fdisk & parted
- format partition mới
# xem thêm mkfs.ext4 device
Tham khảo: http://askubuntu.com/questions/42482/how-to-safely-shutdown-guest-os-in-virtualbox-using-command-line http://serverfault.com/questions/171665/how-to-attach-a-virtual-hard-disk-using-vboxmanage http://tldp.org/HOWTO/Partition/fdisk_partitioning.html http://manpages.ubuntu.com/manpages/trusty/en/man8/parted.8.html https://github.com/retr0h/cookbook-parted/issues/39https://forums.virtualbox.org/viewtopic.php?f=35&t=50661 Hết. HVN at FAMILUG.org

2 comments:

  1. htlcnn23 March 2016 at 15:13

    Có web GUI đấy

    ReplyDeleteReplies
    1. H25 March 2016 at 01:09

      học command nhanh hơn ngồi cài ạ :D

      DeleteReplies
        Reply
    2. Reply
Add commentLoad more... Newer Post Older Post Home Subscribe to: Post Comments (Atom)

Gửi tặng tác giả 1 cốc cà phê/bia

Đăng ký học Python

Đăng ký học Python

Trích dẫn & Cảm ơn

Khi trích dẫn bài viết từ FAMILUG.org vui lòng ghi rõ nguồn FAMILUG.org (có .org).Đừng cảm ơn suông, hãy chia sẻ bài viết cho nhiều người hơn, đó là hành động!

Học cho vui - Vui thì học

  • Trở thành DevOps Engineer
  • Trở thành Linux sysadmin
  • Kubernetes
  • Hướng dẫn học Python
  • Serverless với Python
  • Học command line cơ bản
  • Nén và giải nén trên Linux
  • PyFML - lớp học python
  • Học lập trình Rust
  • Quản lý package trên Ubuntu
  • Lập trình viên ký (tâm hự)

Bài viết nóng - HOT!!!

  • [SaltStack] Chào Muối, em là ai?
  • Nén, giải nén bằng command line trong Linux
  • Tài liệu và hướng dẫn học Python
  • Kiến trúc Docker, phỏng vấn, best practice
  • [CodeGold] Kiểm tra 2 list giống nhau
  • [Python] fractions - tính toán phân số trên Python
  • Để trở thành DevOps Engineer

Labels - Tem

Programing (133) Linux (118) Python (117) Command (99) sysadmin (85) Misc (75) CLI (61) Fun (56) Study (47) SomethingNew (44) Network (39) bash (38) Ubuntu (36) C (25) Tut (24) CCGU (22) vim (22) golang (19) Must-read (18) SmartUsing (16) yoyolove (16) Mạng (15) Ruby (13) PyFML (12) Book (11) Math (11) WeeklyVim (11) linux sysadmin (10) shell (10) Game (9) Firefox (8) học python (8) Announcement (7) Docker (7) Emotion (7) Eureka (7) Functional Programming (7) Latex (7) Matlab (7) Virtualization (7) go (7) scheme (7) system (7) tmux (7) virtualbox (7) BSD (6) C++ (6) Project (6) devops (6) hacking (6) kvm (6) nginx (6) python tutorial (6) Algorithm (5) DNS (5) JavaScript (5) Sticky (5) UNIX (5) apt-get (5) dpkg (5) email (5) find (5) git (5) guile (5) pandas (5) ps (5) terminal (5) Android (4) ArchLinux (4) CSS (4) DataScience (4) Django (4) K8s (4) Kubernetes (4) OOP (4) OS (4) OSX (4) ProjectEuler (4) base knowledge (4) debian (4) filesystem (4) grep (4) http server (4) monitoring (4) partition (4) pip (4) procps (4) programmer (4) pydemi (4) scipy (4) script (4) ssh (4) tcpdump (4) upstart (4) video (4) xargs (4) Apache (3) CLIC (3) Challenge (3) CodeGolf (3) Configuration management (3) DataAnalysis (3) Elixir (3) English (3) FMLB (3) FMLnews (3) HDD (3) HVN (3) MySQL (3) Problems (3) Programming (3) RAM (3) RaspberryPi (3) Rust (3) SSD (3) Windows (3) ag (3) apt (3) command lines (3) container (3) cron (3) crontab (3) curl (3) database (3) encode (3) hardware (3) init system (3) interview (3) ipython (3) kernel (3) list (3) lxc (3) memory (3) monitor (3) mutt (3) postfix (3) pulseaudio (3) regex (3) sudo (3) systemd (3) vagrant (3) vmware (3) web (3) Ansible (2) CI (2) Clip (2) CloudApp (2) Conclusion (2) Erlang (2) Exercise (2) FMLEXER (2) GPT (2) HTTP (2) Haskell (2) JSON (2) LDAP (2) MBR (2) ML (2) NodeJS (2) OpenBSD (2) PHP (2) Perl (2) Plan (2) PrC (2) Rails (2) SEO (2) SQL (2) Salt (2) SaltStack (2) UEFI (2) YAML (2) Youtube (2) alsa (2) awk (2) boolean (2) busybox (2) continuous integration (2) cp (2) cut (2) developer (2) dovecot (2) ebook (2) emacs (2) eminter25391 (2) exception (2) export (2) fdisk (2) fish (2) float (2) gitlab (2) gofml (2) gparted (2) iOS (2) imap (2) install (2) ip (2) kill (2) lambda (2) less (2) logging (2) lớp học python (2) machine learning (2) nameserver (2) netcat (2) nmap (2) npm (2) numpy (2) phongvan (2) pop3 (2) postgresql (2) printf (2) process (2) pyjobs (2) pymi (2) resolv.conf (2) security (2) service (2) sort (2) sound (2) sqlite (2) ss (2) swift (2) systemcall (2) tail (2) testing (2) top (2) tox (2) trello (2) tutorial (2) util-linux (2) vim-go (2) virtualenv (2) w3m (2) wifi (2) zsh (2) 1080p (1) 16.04 (1) 2 (1) 3G (1) 4G (1) 4k (1) 720p (1) API (1) AWS (1) ActionDispatch::Cookies::CookieOverflow (1) Active record (1) BIND (1) BIOS (1) Backup (1) Bitcoin (1) CGI (1) CTF (1) CVE (1) Counter (1) CyanogenMod (1) DE (1) DFBSD (1) DLNA (1) DP (1) DSN (1) DSUB (1) DVI-D (1) DragonFly BSD (1) ECMAScript (1) EFI (1) Editor (1) FAQ (1) FMLSummer (1) Famiwood (1) Foobar2000 (1) Founding (1) Fraction (1) FreeBSD (1) G01E01 (1) Gangnam Style (1) Gearman (1) Google (1) HDMI (1) HDTV (1) HH (1) HR (1) HTML (1) Introduction (1) JACK (1) JD (1) JS (1) JSON-RPC (1) JVM (1) Java (1) LISP (1) LRUcache (1) LTE (1) Lua (1) MIME (1) MUA (1) Mac (1) Mailing list (1) Man In The Middle (1) Mariadb (1) Microsoft Excel (1) Mozilla (1) NDS (1) Odoo (1) OpenERP (1) PaaS (1) Pokemon (1) Popen (1) Puppy Linux (1) PyFML07 (1) PyJS (1) Pyjamas (1) ROM (1) ROT13 (1) Radio (1) SASL (1) SLA (1) SMB (1) SMTP (1) SNI (1) SSL/TLS (1) SamSung (1) TWRP (1) UHD (1) UPnP (1) VBoxManage (1) VGA (1) VLC (1) WM (1) Wine (1) X (1) XMPP (1) adb (1) address (1) alsamixer (1) app (1) apt-cacher (1) apt-mirror (1) aptitude (1) argparse (1) automation (1) awesome (1) aws lambda (1) base64 (1) battery (1) bdb (1) binding (1) bit (1) bluelight (1) buy (1) byobu (1) byte (1) bzip (1) cabal (1) cache (1) caching (1) can chi (1) capability (1) cc1 (1) cc1plus (1) cdrom (1) cfdisk (1) changelog (1) chart (1) chat (1) check_output (1) check_procs (1) chiadoi (1) chmod (1) class (1) classmethod (1) clipboard (1) closure (1) cloudwatch (1) code (1) codec (1) codingstyle (1) collections (1) compiler (1) compress (1) computer science (1) computer vision (1) consul (1) copy (1) cpan (1) cpu (1) cpuinfo (1) crypto (1) ctags (1) cv (1) cổng kết nối (1) dash (1) datetime (1) dd (1) decode (1) default browser (1) desktop (1) development (1) device manager (1) dict (1) diff (1) dig (1) disown (1) dkim (1) dm (1) dm-crypt (1) dmarc (1) dmesg (1) docutils (1) dpkg-divert (1) dpkg-split (1) dpkg-statoverride (1) droidquest (1) du (1) dual boot (1) electric (1) elementary (1) encrypt (1) exit status (1) f.lux (1) fallocate (1) fd (1) fd-find (1) ffmpeg (1) file permission (1) finally (1) flashing (1) format (1) fractions (1) free (1) ftp (1) fucking-awesome-go (1) function (1) functools (1) g++ (1) gcc (1) gearman php (1) geeqie (1) gem (1) gitconfig (1) github (1) glob (1) globbing (1) gnu (1) go fonts (1) go get (1) go vet (1) gocode (1) graph (1) gtalk (1) guide (1) gvim (1) gwt (1) gzip (1) hash (1) hashicorp (1) hdb (1) health (1) hosting (1) htop (1) httpbin (1) httpd (1) i3 (1) i3wm (1) ibus (1) ifconfig (1) image (1) image viewer (1) imgur (1) inode (1) iostat (1) ipdb (1) iptables (1) itc (1) iterator (1) jar (1) jinja (1) jinja2 (1) job description (1) journalctl (1) joystick (1) jq (1) k3s (1) kodi (1) kyoto carbinet (1) language age (1) laptop (1) lda (1) ldd (1) library (1) listcomp (1) ln (1) locale (1) love (1) ls (1) lsblk (1) lvm (1) lxterminal (1) m17n (1) macvim (1) mail (1) mail spam (1) mailcap (1) mailinabox (1) man (1) manpage (1) map (1) max (1) md5 (1) mda (1) memcached (1) memoization (1) midi (1) midi controller (1) min (1) minidlna (1) mobile application (1) modulo (1) monospaced font (1) mount (1) mta (1) music (1) màn hình (1) nagios (1) namei (1) naming (1) nes (1) nestopia (1) netstat (1) nice (1) niceness (1) nohup (1) notebook (1) nproc (1) nrpe (1) number (1) opendkim (1) openldap (1) overthewire (1) package (1) package manager (1) parted (1) pastebinit (1) patch (1) pathogen (1) pavucontrol (1) pbcopy (1) pbpaste (1) pcm (1) pdb (1) pdf (1) pear (1) pep8 (1) pgrep (1) phg (1) photo manager (1) pidgin (1) ping (1) pmap (1) postgres (1) powershell (1) priority (1) privacy (1) privileged port (1) productivity (1) pty (1) pyjobs.vn (1) pylint (1) qjackctl (1) qsynth (1) quoting (1) rabbitmq (1) rational number (1) rbenv (1) recovery (1) recursion (1) redis (1) redshift (1) release (1) remote execution (1) reptyr (1) resolution (1) resolver (1) reverse proxy (1) rg (1) ripgrep (1) robotodyssey (1) robots.txt (1) rooting (1) rsync (1) runlevel (1) rust-lang (1) rxvt (1) s3 (1) samba (1) sambacry (1) screen (1) scryptsetup (1) search engine (1) seq (1) serverless (1) service discovery (1) setcap (1) setuptools (1) sha (1) sha256 (1) shared library (1) shellshock (1) shinken (1) signal (1) silversearcher (1) slack (1) sleep sort (1) snd (1) social media fingerprinting (1) sourcetree (1) spf (1) start-stop-daemon (1) startup (1) staticmethod (1) statsd (1) statvfs (1) string (1) strings (1) su (1) subprocess (1) super user (1) supervised learning (1) support (1) swap (1) symlink (1) sys (1) sysctl (1) syslog (1) sysstat (1) sysv (1) taglist (1) tail recursion (1) tar (1) tcl (1) tcp (1) temperature (1) terminology (1) terms (1) theme (1) thermal (1) thi (1) tig (1) tool (1) tr (1) tree (1) troi (1) try (1) twisted (1) udemy (1) unbound (1) unittest (1) unsupervised learning (1) update-alternatives (1) uptime (1) urxvt (1) usb (1) user (1) variable (1) vba (1) vbam (1) vietnamese tet (1) vim-pathogen (1) virtio (1) wannacry (1) watch (1) wc (1) web developer (1) web framework (1) wiki (1) xclip (1) xenial (1) xz (1) y2038 (1) youtube-dl (1) z.com (1) zip (1) zombie (1) điện (1) đề (1)

Blog Archive

  • ▼  2016 (66)
    • ▼  March (3)
      • [virtualbox] Vài câu lệnh quản lý máy ảo trên Virt...
      • [CLI] fallocate - câu lệnh bắt đầu bằng chữ FA, để...
      • PyJobs.vn, 12 dự án vào 200.000 lượt view

Total Pageviews

Từ khóa » Các Câu Lệnh Trong Máy ảo